fix(#3734): backlog sentinels no longer create phase branches in query commit (#3933)

* test(#3734): 999.x and 0.x backlog sentinels must not create phase branches

* fix(#3734): gate query commit's phase-branch arm on isSentinelPhaseId

* chore(#3734): changeset fragment (pr number backfilled after PR creation)

* chore(#3734): backfill changeset PR number (3933)

---------

Co-authored-by: sim <sim@local>
This commit is contained in:
Tom Boucher
2026-08-27 12:14:27 -04:00
committed by GitHub
parent c5f2b94b27
commit 90984c4316
3 changed files with 84 additions and 1 deletions

View File

@@ -1632,7 +1632,10 @@ function cmdCommit(cwd: string, message: string | undefined, files: string[] | u
// — see #2528 for the parallel drift problem in phase-locator/phase),
// so this is the canonical path-segment-bound read, not a fourth copy.
const phaseNum = detectPhaseNumberFromFiles(files);
if (phaseNum) {
// #3734: a 999.x/0.x backlog sentinel is a parking-lot entry, not a real
// phase — the phase arm must never branch-mutate for it (isSentinelPhaseId
// is the invariant's single owner, src/phase-id.cts).
if (phaseNum && !isSentinelPhaseId(phaseNum)) {
const phaseInfo = findPhaseInternal(cwd, phaseNum) as Record<string, unknown> | null;
if (phaseInfo) {
branchName = (config['phase_branch_template'] as string)