Turn /orchestrate into a queue with sleep, parallel and auto - #683
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a51368bbc8
ℹ️ 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".
|
|
||
| ```bash | ||
| git switch -c feature/orb-N-<slug> feature/orb-<parent>-<slug> | ||
| # and the worker's finishing contract opens the PR with: --base feature/orb-<parent>-<slug> |
There was a problem hiding this comment.
Pass the stack base into the worker prompt
When a queued ticket has stackParent, this line relies on the worker opening the child PR with --base feature/orb-<parent>-<slug>, but the only compose-prompt.mjs interface documented below has no base argument and the existing finishing contract still directs a PR to main. In a same-repo blocker queue, the child worker can therefore open its PR against main, causing the child PR to include the parent layer and defeating the stacked review/merge flow. Please carry the computed base branch into the composed prompt and remove the main-only finishing instruction for stacked tickets.
Useful? React with 👍 / 👎.
| stale until this re-runs. `DELIVERED` continues; `STALE_PR` means the push did not land, so stop | ||
| and report; `OVERSIZE` hands over naming the overage and **never reverts the fix**. | ||
| 2. Reply `fixed in <sha>` with the NEW sha, then resolve. | ||
| 3. Post `@codex review` as a comment and read once more. |
There was a problem hiding this comment.
Wait for the new Codex review after requesting it
After fixing a Codex thread, this instruction says to post @codex review and then read once more, but tools/list-bot-threads.mjs returns immediately when any prior bot review exists; it does not wait for a review submitted after the new head/comment. In the fix path, the run can therefore report the stale pre-fix bot verdict as the second pass, exactly the failure mode this step is intended to avoid. The reread needs a freshness condition, such as waiting for reviewedAt after the re-request or for a review on the current head.
Useful? React with 👍 / 👎.
a65b985 to
d34f3cd
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d34f3cd590
ℹ️ 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".
| gh stack init --base main <parent-branch> <child-branch> [<grandchild-branch> ...] | ||
| gh stack submit # links the existing PRs into a Stack; --open marks them ready | ||
| gh stack view --json # machine-readable state, for the final report |
There was a problem hiding this comment.
Require the gh-stack extension before stack commands
For stacked queues, this new linking step assumes gh stack is built into any sufficiently new gh, but I checked the installed CLI (gh 2.96.0) and gh stack --help only prints that it is an official extension and says to run gh extension install github/gh-stack. With a fresh CLI that meets the stated 2.90.0 version requirement but lacks the extension, the run will fail after the stack PRs are opened instead of linking/reporting them. Please add an extension preflight/install requirement before invoking these commands.
AGENTS.md reference: AGENTS.md:L15-L28
Useful? React with 👍 / 👎.
| - Codex threads: `N found, F fixed, R filed, X not applicable, U left open`, or | ||
| `BOT REVIEW ABSENT`. |
There was a problem hiding this comment.
Surface body-level Codex change requests
When list-bot-threads.mjs returns CHANGES_REQUESTED with zero threads, which this step explicitly calls out as possible, the handoff only has a thread-count summary or BOT REVIEW ABSENT. That can report 0 found after a clean cross-vendor review while GitHub still has a body-level Codex changes-requested review blocking the PR, so the overnight summary may hide the only failing reviewer verdict. Please include the bot verdict/review state and leave CHANGES_REQUESTED open even when there are no inline threads.
Useful? React with 👍 / 👎.
Wires the three tools from the parent PR into the contract. /orchestrate now takes one ticket, several, a project, or --auto, and grows --sleep, --parallel and --auto. One ticket with no flags behaves exactly as it did. --sleep opens pull requests and never merges one. Every piece of signing, provenance, ledger and merge-sweep machinery the OLD --sleep needed stays deleted, because nothing acts on a receipt. What makes an unattended run trustworthy now is verify-delivery.mjs, which reads only artifacts and never a worker's self-report. That is what was missing the first time. Stacking, because nothing merges overnight: a ticket whose blocker is in the same queue branches from its blocker's branch and targets it, since main will not contain the blocker's work until morning. --base is passed to verify-delivery too, or the size caps read the parent's commits as this ticket's. A stack lives in one repository, so cross-repo blockers stay separate pull requests and the api one deploys first. New step 12 clears the Codex reviewer's threads, which nothing has ever read: 8 threads opened across #676, #680 and #681, 8 still unresolved, all merged. The verdict comes from the presence of a review, never the thread count, and NO_REVIEW is never reported as clean. Every resolve replies first. One fix round, then re-verify and post @codex review explicitly, because the bot reviews on open and on request but NEVER on a push: #676's only review landed at 17:23:33Z while commits ran to 17:35:14Z. Two jump references changed MEANING, not just digits. "0 blocking -> step 12" and "all CLOSED -> step 12" used to mean "hand over" and now mean "go to the bot pass"; a mechanical renumber would have skipped the new step on the cleanest and most common path. The OPEN branch reaches it too, report-only. Preflight 0a now asserts the ACTIVE gh account owns the target remote, not merely that some account is logged in. This run hit the exact failure it guards: a push refused for thomas-luizon_iqpay after the work was done. Preflight 0b runs once per distinct repo rather than once per ticket, so concurrent fetch and merge --ff-only cannot race on .git/index. The visual layer is deliberately absent. A visible-effect ticket runs, opens its pull request, and is NOT moved to In Review: the run prints "visual check owed" and Thomas looks with /dev-server. The screenshots existed to prove correctness before a machine merged, and no machine merges. Amends the §5.3 round cap to scope "round" to the frozen cross-vendor list, or the bot fix round reads as a forbidden third round. Amends the merge prohibition to say what it means: never merges UNASKED. Thomas asking for a merge in a later turn is the intended path; --admin, the raw REST and GraphQL paths, force pushes and pushes to main stay blocked in every case. caps.parallelTickets is 3, not 8: each worktree is a full install, build and test run plus its own model session. node tools/test-tools.mjs ORBIT TOOLS GATE OK node .claude/hooks/test-hooks.mjs ORBIT HOOKS OK node tools/check-dashes.mjs clean Refs ORB-179, ORB-180. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The step 12 text claimed the bot never reviews on a push, written from #676 alone. #682 falsified it the same day: it reviewed the old head, took a push, and reviewed the new head seven minutes later. Both shapes are now named, and the conclusion is stronger for it. A re-review is luck, never the mechanism, so the explicit @codex review request stays and list-bot-threads comparing review.commit.oid to the head is what makes the verdict correct under either behaviour. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
d34f3cd to
8d3094b
Compare
|



Stacked on #682, which adds the three tools this wires in. Base is
feature/orchestrate-queue-tools, so review that one first and merge bottom-up./orchestratenow takes one ticket, several, a project, or--auto, and grows--sleep,--paralleland--auto. One ticket with no flags behaves exactly as it did.--sleepopens pull requests. It never merges one.Every piece of signing, provenance, ledger and merge-sweep machinery the old
--sleepneeded stays deleted, because nothing here acts on a receipt. What makes an unattended run trustworthy now isverify-delivery.mjs: sole authority for "delivered", reads only git and GitHub artifacts, never a worker's self-report. That is precisely what was missing the first time, when a worker claimed work it had not done.A failed ticket is recorded and skipped. No retry, no relaunch, nobody woken.
Stacking, because nothing merges overnight
A ticket whose blocker is in the same queue branches from its blocker's branch and targets it. It cannot branch from
main:mainwill not contain the blocker's work until you merge it in the morning.--baseis passed toverify-delivery.mjstoo, orgit rev-list --count main..HEADcounts the parent's commits as this ticket's and the size caps read the wrong diff.A stack lives in one repository (GitHub requires it), so cross-repo blockers stay separate PRs and the api one deploys first. Two layers of one stack never run concurrently, even under
--parallel.Merging a layer auto-rebases and auto-retargets everything above it, so you have no rebasing to do.
New step 12: clear the Codex reviewer's threads
Nothing in this harness has ever read the second review. 8 threads opened across #676, #680 and #681. 8 still unresolved. All three merged.
CHANGES_REQUESTEDopens no thread at all.NO_REVIEWis never reported as clean.isOutdatedis not evidence.@codex reviewexplicitly, because the bot reviews on open and on request but never on a push. Confirmed on chore: delete and rebuild the harness #676: its only review landed at17:23:33Zwhile commits ran to17:35:14Z.Two jump references changed meaning, not digits
0 blocking -> step 12andall CLOSED -> step 12used to mean "hand over" and now mean "go to the bot pass". A mechanical renumber would have skipped the new step on the cleanest and most common path so the PRs with nothing wrong would be exactly the ones whose second reviewer nobody read. Theany OPENbranch reaches it too, report-only.Preflight, both halves hardened
ghaccount owns the target remote, not merely that some account is logged in. This PR hit that exact failure: the push was refused forthomas-luizon_iqpayafter the work was done.gh auth statusshows both accounts as "Logged in", so reading it for a checkmark passes while the run is doomed. Same gap ORB-170's proving run recorded.fetchandmerge --ff-onlycannot race on.git/index.The visual layer is deliberately absent
A
visible-effectticket runs, opens its PR, and is not moved to In Review. The run printsvisual check owedand you look with/dev-server. The screenshots existed to prove visual correctness before a machine merged, and no machine merges. This deletes an entire planned layer and makes the 51visible-effecttickets queueable at the same time.Two contracts amended rather than left contradictory
--admin, the raw REST and GraphQL paths, force pushes and pushes tomainstay blocked in every case, run or no run.Verification
gh stackproved on these two branches:gh stack initadoptedmain <- tools <- skilland found the PR for the lower branch..agents/skills/orchestrate/SKILL.mdis byte-identical tomain; it is a pointer that carries no behaviour so the two hosts cannot fork. Thedescription:frontmatter grew 43 bytes (304 to 347) against D32's 23,981-byte total.caps.parallelTicketsis 3, not 8: each worktree is a full install, build and test run plus its own model session.Refs ORB-179, ORB-180.
🤖 Generated with Claude Code