Repository navigation
Conversation
… merge (#1044) isIssueMergedIntoMain's Method 2 fallback matched any commit subject containing "(#N)" — a squash-merge form that records the PR number, not the issue number. An unrelated PR's title referencing an issue in prose was read as proof the issue was merged, even with its own feature branch unmerged and its PR still open. Drop that grep pattern; keep the two merge-commit-anchored forms (`Merge #N`, `Merge ...#N`). Entire-Checkpoint: 935a4a5217c0
…st for the numeric-prefix collision Second-pass QA: `Merge.*#104` still matched `Merge pull request #1043 …` by numeric prefix — the same PR-vs-issue confusion as the removed `(#N)` form. Both remaining patterns are now extended regexes ending in `([^0-9]|$)`. Regression test covers issue 104 vs PR 1043 (false) and 1043 itself (true); the real-git describe gets a 15s timeout instead of the unit default. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_0147heJNRw8wBBujPGMqxDpR
admarble
deleted the
feature/1044-fix-state-reconcile-marks-an-open-issue-merged-whe
branch
September 11, 2026 05:19
This was referenced Sep 19, 2026
admarble
added a commit
that referenced
this pull request
Sep 20, 2026
…s outside the diff need an issue number (#1101) * chore(hooks): allow anchored env|grep in the env-dump guard; red tests outside the diff need an issue number pre-tool.sh (all three copies): a bare env/printenv piped into a grep whose pattern starts with ^ is a prefix-scoped listing, not a dump. It is how a phase checks for the orchestrator's own SEQUANT_* vars leaking into the suite (#1086). Bare env, printenv, export and an unanchored env | grep TOKEN still block. 8 new cases per hook copy in the integration test. exec and qa skills (all three copies): a failing test in a file the diff never touched must be re-run with the SEQUANT_* vars unset, settled against base in the same worktree, and named in the PR body with an issue number. PRs #1036, #1042 and #1048 wrote 'pre-existing, unrelated' for the same three failures; none filed, and the same failures stopped the #1060 gate a week later. Entire-Checkpoint: 2ebe233c071c * chore(skills): unset every SEQUANT_* var generically so the exec skill passes the relay isolation guard (AC-16) Entire-Checkpoint: 02360586d1fc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
isIssueMergedIntoMain's Method 2 fallback matched any commit subject containing(#N)— a squash-merge form that records the PR number, not the issue number — so an unrelated PR's title that merely mentioned an issue in prose (e.g.docs: wave-2 plan — node 09 (#1030), ...) was read as proof issue fix(sync): dry-run lists files apply never writes — the template walk maps templates/opencode/** to .claude/opencode/** (phantom drift nag in serve; update plants unrendered {{PHASE}} files) #1030 was merged, even with its own feature branch unmerged and its PR still open.(#N)grep pattern from Method 2; kept the two merge-commit-anchored forms (Merge #N,Merge ...#N) which only match actual merge-commit subjects.src/lib/workflow/pr-status.test.ts(previously zero coverage) with real-git temp-repo tests for the false positive and the surviving true-positive paths.state-cleanup.test.tsprovingreconcileStateAtStartupleaves anin_progressissue with an open PR untouched in this exact scenario.Pre-PR AC Verification
isIssueMergedIntoMain(N)returnsfalsefor a commit that merely mentions(#N)src/lib/workflow/pr-status.test.ts— "AC-1: returns false when main has a squash commit that merely mentions (#N)..."Merge #Ncommit, merged feature branch, merged linked PR) still returntruepr-status.test.ts— AC-2a/AC-2b/AC-2c cases, all greenreconcileStateAtStartupleaves anin_progressissue with an open PR untouchedsrc/lib/workflow/state-cleanup.test.ts— "AC-3 (#1044): leaves in_progress untouched with an open PR..."npm run build && npm test— 6330 passed; 3 pre-existing failures unrelated to this diff (see Test plan)Mutation-verified: AC-1 — restored the
(#N)grep pattern inpr-status.ts;src/lib/workflow/pr-status.test.ts > pr-status.ts (#1044) > isIssueMergedIntoMain > AC-1: returns false when main has a squash commit that merely mentions (#N) and the issue's branch is unmergedfailed; restored.Mutation-verified: AC-3 — restored the
(#N)grep pattern inpr-status.ts;src/lib/workflow/state-cleanup.test.ts > reconcileStateAtStartup escalation > AC-3 (#1044): leaves in_progress untouched with an open PR when main only has an unrelated squash commit mentioning the issue numberfailed; restored.Test plan
npx vitest run src/lib/workflow/pr-status.test.ts→ 4 passednpx vitest run src/lib/workflow/state-cleanup.test.ts→ 12 passed (including new AC-3 case)npm run build→ passesnpm run lint→ passesnpm test(full suite) → 6330 passed, 3 failed. All 3 failures are in files this PR does not touch (src/lib/workflow/batch-executor.test.ts,src/commands/__tests__/prompt-wait.test.ts,__tests__/integration/relay-hook.integration.test.ts) and reproduce identically when run in isolation on this same worktree, confirming they are pre-existing/environmental, not caused by this change.Closes #1044
Post-QA (AC_MET_BUT_NOT_A_PLUS) — runner fold-in, ea605e3
Merge.*#Nform was unanchored, so#104matchedMerge pull request #1043 …by numeric prefix — reproducible on today'smain. Both remaining patterns are now-Eregexes ending in([^0-9]|$); regression case AC-1b covers 104 vs 1043 (false) and 1043 itself (true).checkPRMergeStatusOPEN/null branches have no direct case here; the three darwin-local failures QA saw at both HEAD and base are the known pre-existing set, not this diff.Mutation-verified: AC-1 — removed the ([^0-9]|$) end-anchor from both Merge patterns in isIssueMergedIntoMain;
src/lib/workflow/pr-status.test.ts > AC-1b: returns false when a merge commit's PR number merely starts with the issue number (numeric-prefix collision)failed; restored.