Bound worker launch cost by tier and branch - #964
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Important
The launch cap can be bypassed by concurrent reservations, and the checked-in workflow is not yet wired to the newly enabled controls.
Reviewed changes the two commits that add worker tiers, branch-scoped launch accounting, and tier-aware calibration.
- Worker profiles — Adds
defaulthigh-reasoning andmechanicalmedium-reasoning launch vectors with config validation and dry-run reporting. - Branch launch budget — Maps worktrees to configured repositories, records non-dry launches in checkout-local Git state, refuses ordinary launches above the cap, and permits reasoned overrides.
- Calibration coverage — Reworks calibration stamps and reseeding to bind every configured tier's model and complete argument vector.
- Harness and catalog — Adds sequential tier, cap, override, config, run-state, and calibration cases and updates the tool catalog.
⚠️ The production workflow still exposes the old launcher contract
The authoritative orchestrator skill still defines the launcher command without either new flag and still says the launcher resolves one model tier. Because this PR enables the cap immediately while deferring workflow integration, normal orchestration cannot select mechanical and has no prescribed --relaunch-reason recovery when a legitimate branch reaches the cap.
Technical details
# Wire the enabled controls into the production workflow
## Affected sites
- `.claude/skills/orchestrate/SKILL.md:117-125` — the fixed interface omits `--tier` and `--relaunch-reason`.
- `.claude/skills/orchestrate/SKILL.md:643-656` — local execution always uses the default tier and documents no cap recovery.
- `.claude/skills/orchestrate/SKILL.md:1071-1080` — model routing still states that the launcher resolves one tier.
- `tools/launch-worker.mjs:38-41` — the flags are enabled by this PR.
## Required outcome
- Merge the workflow contract and routing rules with this activation, or sequence activation after the stated follow-up so the checked-in production caller always describes every enabled control.
- Define which eligible orders select `mechanical` and when a branch-cap override is legitimate.GPT Sol | 𝕏
There was a problem hiding this comment.
Important
The new post-publication accounting can refuse every concurrent contender even when the branch still has capacity.
Reviewed changes since the prior Pullfrog review, the new commit replaced the shared launch ledger with per-launch records and added a concurrency regression.
- Replaced shared ledger snapshots — Stored each reservation in an exclusively created JSON file, counted peer files after publication, and removed refused records.
- Added race coverage — Exercised a nested reservation and updated the launcher assertions for directory-backed records.
GPT Sol | 𝕏
There was a problem hiding this comment.
Important
The launch cap can still be exceeded by one publication ordering that the new race harness does not exercise.
Reviewed changes since the prior Pullfrog review, the new commits elected fully published contenders by reservation filename order, replaced the nested race with synchronized worker-thread coverage, and merged redesign/main without changing the net PR patch.
-
Elected fully published contenders — Assigned each reservation a sortable name and counted only matching records ordered before it so one contender owns a free slot.
-
Strengthened race coverage — Added worker-thread barriers for full-cap and free-slot scenarios, but those barriers force all writes to complete before admission reads.
-
Merged the latest base — Merged
redesign/maininto the branch without changing the PR's net 13-file patch.
GPT Sol | 𝕏
|
There was a problem hiding this comment.
Important
The fixed-slot change introduces no new issues, but the previously reported production workflow mismatch remains unresolved and still blocks approval.
Reviewed changes since the prior Pullfrog review, I reviewed the fixed-slot reservation rewrite and its new delayed-publication regression.
- Claimed bounded branch slots — Replaced publication-order election with exactly
capdeterministic branch slot files, using exclusive creation as the ordinary-launch admission decision. - Covered delayed publication — Added a worker-thread interleaving where one caller finishes before an earlier caller attempts its slot claim, proving only one unreasoned launch is admitted at cap one.
- Preserved fail-soft accounting — Kept ledger setup and record-content failures from aborting a launch while retaining claimed slots as the durable branch budget.
GPT Sol | 𝕏
The sequencing question is settled, and a gate settles it the other way roundThe open finding on this pull request is that The review offered two outcomes: merge the contract change with the activation, or sequence the
Reproduced locally at 890's head The order is therefore: this pull request merges first, then 890 merges On this branch the same harness passes, because the gate checks prescribed against accepted and never Nothing else on this pull request changed. Requesting a fresh review of the same head. |
|
@pullfrog review |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes I re-reviewed the complete same-head patch, prior concurrency findings, the body-only sequencing concern, and the linked follow-up evidence.
-
Worker profiles — Adds
defaulthigh-reasoning andmechanicalmedium-reasoning launch vectors with validation and dry-run reporting. -
Atomic branch budget — Maps linked worktrees to configured repositories and claims exactly
capcheckout-local branch slots through exclusive creation before launching. -
Reasoned overrides — Refuses ordinary launches after the cap, reports earlier attempts, and records deliberate
--relaunch-reasonoverrides without making ledger failures fatal. -
Calibration and regression coverage — Stamps every configured tier and covers sequential admission, free-slot contention, full-cap contention, and delayed-create interleavings; the focused launcher suite and calibration gate pass.
-
Sequenced workflow contract — Verified that open PR #890 carries both launcher signatures, tier-routing rules, and cap-override guidance, and that its invocation gate requires this PR's flags to land first.
GPT Sol | 𝕏




Closes thomasluizon/orbit-tickets#536
Summary
mechanicalworker tier using medium reasoning while keepingdefaultat high reasoning.--relaunch-reasonafter the cap, while keeping ledger writes fail-soft.Test evidence
Before changes,
node tools/test-tools.mjspassed withORBIT TOOLS GATE OKwhile the original race remained present.The unchanged tests included both sequential branch-cap paths, so they did not expose simultaneous reservations.
After strengthening the original regression,
node --input-type=module -e "import { resolve } from 'node:path'; const h = await import('./tools/__tests__/_harness.mjs'); h.configure({ toolsDir: resolve('tools'), self: 'test-tools.mjs' }); const m = await import('./tools/__tests__/run-state.mjs'); await m.cases(); process.exit(h.failureCount() === 0 ? 0 : 1)"exited 1 before the first fix.That failure reported both interleaved reservations as allowed and showed the last rename had discarded one record.
After the first fix, the same focused command exited 0 with
PASS lib/run-state.mjs: simultaneous reservations admit exactly one launch and retain both admitted records.Review round two started with the unchanged
node tools/test-tools.mjs, which passed withORBIT TOOLS GATE OKwhile the free-slot defect remained present.After adding the free-slot case,
node --input-type=module -e "const h=await import('./tools/__tests__/_harness.mjs');h.configure({toolsDir:new URL('./tools/',import.meta.url).pathname.replace(/^\/[A-Za-z]:/,p=>p.slice(1)),self:'test-tools.mjs'});h.beginToolScope('lib/run-state.mjs');await (await import('./tools/__tests__/run-state.mjs')).cases();h.endToolScope();process.exit(h.failureCount()===0?0:1)"exited 1 before the round-two fix.The new failure reported both contenders refused and an admitted total of one instead of two.
After the round-two fix, the same focused command exited 0 with both simultaneous reservation cases passing.
node tools/test-tools.mjspassed after the round-two fix withORBIT TOOLS GATE OK.The tools gate observed
PASS launch-worker.mjs: a third launch exits 2 and names both earlier launches.The tools gate observed
PASS launch-worker.mjs: a third launch with a recorded reason succeeds.node .claude/hooks/test-hooks.mjspassed after the round-two fix withORBIT HOOKS OK.node tools/check-calibration.mjspassed for 31 files and both configured tiers in the original implementation round.Review round three started with unchanged
node tools/test-tools.mjs, which passed withORBIT TOOLS GATE OKwhile the delayed-create defect remained present.After adding the delayed-create case,
node --input-type=module -e "const h=await import('./tools/__tests__/_harness.mjs');const {resolve}=await import('node:path');h.configure({toolsDir:resolve('tools'),self:'test-tools.mjs'});h.beginToolScope('lib/run-state.mjs');const {cases}=await import('./tools/__tests__/run-state.mjs');await cases();process.exit(h.failureCount()?1:0)"exited 1 before the round-three fix.That failure reported both contenders allowed and two ledger records after the later contender had already returned.
After the round-three fix, the same focused command exited 0 with all three race cases passing.
node tools/test-tools.mjspassed after the round-three fix withORBIT TOOLS GATE OK.node .claude/hooks/test-hooks.mjspassed after the round-three fix withORBIT HOOKS OK.External interface evidence
The launcher reads Git's common-directory response to map a linked worktree to its configured repository key.
git -C "<linked worktree>" rev-parse --git-common-dirreturned exit 0 and one stdout string:"<absolute Git common directory>\n".git -C "<main checkout>" rev-parse --git-common-dirreturned exit 0 and one stdout string:".git\n".These are the complete response shapes consumed by the implementation. No structured fields are read.
Assumptions