fix(#4460): restore compact-file reachability + fix test stdout capture
Two more gsd-test-surfaced findings:
1. The previous execute-plan.md trim removed the literal
`summary.compact.md` filename mention, breaking
tests/compact-content-variant-guard.test.cjs's reachability check
(ADR-4139 Phase 6): every registered .compact.md variant must be
named by at least one workflow "spine" file, and execute-plan.md was
apparently the only spine naming this one. Restored the bare
filename (kept the shortened surrounding wording) -- read
tests/helpers/compact-content-variant.cjs's checkReachability/
isUnprefixedMatch directly to confirm the fix rather than guessing.
40926 bytes, still 34 under the size cap.
2. The redesigned test (previous commit) still failed: both tiers'
diagnostic `echo`/`printf "Warning: ..."` lines were mixing into the
captured stdout the assertions parse as the file list, so
"--files=src/alpha.js" appeared to produce 2 lines instead of 1.
Wrapped both tier fences in a `{ ...; } > /dev/null` brace group
(not a subshell -- REVIEW_FILES still persists to the enclosing
shell) so only the final printf reaches stdout. Manually re-verified
both cases against a real git fixture before re-running the suite.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,12 @@ function runTiers(tmpDir, { filesOverride, seedReviewFiles = [] }) {
|
||||
'set -uo pipefail',
|
||||
`FILES_OVERRIDE="${filesOverride || ''}"`,
|
||||
filesArrayInit,
|
||||
// Both tiers print diagnostic "File scope: ..." / "Warning: ..." lines to
|
||||
// stdout as documentation for a human running code-review.md interactively
|
||||
// — a brace group (not a subshell: variables set inside still persist to
|
||||
// the enclosing shell) discards that chatter so only the final REVIEW_FILES
|
||||
// printf below reaches this script's captured stdout.
|
||||
'{',
|
||||
tier1,
|
||||
// Tier 1 unconditionally resets REVIEW_FILES=() when FILES_OVERRIDE is
|
||||
// set; the seed only matters (and only applies) when it is not, exactly
|
||||
@@ -126,6 +132,7 @@ function runTiers(tmpDir, { filesOverride, seedReviewFiles = [] }) {
|
||||
'PADDED_PHASE="03"',
|
||||
'LAST_REVIEW_COMMIT=""',
|
||||
tier3,
|
||||
'} > /dev/null',
|
||||
'printf \'%s\\n\' "${REVIEW_FILES[@]}"',
|
||||
].join('\n');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user