Repository navigation
feat(workers): require configured worker placement for sessions - #158903
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR automatically applies configured required-worker placement to session creation, turn execution, and Control UI recovery. Example: With requiredProfile set to dedicated-native, a session writer submits “Inspect the workspace.”
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it completes maintainer-approved required-worker activation that current main's merged prerequisites do not provide. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherAuthenticated session requests and channel turns enter Gateway admission; existing session, workspace, and placement owners prepare and authorize execution on the configured worker. flowchart LR
A[Session request or channel turn] --> B[Gateway authorization]
B --> C[Session and workspace owner]
C --> D[Required placement admission]
D --> E[Configured worker]
E --> F[Model response and session settlement]
Technical reviewBest possible solution: Land the accepted activation through the existing placement owners after the remaining sidebar CI failure is attributed. Do we have a high-confidence way to reproduce the issue? This is accepted feature activation; source comparison confirms current main supplies preparation primitives but lacks ordinary-create and turn-provider activation. Is this the best way to solve the issue? The implementation uses the existing session, workspace, authorization, and placement owners, preserves default-off behavior, and retains explicit unsent draft choices. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against efa552b9cef8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (72 earlier review cycles; latest 8 shown)
Reviewed October 10, 2026, 1:07 AM ET / 05:07 UTC (Revision 73). |
|
🦞👀 Re-review progress:
|
|
Exact-head follow-through: Hosted CI 37831762038 tested merge
The PR body contains the current proof and gaps. This is not green CI or a merge-ready claim. No merge/automerge; the human compatibility-before-merge checkpoint remains. |
|
@clawsweeper re-review Published feedback repairs at
The updated body records pinned source trees, original red proof, timings, platform/tooling gaps, and inherited failures. New-head hosted CI and fresh ClawSweeper results remain authoritative. |
|
🦞👀 Re-review progress:
|
Co-authored-by: sallyom <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper re-review Fixed revision 65's saved-choice regression at
New-head CI and your exact-head review remain authoritative; no new rating or hosted-CI success is claimed. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review exact head Review only; no merge or automerge requested. |
|
🦞👀 Re-review progress:
|
Integrate the PR with the pinned remote main revision. Create private node state directories explicitly and select synthetic operator prompts across trailing runtime context, while enforcing the expected native request order.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Activates the existing
cloudWorkers.requiredProfilepolicy through ordinary session creation, first-message handoff, and Control UI recovery, without requiring manual placement privileges. Unset policy preserves optional/local behavior.User Impact
Required-worker preparation, Retry/Stop, and first-message handoff use the existing placement owners. Failures retain unsent text and attachments. Cold Send waits for required profiles and submits once. Required drafts survive a released Control UI opening in the same tab.
Committed empty-session creation survives transport disconnect; writer-scope or required-profile revocation still prevents worker setup.
ClawSweeper Feedback Repairs
Candidate:
27fe0d23c994e10742223d938582138c1c412116; source tree99b4b75517236e3f24fb29e4dbcdfc6e0160a903.5b4fb7292031dc3695a6fae10fd044814c5d3ca4introduced helper/prepared-result changes; later pinned main7d18cafe121a373f81c4de2380e29a1aa84037e7introduced prepared local-placement/session-reader changes. Preserve these optimizations together with required-session admission and live policy checks. Release prepared leases before the live claim transaction and on failures/early returns. The two teardown fixtures and local-admission tests now match main. Resolved owner/test bytes match the fresh reviewed candidate; merge-tree against pinned main is clean.Evidence
Follow-up CI repair — October 9, 2026
Current head:
7932d7e5788dee3c1299d814f86c6f581ffd7e17. Repairs the two failed browser cases and shared Swift dead-code finding from head59a42d4b2791f9e8eb40b14b9920f9b06dee5998; the failed CI gate was their aggregate.47918995a7fd849e2d4b7a43197b7b87ab330897, with main base9948a4b83404b2e969593aa072b932735c1d2cfe. Both browser failures reproduce on that clean base and the integrated PR: 2 failed / 9 passed, 90.81s and 93.58s Vitest wall respectively. The clean integration commit has exactly the tested merge tree.@testableboundary. No scanner exclusions, baseline changes, or runtime behavior changes.--maxWorkers=1, 91.77s Vitest wall. No added tests, waits, timeout increases, or configuration changes.pnpm test:macos:ci. The planner stopped because pinned SwiftLint was absent from its PATH; its exact app-lint command passes separately with the installed 0.65.1 tool, zero violations across all configured scopes. Both remaining planner commands were completed separately. No gates skipped.CI repair — October 9, 2026
Current candidate:
dc456de153644c4bac51dd90a4a9ad3a95fa5bef. Conflict-free integration of pinned mainc40ca82d07a490da257e045fe7ae06f32ef320c8, plus a two-test assertion repair. No new runtime policy, configuration, schema, dependency, timeout, or baseline change in the repair.Failed CI run 37993450619 actually tested merge
832a55fa70b3a213a38f817cec5cd3f85aec803d(headfe5652fa1845361f32fe2dfeb1c6667f20b70ef6, main05464f1c2e3dff0bc8d07b05630849e7bd137b2a). Main's97ead0272faaddedtoolResultMaxChars: 2000to delivery-check history requests; two exact browser expectations omitted it. Both fail deterministically on the integrated owner. The repair includes that field without weakening session/run identity, attachment, or no-replay checks.Workboard asset drift was inherited from main's browser refactor
bd1a35b7114(refactor: deslop provider and Discord leftovers #167917), which did not regenerate its manifest. PR runtime/builder inputs are unchanged versus the tested main. Upstreamc40ca82d07afixes the generated pointer; its matching source and manifest are incorporated together. Canonicalplugins:assets:checknow passes.All 12 bundled-browser cases pass across cloud-startup, cloud-startup recovery, and configured-defaults suites; 40.15s Vitest wall with one worker. File case totals: 3/3 (4.81s), 6/6 (9.89s), 3/3 (10.63s). Existing browsers retain text/attachments, reconcile exact delivery without replay, and preserve required draft choices. No new tests or timer/process boots. Original failing hosted shards took 425.29s and 369.96s; new-head CI completed with the distinct worker-test failure recorded below.
All 145 owner tests pass across six model-control/required-placement/startup/submission/metadata suites; 8.23s Vitest / 9.35s wrapper wall.
All 47 planned candidate checks finished: 46 pass / one inherited main failure. Both production type lanes and all 31 test type graphs pass, as do formatting, source/script/QA lint, all export scans, schema guards, database/sidecar ownership, import-cycle, auth, and webhook checks. The canonical changed gate stopped at deprecated config API usage in
src/gateway/server-methods/agents.ts(direct import at line 69, introduced by mainc26d9db0c6273bb24aff4e7ccbe576c0e276dbcc); that file, its domain mutation helper, and both guard modules are byte-identical to pinned main. All 20 subsequent planned commands were then run explicitly and pass. No guard exclusions or baseline changes.Fresh independent P0–P2 autoreview of the assertion repair is scoped-clean. Repair production delta: zero. Test delta: +7/-1 lines. Main integration changes stay upstream changes, not new PR design.
Exact-head hosted CI completed red: run 37999005948, attempt 1 tested
dc456de153644c4bac51dd90a4a9ad3a95fa5bef. The sole failed leaf ischecks-node-changed-5; its skill-library worker E2E rejects replacement-workerchat.sendafter abort/agent.waitwithSessionEntryChangedDuringReadError(skill-library-worker-wire.e2e.test.ts:564, request assertion at line 169). The aggregate CI gate consequently fails. The test itself took 64.30s; the five-target shard took 659.90s. This is distinct from the repaired compact-history assertions and Workboard asset drift, whose hosted lanes now pass.The failure's attribution remains unresolved: the ordered session-read owner can reject a raced native handle/revision, and post-abort settlement can still be publishing. Those owners and the cancellation algorithm are unchanged versus pinned main, but this PR's admission wrapper can affect timing, so unchanged source is not claimed as inherited-failure proof. The isolated local replay on this exact head was planned for all five original shard targets in the original order. Runtime preparation completed (22m38s main build, 102.7s AI build, 58.9s worker-artifact preparation), and the first lifecycle file reached Vitest. The runner subsequently ended without a file summary or terminal shard-completion record; its termination cause is unconfirmed. The remaining four files, including the failing skill-library test, did not start. This incomplete replay neither reproduces nor disproves the CI failure. No passing-replay/fix claim, CI rerun, or speculative runtime edit.
Exact-head ClawSweeper re-review workflow completed successfully. This records workflow completion, not a new quality rating or CI clearance.
Earlier head-bound receipts remain historical. GitHub currently records auto-merge enabled at 2026-10-09T22:35:59Z; the exact-head CI failure and unresolved attribution above remain unchanged. This evidence update did not enable or disable auto-merge.
Saved draft choices — October 9, 2026
Saved-draft repair head:
fe5652fa1845361f32fe2dfeb1c6667f20b70ef6(three-file delta fromf54469540415f3c727896ae89a49ddd4d3f18419). Addresses revision 65's P1 explicit-choice reload finding and its stored-data/original-intent checkpoints.Required placement suppresses remembered defaults, not permitted explicit choices belonging to an unsent draft. Restoring a saved choice now survives both immediate required policy and policy hydration after restoration. Fresh drafts still use configured defaults; submitted draft choices retire normally. Matching-agent and current catalog/model-policy reconciliation remain intact. No schema, serialized draft format, permissions, or new config changes.
loweffort becomes the configured default. The red browser reached the restored text/attachment draft before the failed effort assertion.model-control.test.tsandrequired-placement.test.ts(node scripts/run-vitest.mjs <both files> --maxWorkers=1, 5.46s Vitest / 6.39s wrapper wall). The unit extension separately protects the policy-hydration race; browser proof owns persistence/reload.node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/new-session-page.configured-defaults.e2e.test.ts --maxWorkers=1, 24.23s Vitest wall). The existing legacy-row fixture still loads text and attachment bytes; reload preserves the explicit allowed model/reasoning and unsent text; actual requiredsessions.sendcarries the attachment bytes. Submission retires the draft and fresh page/palette starts use configured defaults. Mock-Gateway browser boundary proof, not new live worker proof.git diff --checkpasses.sessions.send, and the final regression asserts that transport rather thansessions.create.Hosted CI on that head failed in two compact-history request assertions and inherited Workboard asset drift; the CI repair above addresses both. ClawSweeper revision 66 reviewed that exact head platinum (4/6) with no findings. Earlier receipts below stay historical and bound to their named heads. No merge or automerge requested.
Final original-order RPC replay: 93 passed / one existing platform skip across 18 files, 366.76s Vitest. The skip is IPv4 alias binding (
127.0.0.2unavailable on this host), not the repaired case. Disconnect plus scope/profile revocation all pass.Final focused/routing/worker-turn replay: 132 tests across eight files, 492.92s wrapper (the six gateway-owner files: 96 tests, 423.28s Vitest).
Final UI replay: 77 tests across four files, 15.50s Vitest / 16.39s wrapper. Browser retirement fixtures: 15 tests across two files, 34.49s Vitest,
--maxWorkers=1.Total: 317 passing tests across 32 file-runs, plus one existing platform skip. Standalone changed RPC file:
pnpm test src/gateway/server.required-placement-scopes.test.ts --maxWorkers=1, 3/3 pass, 34.73s Vitest / 38.77s command wall. Hosted CI seconds are not yet available.All 29 core/UI/test type graphs pass on this final head, using the owner's supported four-graph concurrency.
All 35 canonical non-type checks from the pinned-base changed plan ran: 33 pass. Dead-export and full-core lint failures are inherited: four flagged export definitions and every referencing file match pinned main; all 12 max-lines files also match main. No scanner exclusions, baselines, suppressions, or guard bypasses were added. Script lint, formatting, ratchets, config docs, SDK/plugin boundaries, coercion, database/sidecar ownership, auth/webhook checks, and import cycles pass.
Fresh independent P0–P2 reviews are scoped-clean for the feedback repair, both owner integrations, and fixture alignment.
Original failure proof: the original ordered RPC replay failed before setup (
Gateway requester authority changed; 16 passed/one failed). The deterministic post-ACK test also failed on original production (two passed/one failed; 83.50s Vitest / 89.67s wrapper). Initial local repaired runs timed out on RPC; their cause was not established. Isolated Testbox replay exposed a stale one-call expectation; the regression now requires both setup calls. Prior integrated replay passed 300 tests across 30 files on tree83506f3b839855254113e71765413c45862fcb30(execution); that is prior-head evidence.Main's four prepared-local-admission cases fail on the pre-alignment candidate (three failed/one passed; 94.41s Vitest). Final focused replay includes them. Final Testbox replay stayed pending over ten minutes and was stopped without starting; local replay replaces it. Its first compilation rejected the stop operation's new lease-receipt namespace before any test ran; the receipt was settled before retry. No compiler guard was bypassed.
Historical feature proof: actual v2026.9.8 released-reader enumeration/scope clear deletes the pre-isolation required draft, but preserves the separate required namespace with text, attachments, and creation parameters; optional recovery keeps released behavior. Promotion/migration/retirement pass. Cold Send has original-flow red/green evidence and final UI replay. Accepted live proof and inspected screenshots cover Gateway → physical node → worker-local inference → SQLite settlement; they are historical, not fresh packaged-worker/model or screenshot proof on this head. This repair has no intended visual change. Local/Testbox wall times are not hosted PR-CI seconds.
Compatibility and Upgrade Impact
No PR database schema, new environment variable, or additional config setting. Existing configurations require no migration. Required recovery uses a separate namespace; optional recovery is unchanged. Configured required placement intentionally blocks execution when the worker is unavailable, including existing sessions, as accepted. Remove
requiredProfilebefore downgrading to v2026.9.8/v2026.9.9 or another strict-schema Gateway predating it.Hosted CI and Known Gaps
Prior-head CI tested
f8386bc7df0a6c9eda7a28ae81943c5c06a414ffthrough mergee47bb4497dfaa6e377b1b93ac296edc9848ddba8with five failed leaf jobs: disconnect, three newer-main bootstrap/roster fixture mismatches, and unresolved login-gate mounting. Routing and draft-teardown repairs passed. Earlier Escape did not reproduce and later passed; no specific fix is claimed. Separate localmodel-setup-cancel.e2e.test.ts:351replacement-cancellation failure remains unexplained. No unrelated repair or new-head hosted-CI claim.Prior-head ClawSweeper revision 63 rated readiness gold 3/6, proof platinum 4/6, quality gold 3/6. Fresh exact-head re-review is requested; no new rating is claimed.
Original contributor credit retained for @sallyom, @steipete, and @RomneyDa. Open/non-draft; no merge or automerge requested.
Current Main Rebase — October 9, 2026
Integrated candidate (before the saved-draft repair):
f54469540415f3c727896ae89a49ddd4d3f18419; treeaf6080d457130a75c913ad9f1dc63d975053dca7.Rebased source
27fe0d23c994e10742223d938582138c1c412116onto pinned main3e90389813229bd33c169fb07b883b567847224e, which contains the merged placement prerequisite. The first seven PR commits—including the earlier authored merge—remain unchanged; only the final integration merge was recreated. Dallin's original author, author date, and message are preserved, with contributor trailers retained/added. All 88 feature paths remain; no old feature reconstruction or merged prerequisite replay.The integration preserves main's prepared session-source/foreign-writer checks together with the retained caller capture through full dispatch cleanup. It also retains the authored prepared-local-admission resolution, main's cohort-reader import, both sets of preparation tests, and the current separate required-recovery namespace. The only additional test edit makes a failed create acknowledgment report its actual error; assertions are unchanged.
Fresh proof on this candidate:
Gateway requester authority changedand zero setup calls (71.49s wrapper). The combined composed-and-bound policy passes that unchanged regression, including both setup entry points and the revocation-denial cases.git diff --checkpasses. A separate read-only preview against forward mainaffd282dba168daeb165f29b8c4bf76267c4023cis conflict-free; the tested main pin was not chased.Initial local probes encountered stale task-local dependencies (
fs-safe0.24.2 versus pinned 0.25.0); a frozen-lockfile install restored the declared inputs before the valid red/green and final proof above. Those initial failures are not product-failure or passing-test claims.Earlier evidence and hosted-CI gaps above remain historical and bound to their named revisions. No new full build, physical-worker/model execution, visual capture, or hosted-CI success is claimed for this bounded rebase. No merge, readiness, assignment, or auto-merge change.
Requested Parent Rebase — October 9, 2026
Rebased published head
dc456de153644c4bac51dd90a4a9ad3a95fa5befonto pinned current mainced267e8575408b8d87a2d66d4e1b731b7da7ec9, preserving the authored feature history and earlier integration resolutions. New head:0facb24671c92743794395216f23f2ef1d64c599; tree:87abb7ed388f1eca51564e6815604b65b271dd20.git diff --checkpasses.dc456de1536commit. No feature production change or new tests.Latest CI and ClawSweeper Follow-through — October 9, 2026
Published the prepared native fixture repair at
b298fb06a94916188b89462a468ff671c70849b8, then repaired the latest default-policy draft-choice finding at59a42d4b2791f9e8eb40b14b9920f9b06dee5998.Required placement already selects configured fresh defaults regardless of the separate UI setting. Draft persistence, restoration, mutation tracking, and retirement now consume that same effective model policy. Explicit allowed model/reasoning choices survive reload with the unsent draft when the UI setting is omitted, "last-used", or "configured"; accepted submission retires them so fresh page/palette drafts still use configured defaults. No storage-format, config, permission, or intended visual change.
undefinedinstead oflow).sessions.send, and retirement. Command:node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/new-session-page.configured-defaults.e2e.test.ts --maxWorkers=1; 84.48s Vitest wall, including production bundle setup; test time 38.25s. Hosted CI seconds pending. This is mock-Gateway browser boundary proof.b298fb06a949: nine selected test type graphs, production UI types, all three export scans, targeted lint/style, formatting, and ownership/dependency ratchets.git diff --checkpasses.b298fb06a949public-RPC Linux proof passed all four same-session pairs/eight native replies (94.76s shard wall); that remains prior-head proof for the unchanged native contract.SessionEntryChangedDuringReadErrordid not reproduce in the original ordered Linux shard or focused replay. Attribution remains unresolved; no production fix or passing-replay-as-fix claim.0facb24671c9Swift dead-code check flagged two DEBUG methods in OpenClawKit sources unchanged from main; no Swift repair or current-head hosted-CI success is claimed.The new remote head and its hosted CI are authoritative. No merge or auto-merge requested.
Landing Qualification — October 10, 2026
Prepared head remains 7932d7e; no new rebase, source edit, or CI rerun. The native preparation records GitHub gates pending, not successful proof.
Exact-head CI 38025390362, attempt 1, completed with two failed leaves and their failed aggregate. Both job logs identify tested merge 1ed9ff9994518d3afec526df2ff872d3653bb877 (main base 9decc99 plus this head):
The tested merge tree was reconstructed from its parents, and 18 named source blob/tree inputs were verified identical between tested main and merge, including the complete plugin tree, relevant menu owners/tests, dependencies, and workflow. Inspected causal owner changes—not equality alone—qualify the failures. This is source-qualified inherited-failure evidence, not a separately executed baseline run or green CI claim. Security-fast passed independently; all remaining CI jobs completed successfully or were skipped, with no cancelled/timed-out jobs.
The exact-head native review retains tests.result=fail with this attribution. Landing uses the native pre-existing-failure admission; its live CI, security, review, policy, and authority checks remain mandatory. Earlier head-bound evidence and unresolved historical disclosures above remain intact. No unrelated main repair, scanner exclusion, weakened assertion, or baseline change was made.