Skip to content

fix: move unit-test-instructions from build-and-test to code-generation#403

Open
jeromevdl wants to merge 2 commits into
awslabs:v2from
jeromevdl:fix/test-generation-duplication
Open

fix: move unit-test-instructions from build-and-test to code-generation#403
jeromevdl wants to merge 2 commits into
awslabs:v2from
jeromevdl:fix/test-generation-duplication

Conversation

@jeromevdl

@jeromevdl jeromevdl commented Jun 18, 2026

Copy link
Copy Markdown

Summary

Fixes #397

The build-and-test stage was generating unit-test-instructions.md (describing unit tests to write), but code-generation already includes unit test files in its plan and generates them during execution. This caused redundant duplication.

Changes

  • code-generation: Added unit-test-instructions to produces:. Added Step 4 (Generate Unit Test Instructions) between plan approval and code generation, so the instructions guide the subagent. Included in the delegation prompt context.
  • build-and-test: Removed unit-test-instructions from produces:, added it to consumes:. Steps 4-8 now generate only integration/performance/security test instructions. Step 10 references the consumed artifact for execution.
  • Docs: Updated docs/reference/04-stages/construction.md and docs/reference/16-artifact-vocabulary.md to reflect the moved artifact.
  • dist/: Regenerated all harnesses (bun scripts/package.ts --check passes).
  • Fixture: Regenerated tests/fixtures/designer-export/export.json (artifact count unchanged at 122).

Test Results

All relevant tests pass (smoke, unit, integration graph/stage-consistency tests). Two pre-existing failures unrelated to this change (README badge version mismatch in t68, agents count in t66).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

build-and-test was generating unit-test-instructions.md describing tests
to write, but code-generation already includes unit test files in its plan
and generates them during execution. This caused redundant duplication.

Move unit-test-instructions production to code-generation (Step 4, before
subagent delegation) so it guides test generation. build-and-test now
consumes it for execution and focuses on integration/performance/security
test instructions only.

Fixes awslabs#397
@jeromevdl jeromevdl requested review from a team as code owners June 18, 2026 22:26
@github-actions github-actions Bot added documentation Improvements or additions to documentation github rules labels Jun 18, 2026
@jeromevdl jeromevdl changed the base branch from main to v2 June 18, 2026 22:29
…sumption

Step 2 now lists unit-test-instructions before code-summary (logical
order: what tests to run, then what was built). Step 10 references all
units' instructions via the glob path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] build-and-test stage duplicates unit test generation from code-generation

1 participant