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:
@@ -409,7 +409,7 @@ emit narrative output between the Write tool call and the commit tool call.
|
||||
Truncation at this boundary is a known failure mode (see #2070 rescue logic in
|
||||
execute-phase.md step 5.5).
|
||||
|
||||
Create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`. Use the template at `~/.claude/gsd-core/templates/summary.md` (or its `.compact.md` variant — same `compact-content-gate.md` resolution as the USER-SETUP template above).
|
||||
Create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`. Use the template at `~/.claude/gsd-core/templates/summary.md` (or `summary.compact.md` — same `compact-content-gate.md` resolution as the USER-SETUP template above).
|
||||
|
||||
**Frontmatter:** phase, plan, subsystem, tags | requires/provides/affects | tech-stack.added/patterns | key-files.created/modified | key-decisions | requirements-completed (**MUST** copy `requirements` array from PLAN.md frontmatter verbatim) | duration ($DURATION), completed ($PLAN_END_TIME date).
|
||||
|
||||
|
||||
@@ -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