Repository navigation
feat(#1136): explicit in-place checkout mode for exec, qa, loop and testgen - #1139
Merged
admarble merged 4 commits intoSep 24, 2026
Merged
Conversation
…estgen SEQUANT_CHECKOUT=in-place runs a phase on a feature branch in the current clone. exec creates feature/<N>-<slug> from origin/<base>; qa, loop and testgen treat $PWD as the worktree and halt on the base branch. Opt-in only; every mention of the flag sits in a delimited region, and the #899 guards are unchanged. Gate tests, a checkout-modes reference page and a CHANGELOG entry.
The gate tests now run each skill's in-place bash block against a fresh clone and judge the result with the real resolver and verifier (listWorktrees, resolveIssueWorktree, verifyWorktreePath), and sweep every mirrored file via collectFiles. exec halts when it cannot read the issue title instead of creating an empty-slug branch. Docs note the sequant run env pass-through.
7 tasks
QA's corpus check found 10/10 recent sequant-run branches differ from the in-place rule copied from new-feature.sh (branch cut at 58). sequant run's slugify cuts the slug at 50 and looks branches up by exact name, so a long-titled cloud branch would be forked, not reused. The block now cuts the slug at 50 (10/10 match). slugify is exported @internal and the gate asserts parity with it using a title whose slug exceeds 50.
…er, never calls gh The first dogfood session (cse_01W6MSXo6CpVP1WmyNMwxWVz) halted inside the exec in-place block with 'gh: command not found': claude.ai cloud sandboxes have no gh CLI. The title is now an <issue-title> placeholder the agent fills from gh or the GitHub MCP issue_read tool, so the block runs the same way in both places. The gate's gh shim now fails like a missing binary and the test asserts the block never names gh.
admarble
deleted the
feature/1136-feat-exec-qa-explicit-in-place-checkout-mode-
branch
September 24, 2026 17: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
SEQUANT_CHECKOUT=in-place,/execworks onfeature/<N>-<slug>in the current clone, and/qa,/loopand/testgentreat$PWDas the worktree. This is the mode a claude.ai cloud session needs: a fresh clone with no../worktrees/and nosequantbinary. feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137'sclaude-clouddriver consumes it.in-place-checkout…region. With the flag unset, each entry block is a no-op. The skill diff is purely additive (0 deleted lines), and every bug(fullsolve/exec): the worktree is never created and never verified — skill-driven runs execute in the main checkout, or in another repo's worktree #899worktree-*region hashes identically toorigin/mainin all 3 roots × 4 skills./execnames the branch the waysequant rundoes. It usesworktree-manager.ts'sslugify, which cuts the slug at 50 characters and is now exported@internalso the gate asserts parity. A later localsequant runphase therefore reuses a pushed cloud branch instead of forking a second one. QA's corpus check caught the first version, which copiednew-feature.sh's 58-character branch cut and differed on 10 of 10 recent branches. It now matches 10 of 10. It halts if it cannot read the issue title rather than create an empty-slug branch. It skips the dev-server smoke test unlessSEQUANT_SMOKE=1, never invokes/test, and turns parallel-group isolation off because isolation runsgit worktree add./qa,/loopand/testgenhalt unconditionally on the base branch or a detached HEAD. qa's Phase 0 status check also skips itsworktree resolvecall.SEQUANT_CHECKOUTvalue halts. So doesSEQUANT_CHECKOUT=in-placetogether withSEQUANT_WORKTREE, because the two modes are mutually exclusive.cse_01W6MSXo6CpVP1WmyNMwxWVz, Sonnet 5) confirmedSEQUANT_CHECKOUT=in-placereaches the sandbox andgit worktree listshows one entry, then halted inside the entry block withgh: command not found: cloud sandboxes have nogh. The title is now an<issue-title>placeholder the agent fills fromghor the GitHub MCPissue_readtool, the block never namesgh, and the gate'sghshim fails like a missing binary.docs/reference/checkout-modes.mdwith the three-mode table. It is linked fromdocs/README.mdand has a CHANGELOG entry.Acceptance criteria
feature/<N>-<slug>and never invokesnew-feature.sh,git worktree addorworktree resolve. Gate:__tests__/integration/in-place-checkout-skill.integration.test.ts. It asserts on the region text and also executes the region's bash in a scratch clone. The run lands on the expected branch fromorigin/main,resolveIssueWorktree(1136)returns it,listWorktreesshows no added worktree, and annpxshim records zero calls.$PWDas the worktree, skipworktree resolve, and halt on the base branch. Executed: on main it exits 1 with a HALT, on a detached HEAD it exits 1, and on the issue branch it adopts$PWD.verifyWorktreePath($PWD, {issue})accepts that path and thenpxshim records zero calls.grep -c "in-place" templates/skills/exec/SKILL.md= 20, all 20 inside delimited regions. The containment gate sweeps every mirrored.mdfile viacollectFiles. Executed: every entry block is a no-op in a fresh clone onmainwith the flag unset. The bug(fullsolve/exec): the worktree is never created and never verified — skill-driven runs execute in the main checkout, or in another repo's worktree #899 gate tests are green (51/51).npm run lint:skill-sync: 44 synced, 0 diverged, 0 missing.grep -l "in-place" docs/reference/*.mdreturnsdocs/reference/checkout-modes.md. A table-shape gate checks the three rows.cse_01W6MSXo6CpVP1WmyNMwxWVz(session link removed, Sonnet 5, environmentSequant in-placewithSEQUANT_CHECKOUT=in-place) ran/exec 1123from a fresh clone onmain. The run log showsSEQUANT_CHECKOUT=in-place,git worktree listwith the single clone, the entry block creatingfeature/1123-fix-init-yes-init-replaces-a-user-modified-agents-fromorigin/main,git push -u originsucceeding, and PR fix(#1123): --yes init no longer replaces an unparseable .mcp.json #1142 opened via the GitHub MCP tool. Nonew-feature.sh,git worktree addorworktree resolvecall appears anywhere in the log. The session's first attempt halted on theghtitle fetch, which is the fix above. Evidence is posted on 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.npm run build && npm test. See the Checks section.Mutation verification
Each mutation was applied to
templates/skills(or the docs page) on a clean tree at the last commit. The run failed exactly the one listed test (36/37 pass), thengit checkoutrestored the file.git checkout -b "$BRANCH" "origin/$BASE"from the exec regionexec > creates feature/<N>-<slug> …exec > never invokes …qa > treats $PWD as the worktree and halts on the base branchnever inferred > every mention of the flag sits inside …if truenever inferred > is a no-op with the flag unset …new-feature.shrule (cut -c1-58on the whole branch) after the slug fixexec > creates feature/<N>-<slug> …gh issue viewtitle fetch in place of the<issue-title>placeholderexec > creates feature/<N>-<slug> …in-placerow of the docs tablecheckout modes reference page (AC-5) > lists the three modes …Mutation-verified: AC-1 — deleted the git checkout -b line from the exec in-place region; creates feature/- test failed; restored.
Mutation-verified: AC-2 — deleted the qa base-branch halt; treats $PWD as the worktree test failed; restored.
Mutation-verified: AC-3 — deleted the parallel-isolation skip region delimiters; containment test failed; restored.
Mutation-verified: AC-5 — deleted the in-place row of the docs table; reference page test failed; restored.
Checks
npm run build: exit 0.timeout 900 npm test: exit 0. It ran once at283560c1, with noSEQUANT_*vars in the environment. The later slug fix only addsexporttoslugifyinsrc/. The gate, bug(fullsolve/exec): the worktree is never created and never verified — skill-driven runs execute in the main checkout, or in another repo's worktree #899 andworktree-managertests (93/93),tsc,lintandbuildwere rerun locally after it. CItestruns the full suite on the final head.npm run lint,lint:skill-sync,lint:skill-calls,lint:skill-gates: all exit 0.tautology-detector-cli.test.tsin the full suite. That failure is why the behavioural runs exist.Notes for review
sequant runspreadsprocess.envinto every phase and setsSEQUANT_WORKTREE. A user who exportsSEQUANT_CHECKOUTin their shell therefore gets a loud mutual-exclusion halt in every phase. That fails safe and is documented. Stripping the var inphase-executor.tswould be a production change outside this issue's scope.pre-tool.shcommit guard already allows commits on a non-base branch in the main checkout (bug(codex): workspace-write disables network, so every phase runs offline — no gh, no comments, no push #1079).Closes #1136
🤖 Generated with Claude Code