* test(#1995): regression test for agent-<id> branch namespace Add failing-first tests proving that normalizeCleanupManifestEntry and planWorktreeRecordAgent reject Claude Code's current agent-<id> isolation branches (only worktree-agent-<id> is accepted). Boundary tests cover both namespaces plus rejection cases. * fix(#1995): widen worktree branch regex to accept agent-<id> namespace Claude Code's isolation="worktree" branch naming changed from worktree-agent-<id> to agent-<id>. Widen the regex in all 7 locations from ^worktree-agent-[A-Za-z0-9._/-]+$ to ^(worktree-)?agent-[A-Za-z0-9._/-]+$ so both namespaces are accepted. Introduce a shared WORKTREE_AGENT_BRANCH_RE constant in src/worktree-safety.cts to prevent future drift. Closes #1995 * fix(#1995): update workflow guards, test assertions, and baselines Widen the branch-check regex in execute-phase.md and execute-plan.md. Update all test assertions that checked for ^worktree-agent- to expect the widened ^(worktree-)?agent- pattern. Regenerate golden-install-parity fixtures, agent-size-baseline, and workflow-size-baseline. Closes #1995 * fix(#1995): update extractCwdGuardBash sanity check for widened regex The e2e test's sanity check verified the extracted bash block contained 'worktree-agent-'. After widening to '(worktree-)?agent-', update the check to match the new pattern. * fix(#1995): widen missed workflow-guard branch check + changeset + lint fixes - hooks/gsd-workflow-guard.js: widen startsWith('worktree-agent-') to /^(worktree-)?agent-/ regex — same defect class, was missed in prior commit - tests/worktree.test.cjs: fix indentation regression from prior edit - Add .changeset/1995-worktree-agent-branch-namespace.md (pr:0 placeholder) Found by orthogonal code review (Step 4). * fix(#1995): regenerate golden + size baselines for workflow-guard change * docs(#1995): backfill changeset PR number (2548)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
"agents/gsd-domain-researcher.md": "1c1a800108a2b225",
|
||||
"agents/gsd-eval-auditor.md": "99012004b14ea602",
|
||||
"agents/gsd-eval-planner.md": "4ebdd7fe9cbb0cfe",
|
||||
"agents/gsd-executor.md": "87ae9188c389bde8",
|
||||
"agents/gsd-executor.md": "d9dca78de04bdc1c",
|
||||
"agents/gsd-framework-selector.md": "7726fccc86bfeb50",
|
||||
"agents/gsd-integration-checker.md": "2d8339790bbb2dc3",
|
||||
"agents/gsd-intel-updater.md": "c51339956197cbd3",
|
||||
@@ -232,7 +232,7 @@
|
||||
"gsd-core/references/verification-patterns.md": "72f4d4814fdae9a8",
|
||||
"gsd-core/references/verify-mvp-mode.md": "534bdc7f2432903a",
|
||||
"gsd-core/references/workstream-flag.md": "ca99ca79e716f0f5",
|
||||
"gsd-core/references/worktree-branch-check.md": "21d9c31bf6542b93",
|
||||
"gsd-core/references/worktree-branch-check.md": "161547f45f78c2bd",
|
||||
"gsd-core/references/worktree-path-safety.md": "3c8d74756f9b16a8",
|
||||
"gsd-core/templates/AI-SPEC.md": "efa1f8354bd3a24b",
|
||||
"gsd-core/templates/DEBUG.md": "c8768312f4c1e438",
|
||||
@@ -318,13 +318,13 @@
|
||||
"gsd-core/workflows/docs-update.md": "a320371be70f43d8",
|
||||
"gsd-core/workflows/edit-phase.md": "966a3eadd1bebc04",
|
||||
"gsd-core/workflows/eval-review.md": "32d3d7e80ab2bfc7",
|
||||
"gsd-core/workflows/execute-phase.md": "5c048b5144519998",
|
||||
"gsd-core/workflows/execute-phase.md": "9bc9511ebd40b7cc",
|
||||
"gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md": "f7782680c2b8ad6b",
|
||||
"gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md": "7ebb7d1af6082028",
|
||||
"gsd-core/workflows/execute-phase/steps/post-merge-gate.md": "7b2d9a4a4013fd6a",
|
||||
"gsd-core/workflows/execute-phase/steps/regression-gate.md": "7a49bc47da5411ea",
|
||||
"gsd-core/workflows/execute-phase/steps/worktree-recovery-policy.md": "be84efbd71e1513e",
|
||||
"gsd-core/workflows/execute-plan.md": "fb4e3f846505b6a5",
|
||||
"gsd-core/workflows/execute-plan.md": "874689d8678e6186",
|
||||
"gsd-core/workflows/explore.md": "3f3b4f83e23349bc",
|
||||
"gsd-core/workflows/extract-learnings.md": "b6f01ca3d8f58de4",
|
||||
"gsd-core/workflows/fast.md": "11f5cd10ae5cc7d3",
|
||||
@@ -418,8 +418,8 @@
|
||||
"hooks/gsd-validate-commit.sh": "bf5dd61d33cb3a38",
|
||||
"hooks/gsd-windsurf-pre-command.js": "948be1c6d14c79cd",
|
||||
"hooks/gsd-windsurf-pre-write.js": "92d4dbfbc36ab0cf",
|
||||
"hooks/gsd-workflow-guard.js": "d0cea21bc596fd27",
|
||||
"hooks/gsd-worktree-path-guard.js": "f198bb60674e9972",
|
||||
"hooks/gsd-workflow-guard.js": "56414206bc13b3dc",
|
||||
"hooks/gsd-worktree-path-guard.js": "a1a3d4618b41a804",
|
||||
"hooks/lib/git-cmd.js": "268ba15992ca0b23",
|
||||
"hooks/lib/gsd-graphify-rebuild.sh": "66af89601074d2a9",
|
||||
"hooks/managed-hooks-registry.cjs": "9c0d837594c7b772",
|
||||
|
||||
Reference in New Issue
Block a user