Repository navigation
Conversation
Entire-Checkpoint: 28a28e7efcd5
Entire-Checkpoint: c9cc59ec262e
Entire-Checkpoint: ea6cde0cee40
Entire-Checkpoint: beba033899a5
Claude-Session: https://claude.ai/code/session_01L1XB34cHJP87u166RC13Jn Entire-Checkpoint: dc4531041a56
Claude-Session: https://claude.ai/code/session_01L1XB34cHJP87u166RC13Jn Entire-Checkpoint: a9cdaf64b948
…sequant-run-has-two-pr-producers-exec-open
This was referenced Oct 1, 2026
admarble
deleted the
feature/1247-fix-run-sequant-run-has-two-pr-producers-exec-open
branch
October 1, 2026 04:16
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
Under
sequant run,createPRis now the only PR producer, and it updates a PR that already exists for the branch instead of returning it untouched.exec/SKILL.mdcopies skip "PR Creation and Verification" whenSEQUANT_ORCHESTRATORis set: exec commits, runsgit push -u origin <branch>, and opens no PR (nogh pr create, and no MCP pull-request tool in in-place mode). The in-place feat(exec/qa): explicit in-place checkout mode — run a phase on a branch in the current clone without creating or resolving a worktree #1136 block and the orchestrated-mode list now say the same thing. Exec is told to put its AC table andSEQUANT_MUTATIONmarkers inside its final## Summary, because that section is what the orchestrator copies into the PR body. Standalone/execstill creates the PR.createPRbuilds the title and body before Step 1. Both early returns (the Step 1 check and the "already exists" race) now push the branch and call the newGitHubProvider.updatePRSync, which runsgh api -X PATCH repos/{owner}/{repo}/pulls/N --input -with a JSON body on stdin, notgh pr edit. The overwrite policy from the spec is now written into the AC-2 line: title and body are overwritten only when the existing body is empty or carries the🤖 Generated by \sequant run`trailer. Otherwise sequant logsPR #N body was edited by hand; not overwritten, andbaseis still set under--stacked`. A failed PATCH prints a warning and the run keeps its PR. A failed push fails the run, the same as on the create path.IssueState.execSummary, written byStateManager.updateExecSummaryafter each successful exec pass (an exec pass with no summary clears it). A run with no exec pass of its own (a qa-only re-run) passes the stored summary tocreatePRasopts.execSummary.buildAutomatedPRBodyuses that summary whenexecOutputyields none.--no-prnow stops both producers. No new env var.runIssueWithLoggingnow has oneopenOrUpdatePRclosure, called after each successful exec pass that left commits and declared noSPEC_DIVERGENCE, and again after QA. The second call takes the AC-2 update path and adds the QA note and ready-gate report. A failed after-exec call only warns, and the post-QA call stays fatal (fix(run): exec that leaves work uncommitted reports success and the run passes with no PR — #534's empty-branch escape, reopened via a new route #879). The after-exec PR opens non-draft, the same as exec-opened PRs today; draft policy belongs to decision(run): a sequant run where no qa ran still ends with a PR — draft+note, require qa, or unchanged (blocked by #1247) #1246. ADR-0004 point 5, the skill text, the docs and the CHANGELOG all describe this timing now.docs/reference/run-command.md.Pre-PR AC Verification
src/lib/__tests__/exec-orchestrated-no-pr-skill.test.ts(9 cases, 3 copies × section skip / in-place block / marker channel)src/lib/workflow/worktree-manager.test.ts›#1247 AC-2(real git and a bare remote; GitHubProvider spied): Step 1 path, empty body, hand-edited body with--stackedbase, race path, failed PATCH, failed push.github.test.ts›updatePRSync (#1247)src/lib/workflow/batch-executor.test.ts›#1247› run 1 exec → qa AC_NOT_MET, then run 2 qa-only gets the stored summary; a fresh exec pass wins over the stored onebatch-executor.test.ts›AC-4: under --no-pr …plus the AC-1 gatebatch-executor.test.ts›#1247 … › AC-5: the PR opens right after exec, before qa reads it(5 cases: call order against qa's start, a failed after-exec call, no commits,SPEC_DIVERGENCE,--no-pr). The call-count tests inready-gate-run.test.tsand in batch-executor's #749/#879/#1223 tests now assert the two-call shapeMutation-verified: AC-1: deleted the orchestrator skip paragraph from
skills/exec/SKILL.md; theskills/execcases of the gate test failed; restored.Other probes, all restored afterwards:
templates/skills/exec/SKILL.md. Only thetemplates/skills/execin-place case failed.execSummaryfrom the batch-executorcreatePRcall. Only the AC-3 qa-only case failed.Test plan
npm run build,npm run lint,npm run lint:skill-calls,check-skill-sync(47/47 synced)github.test.ts,state-manager.test.tsandtautology-detector-cli.test.ts: 13 files, 572 tests, all passed. The fullnpm testwas not run, as the runner comment instructs.run.test.ts.run.test.ts: the existing-PR and race createPR cases were updated for the extra push and PATCH calls (the orderedchild_processqueue, 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 trap).Runner verification (head 8707d6a)
QA returned NEEDS_VERIFICATION. I did the following myself:
exec/SKILL.mdcopies are byte-identical. The AC-1 gate test reads only the PR-creation section and the in-place block, and makes realbuildAutomatedPRBodyandparseMutationMarkerscalls.SPEC_DIVERGENCEwould have opened a PR before the halt.model-ladder.test.tscaught it.testat 0121cd2: reported by a peer session.in-place-checkout-skill.integration.test.tsflagged an "in-place" mention outside the delimited region atexec/SKILL.md:985. I reworded it in all three copies.origin/main(with fix(#1248): Codex usage-limit tests no longer read the real clock #1251) and ran every test file namingin-place,SEQUANT_ORCHESTRATOR,gh pr create,createPR,buildAutomatedPRBody,viewPRByBranchSync,updatePRSync,execSummary,PR Creation and VerificationorrunIssueWithLogging: 46 files, 1,826 passed.npm run build,lint,tsc --noEmit,lint:skill-callsand skill-sync (47/47) are all clean.GitHubProviderspied). Pre-releasesequant runuses the released 2.18.0 orchestrator. With this branch's skill, exec opens no PR, and 2.18.0'screatePRopens it after QA. So until a release ships, QA in this repo's own runs still has no PR body. Land this with the release.Mutation-verified: AC-5 — replaced the after-exec
openOrUpdatePRcall with a no-op result;src/lib/workflow/batch-executor.test.ts > #1247: exec summary persists for a later qa-only run (AC-3) and --no-pr has no producer (AC-4) > AC-5: the PR opens right after exec, before qa reads it > createPR runs after exec and before qa starts, then updates after qa with the verdictfailed; restored.Second mutation: I removed the
!result.specDivergencegate. Only… > AC-5: … > an exec that declares SPEC_DIVERGENCE opens no PR, even on successfailed. Restored.ADR number: #1253 also adds
docs/adr/0004-*. Whichever merges second gets renumbered to 0005.Closes #1247
🤖 Generated with Claude Code