From 2b0deec04ba58a5f6ddf504cedf40a5536325656 Mon Sep 17 00:00:00 2001 From: ytnobody Date: Fri, 24 Jul 2026 16:09:08 +0900 Subject: [PATCH] docs(req-011): re-verify test coverage still matches current acceptance criteria MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #174 Investigated after the requirements-reconcile sweep flagged REQ-011's requirement text as changed. The actual acceptance-criteria wording (get_config returns max_engineers; CLAUDE.md template references it as the parallel-Engineer cap) hasn't changed since it was introduced; only the 実装状況 note was updated in PR #167, in the same commit that added TestREQ011_GetConfig_ReturnsMaxEngineers (internal/mcp/req_test.go) and TestREQ011_ClaudeMdReferencesConfiguredMaxEngineersAsCap (cmd/hermit/inprocess_test.go). Re-checked both tests against the current template after PR #172 merged the Superintendent cycle's separate "Foreground dispatch" / "Background cycle" sections into one "Superintendent cycle": the substrings the tests assert on ("up to N at a time", "exceeds N", "max_engineers = N") are still present verbatim, so both tests still correctly verify the current acceptance criteria — no test logic changes were needed. Added a doc-comment note and a REQUIREMENTS.md implementation-note addendum recording this re-verification for future sweeps. Co-authored-by: Claude Sonnet 5 --- REQUIREMENTS.md | 2 +- cmd/hermit/inprocess_test.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/REQUIREMENTS.md b/REQUIREMENTS.md index cea85c0..dbf2f59 100644 --- a/REQUIREMENTS.md +++ b/REQUIREMENTS.md @@ -151,7 +151,7 @@ Superintendent が同時に生成する Engineer の数は `harness.toml` の `[ - 受け入れ条件: `get_config` が harness.toml の max_engineers 値を返し、CLAUDE.md テンプレートが並列上限としてこの値を参照していること - verify: test -- 実装状況: 実装済み — テンプレート側 (`cmd/hermit/templates/CLAUDE.md.tmpl` が `{{ .MaxEngineers }}` を展開し、超過分の繰り越しも記述) に加え、`get_config` (`internal/mcp/tools.go`) が `[agent].max_engineers` (既定値未設定または 0 以下のときは既定 4、`cmd/hermit/main.go` の `loadConfig`) を `max_engineers` として返すようになった。受け入れ条件の両半分がそれぞれテストで検証されている: `get_config` 側は `internal/mcp/req_test.go` の `TestREQ011_GetConfig_ReturnsMaxEngineers`、CLAUDE.md テンプレート側は `cmd/hermit/inprocess_test.go` の `TestREQ011_ClaudeMdReferencesConfiguredMaxEngineersAsCap` (`hermit init` を任意の max_engineers 値で実行し、生成された CLAUDE.md の並列上限ステップにその値が実際に反映されることを検証。従来はコメントで「テンプレート側は実装済み」と主張するのみでテストが存在しなかった)。`owner`/`repo` を返さない点は HERMIT.md との差分として残るが、この要件の受け入れ条件には含まれない +- 実装状況: 実装済み — テンプレート側 (`cmd/hermit/templates/CLAUDE.md.tmpl` が `{{ .MaxEngineers }}` を展開し、超過分の繰り越しも記述) に加え、`get_config` (`internal/mcp/tools.go`) が `[agent].max_engineers` (既定値未設定または 0 以下のときは既定 4、`cmd/hermit/main.go` の `loadConfig`) を `max_engineers` として返すようになった。受け入れ条件の両半分がそれぞれテストで検証されている: `get_config` 側は `internal/mcp/req_test.go` の `TestREQ011_GetConfig_ReturnsMaxEngineers`、CLAUDE.md テンプレート側は `cmd/hermit/inprocess_test.go` の `TestREQ011_ClaudeMdReferencesConfiguredMaxEngineersAsCap` (`hermit init` を任意の max_engineers 値で実行し、生成された CLAUDE.md の並列上限ステップにその値が実際に反映されることを検証。従来はコメントで「テンプレート側は実装済み」と主張するのみでテストが存在しなかった)。`owner`/`repo` を返さない点は HERMIT.md との差分として残るが、この要件の受け入れ条件には含まれない。Issue #174 での再点検: PR #172 で Superintendent サイクルが単一の「Superintendent cycle」ステップ列に統合された後も、上記 2 テストが検証する文字列 (`up to N at a time` / `exceeds N` / `max_engineers = N`) はテンプレート内に維持されており、両テストは変更なしで現行の受け入れ条件を引き続き正しく検証していることを確認した ## REQ-012: harness.toml による設定と GITHUB_TOKEN の非保存 diff --git a/cmd/hermit/inprocess_test.go b/cmd/hermit/inprocess_test.go index aaa62cb..c5e0608 100644 --- a/cmd/hermit/inprocess_test.go +++ b/cmd/hermit/inprocess_test.go @@ -449,6 +449,12 @@ func TestCmdInit_ClaudeMdIncludesGhSnapGuideline(t *testing.T) { // test's own doc comment asserted the template half was "already" correct // without any test actually exercising the rendered template, which is the // gap this test closes. +// +// Re-verified under Issue #174 after PR #172 merged the previously separate +// "Foreground dispatch" / "Background cycle" sections into a single +// "Superintendent cycle": the assertions below still target substrings that +// remain present verbatim in the rendered template, so no changes were +// needed here. func TestREQ011_ClaudeMdReferencesConfiguredMaxEngineersAsCap(t *testing.T) { dir := t.TempDir() prev, _ := os.Getwd()