Repository navigation
feat(nodes): publish exact runner slots - #125708
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 9:44 AM ET / 13:44 UTC. ClawSweeper reviewWhat this changesThis PR replaces binary worker availability with exact bounded slot snapshots, publishes them through Gateway inventory APIs, and shows available/total worker slots on the Devices page. Merge readinessNo concrete correctness defect was found in the slot-owner, Gateway projection, or UI boundary, but this PR needs explicit maintainer confirmation of the intentional v4 update-and-reconnect cut before merge. Direct sibling Codex source inspection was also unavailable, so the Codex-related test adjustment cannot receive a Codex contract verdict in this review. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe node host owns durable launch occupancy and publishes a slot snapshot to the Gateway. The Gateway derives launch eligibility, projects the bounded values to node and environment clients, and the Devices page renders the resulting operator metadata. flowchart LR
A[Durable launch journal] --> B[Node worker capacity owner]
B --> C[Node host runner inventory]
C --> D[Gateway node registry]
D --> E[Launch eligibility]
D --> F[Node and environment APIs]
F --> G[Devices page]
E --> H[Worker session launch]
Decision needed
Why: The branch deliberately removes the prior binary-capacity dialect from active worker hosting; source can prove that behavior but cannot establish acceptance of its upgrade impact. Before merge
Agent review detailsSecurityNone. PR surfaceSource +179, Tests +156, Docs +1, Other +34. Total +370 across 49 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the immutable capacity snapshot flowing from the durable launch owner, and merge only after an owner explicitly accepts the v4 update-and-reconnect rollout and the Codex contract check is repeated in an environment with the sibling source. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature review; source and focused tests clearly define the intended slot path, but this review did not execute the PR head. Is this the best way to solve the issue? Unclear: carrying a recorded capacity fact from its durable owner is the best architectural shape, but the v4 compatibility cut needs explicit maintainer acceptance. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4589d8514ce1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
a95c837 to
5fcb940
Compare
|
@clawsweeper re-review Addressed the public-slot invariant on the latest head: The v4 → v5 runner dialect cut is intentional current-only rollout policy: existing v4 node hosts receive the existing update-and-reconnect issue and cannot host new turns until updated. Direct upstream Codex inspection was completed against |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ebc08db to
dd46e4e
Compare
|
@clawsweeper re-review Final head addresses every published item: public slot validation rejects |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
dd46e4e to
e9a8d9a
Compare
887e232 to
813b5ac
Compare
|
Land-ready proof for exact head Owner decision: approve the current-only v5 runner dialect. Connected v4 binary-capacity node hosts intentionally become update-required and cannot launch new worker turns until they update and reconnect. There is no v4 launch fallback or transport negotiation to preserve. ClawSweeper rank-up moves are complete:
Final proof also includes the full changed gate, CI artifact build, 692-file Control UI suite, focused slot/protocol/Gateway tests, the exact 34-file Codex shard, the exact 21-file compact Gateway group, mocked browser transition proof, and a clean whole-branch autoreview. No known proof gaps remain. |
|
Merged via squash.
|
* feat(nodes): publish exact runner slots * docs(runners): link slot inventory PR * fix(ui): keep session menus clickable under previews * perf(protocol): keep runner slot schema off broad barrel * test(codex): tolerate elapsed media startup budget * test(codex): type media client factory mocks * fix(protocol): reject impossible runner slot counts * test(ci): stabilize loaded lifecycle checks * test(ui): allow loaded bulk-delete scheduling * test(ui): stabilize loaded interaction checks * test(ui): isolate loaded update notice checks * test(ui): colocate bulk-delete lifecycle coverage * test(gateway): publish session config before async setup
What Problem This Solves
Runner inventory collapsed the node supervisor's durable slot count into a binary available/full flag. Operators could not see whether a connected device had one or two slots free, and the Gateway could only react to full/free edges rather than every occupancy transition.
Why This Change Was Made
The durable launch journal already owns the exact fact: pending plus running launches consume the node's two default slots. This change carries one immutable
{ total, available }snapshot from that owner through a current-only v5 private runner dialect. v4 binary-capacity nodes receive the existing update-and-reconnect recovery path; there is no compatibility fallback.The Gateway derives launch eligibility from
available > 0, retains full hosts for status/cancel/bundle/workspace operations, and projects only bounded slot counts throughnode.list,node.describe, and environment summaries. The Devices page validates the raw node payload and renders quietWorker slots A/Tmetadata. The existing invalidation event remains{ nodeId }; clients refetch instead of treating events as another state owner.No isolation or checkout capability is advertised, and the New Session picker is intentionally unchanged.
Exact-head CI also exposed shared-suite defects outside the slot path. The branch now makes the markdown interaction test restore the exact browser prototypes it owns, separates fake-timer clipboard assertions from dialog behavior, stabilizes the synthetic model-picker scroll geometry, and fresh-imports the update-success owner after module-cache reset. A redundant hovercard positioning layer was removed because current
mainalready passes the complete sidebar row as the horizontal anchor.Current
mainnow owns the startup-budget repair in #125800; this branch no longer changes budget metadata, the 1,056-byte variance tolerance, or the 350 KiB hard ceiling.Production LOC: +234 / -55. Tests: +332 / -176 after discounting the pure 48-line test move. Docs: +33 / -32. Generated Swift protocol models: +34. The production growth is the new private dialect, bounded public protocol field and refinement, shared projection, and defensive UI boundary required for exact runner slots.
AI-assisted: yes. I reviewed the capacity owner, dialect cutover, launch gates, public projection, generated protocol models, UI behavior, current-main budget ownership, and every CI repair.
User Impact
Connected device rows now show exact available worker slots. A full device stays visible with
Worker slots 0/2; new turns remain blocked until a durable terminal transition releases a slot.Evidence
NODE_OPTIONS=--max-old-space-size=8192 pnpm build:ci-artifactspassed after rebasing. Startup JS measured 343,616 bytes locally against currentmain's 344,395-byte baseline plus the unchanged 1,056-byte variance tolerance.available > totalboth directly and when nested in an environment summary.node scripts/check-changed.mjspassed conflict, max-lines, assertion safety, dependency, format, dead-export, typecheck, core/UI/extension/script lint, native Swift lint, macOS app CI tests, schema guards, database-first guards, and runtime import-cycle checks.1/2→0/2transition.mainabsorbed the first exact-head Codex shard repair in fix(codex): inherit agent workspace instructions in native subagents #125783: the redundant two-attempt supervision replay now lives at the lifecycle owner that materializes and persists the frozen instruction binding. The exact 34-file shape passes 1,030 tests with two workers in 115.66 seconds, and the complete run-attempt file passes 143/143 in 67.62 seconds.testState.sessionConfigbefore the first filesystem await, preventing the shared Gateway from caching defaultdmScopefirst; the targeted case fails without that ordering and passes with it.0 < timeoutMs <= 30,000), uses the exact client-factory mock type, passes 16/16 repeatedly, and clears the extension test-type gate. Direct Codex source inspection confirmedapp-server --listen stdio://, v2thread/start/turn/start, and selected-environmentAGENTS.mdpropagation in../codex/codex-rs/app-server,app-server-transport,app-server-protocol, andexec.One slot available:
Full:
Transition video:
runner-slots-transition.webm
Sidebar menu remains clickable with session previews enabled: