Repository navigation
feat(source-control): default pr_open_state to ready per the PR-states rule - #7661
Conversation
…s rule create opens every PR as a draft and, when the open state resolves to ready (the new default), runs ready on it, so a PR reaches ready only through ready's gates. A draft is kept on request, as a multi-session container, when a level sets draft, or on an unattended run. AGENTS.md points at the rule instead of mandating draft-first. Refs: #7576 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Report an invalid value as its own fallback level, keep a requested draft inside full, fix the stale default in the pstack upstream record, and make the default-state eval case independent of a forge. Refs: #7576 Co-Authored-By: Claude Opus 5.5 <[email protected]>
create writes a `Draft:` body line when a person asked for the draft or the PR is a multi-session container; babysit-prs holds any draft that carries it, in every tier. Rename eval 24 to what it now checks. Refs: #7576 Co-Authored-By: Claude Opus 5.5 <[email protected]>
With no config, create keeps opening a draft; a repository or user opts into ready, which create reaches by running ready on the new draft. This repository keeps its opt-in. Eval cases and the default-state plugin-eval case now check a draft default. Refs: #7576 Co-Authored-By: Claude Opus 5.5 <[email protected]>
check-ready-holds.sh gains --unattended: with it, a `Draft: requested early look` or `Draft: multi-session container` body line holds the flip (exit 3). A person running ready may still flip. Every unattended caller (work, ship run, babysit autopilot, improve) now invokes ready --unattended. Refs: #7576 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The unattended hold now matches any line starting `Draft:` (any case, after spaces or a quote marker) and strips control bytes from the reason; babysit's flip sites all pass --unattended, and create states when an unmarked PR stays a draft. Refs: #7576 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 7m 6s —— View job Security review in progress
|
|
Claude finished @kyle-sexton's task in 5m 41s —— View job Code review complete
Scope. Reviewed all 42 changed files against What I checked:
No blocking or important findings. The design is internally consistent across all touched reference docs, the schema, the evals, and the shell script, and I found no correctness gap in the resolution ladder, the hold-check regex, or the unattended-caller sweep. One low-signal observation, not worth a block: claude-lane-summary: lane=claude-review sha=98f9a5a830e351ecfc42fed6fd3c96ee1345fa32 run=38966326683 |
|
claude-review has reviewed this pull request through 2d2954f; a later push is reviewed from there. |
|
Claude finished @kyle-sexton's task in 3m 53s —— View job Security review complete
No security issues found. This PR reworks when a pull request reaches Checks performed:
claude-lane-summary: lane=claude-security-review sha=98f9a5a830e351ecfc42fed6fd3c96ee1345fa32 run=38966326956 |
|
claude-security-review has reviewed this pull request through 2d2954f; a later push is reviewed from there. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98f9a5a830
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A `Draft:` line with nothing after it now holds an unattended flip; tests cover it and a `Redraft:` line that must not hold. The work and ship evals expect `ready --unattended`, and improve's Next names the unattended form for unattended runs. Refs: #7576 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Claude finished @kyle-sexton's task in 2m 1s —— View job Security review complete
No security issues found. This PR already carried two completed security/code reviews at
No CRITICAL / IMPORTANT / SUGGESTION findings to report; no inline comments posted. claude-lane-summary: lane=claude-security-review sha=2d2954f36d11655be0ae253fb2f47524fcf55c63 run=38969500957 |
|
Claude finished @kyle-sexton's task in 2m 21s —— View job Code review complete
Scope. This push ( What's new since the last reviewed SHA (
Full-diff re-check. Re-read the complete 44-file diff (via Not independently re-run: the author's "49 passed" claim for No blocking or important findings. claude-lane-summary: lane=claude-review sha=2d2954f36d11655be0ae253fb2f47524fcf55c63 run=38969500735 |

Refs: #7576
Summary
Implements Phase 8 slice a (pr-states) of the poteto-review plan under owner decision Q501. Each PR state has one meaning:
/source-control:pull-requestholds the rule. This repository opts intopr_open_state: ready. The bundled default staysdraft, by owner decision on this PR, so a repository or user opts in toready.Fix
createopens it as a draft in every case. When the state resolves toready,createthen runs Phase 2.5 (ready) on that PR, so a PR reaches ready only throughready's base merge, reviews and verify gate. If a gate stops, the PR stays a draft and the report says why; nothing forces the flip. This is the existing AGENTS.md exception: a PR this session's owncreateopened, marked ready only by runningreadyto completion. No stop in "When to stop and when to keep going" changes. Insidefull,fullruns Phase 2.5 itself, and a requested draft endsfullafter create.createrecords the reason as aDraft:line in the PR body./source-control:babysit-prsnever flips a draft carrying that line, in any tier, including autopilot.check-ready-holds.shgains--unattended: with it, that line holds the flip (exit 3, the existing hold code), while a person runningreadymay still flip it. Every unattended caller now invokesready --unattended:/work-items:work,/work-items:ship run, babysit autopilot and unattended/improvement:improve. New tests incheck-ready-holds.test.shcover three cases: unattended with the line refuses; attended with the line passes; unattended without the line passes.dontAsksessions, dispatched workers and every--pushedrun. Q91 and Q108 say routines and lanes open ready PRs; that change waits for a separate owner decision and is not in this PR.docs/conventions/source-control.yamlsetspr_open_state: ready. AGENTS.md's "Open a pull request as a draft" section becomes "Pull request states": a pointer to the skill plus this repository's value. The Conventional Commits title rule and the ready-flip rules stay.SKILL.md,full-lifecycle.md,stacks.md,native-surfaces.md, the checklist template, and the GitHub provider's create commandsbabysit-prs/improvement:improve,/improvement:find,/testing:cleanupdocs/upstream/cursor-pstack.mdand the skill cheat sheetbabysit-prsandbabysit-loopfor draft-first assumptions. Their draft handling,became_ready_for_review, the non-draft gates and draft elevation all act on the PR's current draft flag, not on how it was opened. With theDraft:hold added, they agree with this rule.pull-request-create-default-open-state-draft.pull-request/evals/evals.json:pr-open-state-repo-file-ready-opens-draft-then-flips;babysit-prseval 18 checks that autopilot holds a draft markedDraft:.scripts/affected-tests-no-suite.txtmaps the four team-layerdocs/conventions/*.yamlfiles to the convention-yaml-schema lane. They are listed one by one, because a*glob would also catch example YAML that no lane reads.Cost. Once a PR is ready, the test and AI review lanes run on every push. Opting into ready therefore spends a review run on each push a session makes. The owner accepted this cost (Q501), and Phase 8 slice b (
review_venue: one venue per PR, blocking-only after the first review, Q500) reduces it.Verification
After
npm ciin the worktree, and after mergingorigin/maininto the branch:scripts/check-affected.sh --testscheck-skill.shover source-control, work-items and improvement skillsvalidate-cases.py plugins/source-control/evalsallowed_toolswarning every sibling case also getscheck-evals-quality.sh, pull-requestcheck-evals-quality.sh, babysit-prsready --unattended)check-ready-holds.test.shRedraft:negative and the attended pass hold by construction)Fresh-context code and security reviews (the 9 findings of the first review are fixed) found no blocking defect at ready. Fixed from the ready reviews: the hold matches any line starting
Draft:, bare or with a reason (any case, after spaces or a quote marker), control bytes are stripped from its reason, and every babysit flip site passes--unattended. No paid eval runs.Instruction evidence (instruction economy). This PR replaces a standing instruction; it adds none to an always-loaded surface. AGENTS.md's draft-first section shrinks to a pointer, and the rule body goes into
create's reference, which loads only when that action runs. The observed stumbles behind it, more than once on the current model:ready. Q585 records the conflict, and that is why theDraft:line exists.Related
🤖 Generated with Claude Code