Repository navigation
fix(#1223): sequant run PR titles reuse the issue's own type, and the body carries exec's summary - #1240
Merged
admarble merged 6 commits intoSep 30, 2026
Conversation
…carries exec's summary buildPRTitle reuses the issue title's own conventional-commit type with #N replacing the scope, instead of prepending a label-derived feat/fix. buildAutomatedPRBody pulls the last ## Summary section from exec's phase output, capped ~4KB, falling back to the old placeholder when absent. Any closing keyword inside the imported summary is rewritten to Refs #N unconditionally so it can't auto-close an unrelated issue. Entire-Checkpoint: 0dd704943d7f
Runner check against 20 real exec transcripts (2026-09-30): 3 end with '## Summary', 4 with '### Summary', 13 with none. The ##-only match found 3 of 7; it now finds all 7. Adds the real #1222 exec ending as a fixture. Entire-Checkpoint: dd372b184809
… prefix bug is this repo's third most common issue-title prefix (32 of the last 400). The strict conventional-type list left 'fix(#1233): bug(state): ...'. It maps to fix, as a bug label does. Entire-Checkpoint: 3195cd163dce
Entire-Checkpoint: 23417f232327
…ized; breaking ! kept Forced re-QA findings: after a quality-loop iteration the body imported the first exec pass's (stale) summary; 'Fixes owner/repo#12' and issue URLs passed the sanitizer; feat!: dropped its breaking marker. Adds a run-path test that createPR receives the last exec output. Entire-Checkpoint: 057c9d258a92
…d the kept breaking marker Entire-Checkpoint: db1637952ffa
admarble
deleted the
feature/1223-fix-pr-sequant-run-prs-double-the-conventional-pre
branch
September 30, 2026 19:20
This was referenced Sep 30, 2026
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
buildPRTitle(new, pure, exported) reuses the issue title's own conventional-commit type and replaces the scope with#N—feat(adopt): x→feat(#1209): x— instead of prepending a label-derivedfeat/fixin front of a title that already has one. Titles without a recognizedtype(scope)!?:/type:prefix keep today'sisBug ? "fix" : "feat"behavior.buildAutomatedPRBodynow pulls the last## Summarysection from the exec phase's captured output (extractExecSummary), capped at ~4KB, falling back to the old placeholder text only when exec produced no summary.sanitizeImportedClosingKeywords) rewrites any closing keyword (closes,fixes,resolves) +#Ninside the imported summary toRefs #N— scoped to any issue number, applied only to imported text, never the body's own trailer. This is distinct from the existingrewriteClosingKeywordsToRefs, which is scoped to the PR's own issue and gated onlinkMode.createPRnow builds its title viabuildPRTitleand threads the exec phase's output through a new trailingopts: { execOutput? }parameter (not another positional arg — it already had 11).batch-executor.tspassesphaseResults.find(p => p.phase === "exec")?.outputthrough.AC Verification
buildPRTitle+ tests inworktree-manager.test.tsextractExecSummary+buildAutomatedPRBody+ tests inworktree-manager.build-pr-body.test.tssanitizeImportedClosingKeywords+ tests coveringCloses #<n>, lowercasefixes #<n>and cross-repo / URL referencesRunner verification (tracker #1236)
QA verdict: AC_MET_BUT_NOT_A_PLUS. The run log's QA summary was
null, and the issue comment carries only the verdict line, so the runner verified the change against real data:## Summary, 4 with### Summary, and 13 with none. The##-only match found 3 of 7.d3f7c5c1accepts##or###(ending at the next heading of the same or a higher level) and finds 7 of 7. The real fix(run): a watchdog-killed run writes no run log and half-deletes a clean worktree — worktree removal outruns the 5 s SIGKILL grace #1222 exec ending is committed assrc/lib/workflow/__fixtures__/exec-output/1222-h3-summary.txt.bug(state): …(this repo's third most common issue-title prefix, 32 of the last 400, including test: phase-executor.model-roles.test.ts runs the exec guard against the developer's checkout and auto-commits uncommitted work #1232–bug(exec): sequant run worktrees never record sequantBase, so the zero-diff/uncommitted guard compares against origin/main and a --base ahead of main disables it #1234) gavefix(#1233): bug(state): ….a9f61050maps abugprefix tofix, as abuglabel already does. Other non-conventional prefixes (arch,investigation,spike,gate) keep the label-derived path; those issues rarely producesequant runPRs.buildAutomatedPRBodyin both link modes: A closing verb (Close, lowercasefixes,resolved:) followed by an issue number anywhere in the imported summary becomesRefs #<n>. The examples here use<n>on purpose: GitHub reads a closing keyword anywhere in a PR body, including this one. The trailer staysFixes #1223(orRefs #1223underprIssueLink: "refs").Mutation-verified: AC-2 — reverted the heading match to
##only;src/lib/workflow/worktree-manager.build-pr-body.test.ts > extractExecSummary (#1223 AC-2) > reads a real exec ending that uses ### Summaryfailed, along with the###-stop case (2 failed / 36 passed); restored.Mutation-verified: AC-1 — emptied
PREFIX_TYPE_ALIASES;src/lib/workflow/worktree-manager.test.ts > #1223 buildPRTitle: conventional-commit prefix reuse > maps a \bug(scope):` title to fix without doubling it (this repo's #1232–#1234 shape)` failed (1 failed / 8 passed); restored.4bb5a71c: AC_MET_BUT_NOT_A_PLUS, 3/3. Its four findings were all fixed in2bdc0253:createPRreceives the second pass's output.Fixes owner/repo#<n>andResolves https://github.com/<owner>/<repo>/issues/<n>passed the sanitizer. Cross-repo and issue-URL references are now rewritten toRefstoo.feat!: xdropped its breaking-change!. It's kept now (feat(#N)!: x); this repo's commit validator accepts(!)?. The agent's two tests that asserted the drop were updated to match.Mutation-verified: AC-2 — reverted the exec-output pick to the first exec result;
src/lib/workflow/batch-executor.test.ts > #1223: the PR body gets the latest exec pass's output > hands createPR the second exec pass after a quality-loop iteration, not the firstfailed (1 failed / 109 passed); restored.Mutation-verified: AC-3 — narrowed the sanitizer's reference pattern back to
#N;src/lib/workflow/worktree-manager.build-pr-body.test.ts > sanitizeImportedClosingKeywords (#1223 AC-3) > rewrites cross-repo and URL references, which close other repos' issues toofailed (1 failed / 38 passed); restored.qaVerdict(both the PR-body note and bug(state): a successful spec-only run marks the issue ready_for_merge, so a later --phases exec skips it #1233's status) is also taken from the first qa result. After a loop iteration that can be an earlier verdict. That's outside this issue; it's a follow-up candidate.createPR,buildAutomatedPRBody,buildPRTitleor the placeholder text (9 files, 448 tests after the re-QA fixes) passes.tscandnpm run lintare clean.## Summarysection to close that gap.Test plan
npx vitest run src/lib/workflow/worktree-manager.test.ts src/lib/workflow/worktree-manager.build-pr-body.test.ts src/lib/workflow/batch-executor.test.ts— 177 passednpx vitest run src/commands/run.test.ts(existingcreatePRtests) — 145 passednpm run build— cleannpm run lint— cleanCloses #1223
Refs #1236
🤖 Generated with Claude Code