* test(3646): add routing-block hyphen-form regression tests for workflow templates Extends bug-3683-workflow-colon-namespace-leak.test.cjs with a new R suite that asserts the specific user-facing symptom from #3646: ▶-prefixed routing lines in installed workflow files (validate-phase.md, secure-phase.md) must use /gsd-<cmd> hyphen form and must not contain the /gsd:<cmd> colon form. The R suite adds positive-assertion coverage that the prior W suite lacked: W3 checks absence-of-colon globally; R1/R2/R3 check that routing-position strings (▶-marker lines) are present AND use the correct hyphen form — the distinction that makes this a behavioral install-contract test rather than a source-grep. Verified the new tests FAIL when normalizeAgentBodyForRuntime is disabled (the pre-fix state) and PASS with the fix in place. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(3646): fix Windows parity — use /\r?\n/ in routing-line splitters Replace .split('\n') with .split(/\r?\n/) in the two new R-suite helpers so Windows CRLF checkouts (autocrlf=true) don't produce trailing \r on ▶-prefixed routing lines, which would break the startsWith('▶') filter. Caught by tests/windows-test-parity-guard.test.cjs ratchet baseline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: add changeset for PR #3800 (#3646 routing-block regression tests) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(3646): tighten token-level assertions — check embedded colons in /gsd tokens Codex adversarial review found that R1/R2/R3 only checked for /gsd:<cmd> (colon immediately after gsd), leaving a gap where /gsd-validate:phase would pass all tests. Add token-level assertion: extract all /gsd[^\s]* tokens from ▶-prefixed routing lines and assert none contain an embedded colon. This catches any token where normalisation only partially converted the colon form. Documentation placeholder lines like /gsd-[command] are not affected because the placeholder token /gsd-[command] contains no colon. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(3646): consolidate dual Claude install into shared fixture to stop TOCTOU interference W and R suites both ran runClaudeLocalInstall in separate before() hooks, adding two concurrent heavy-install operations per test-file run. Under --test-concurrency=4 on Node 22 (ubuntu/windows), this extra disk I/O starved the barrier-based TOCTOU concurrency test in locking-bugs-1909-1916-1925-1927.test.cjs, causing its timing- sensitive barrier to release unevenly and let one subprocess complete before the other, producing a false lost-update failure. Fix: lift the Claude install to a single shared claudeTmpDir at the outer describe level so W and R share one install. Gemini suite (G) is unaffected and keeps its own install. All 11 tests in the file pass; TOCTOU tests unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(3646): address review — fix changeset misclassification, remove false Windows-parity claim, tighten R-suite assertions - F1: Reword changeset from "Fixed/now emit" (implies behavior change) to "patch" + test-only description (accurate: normalizer already shipped in #3685) - F4: Tighten R3 comment to document unique value vs W3: ▶-line scope + embedded-colon token check - F5: Extend R3 sweep to include references/ dir alongside workflows/ - F6: Change R1/R2 assert.ok(length >= N) to assert.strictEqual(length, N) so line removals surface immediately - F7: Update inline comments in R1/R2 and before() hook to match strictEqual semantics; add sub-suite dependency list to before() Reviewed-by: gsd-code-reviewer, sonnet-adversarial Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(3800): correct changeset type from invalid 'patch' to 'Fixed' docs-lint rejects the fragment because 'patch' is not an ALLOWED_TYPES value; 'Fixed' is the correct label for a regression-test addition with no user-visible behavior change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
246 B
246 B
type, pr
| type | pr |
|---|---|
| Fixed | 3800 |
Adds R1/R2/R3 regression coverage that confirms the existing hyphen-form emission from #3685 works on validate-phase.md, secure-phase.md, and across all workflow routing surfaces. No user-visible behavior change.