Repository navigation
feat: make busy-session messages automatic with coherent security presets - #185477
Conversation
Queue blocked collaborative steering under its requester by default and retain explicit strict refusal. Keep automatic fallback quiet while preserving explicit-command and overflow notices. Co-authored-by: steipete <[email protected]>
Co-authored-by: steipete <[email protected]>
Exercise an isolated real-model Gateway with synthetic authenticated callers, queue lifecycle, policy revocation, cancellation, and cold-process recovery. Preserve native steering and cross-session tool gaps as visible failures; no product changes. Co-authored-by: steipete <[email protected]>
Hold foreground requests instead of preparatory completions, declare the real upstream relay schema capability, and assert exact history arguments under the original turn requester. Co-authored-by: steipete <[email protected]>
Exercise the omitted personal steering default, assert quiet handling at the live event boundary, and read canonical phase-aware text after a real cold restart. Co-authored-by: steipete <[email protected]>
…sets Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 1cf7e198-7ac4-4281-8edd-54b7b29aa24e
|
🦞👀 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. |
Co-authored-by: steipete <[email protected]>
Keep native-admitted runtime steering visible after the preparation snapshot excluded the still-live source. Preserve foreign transcript exclusion for unrelated queued work. Co-authored-by: steipete <[email protected]>
|
Codex review: needs maintainer review before merge. What this changesThis PR adds quiet requester-owned queue fallback and runtime-only personal and corporate security presets. Example: Alice is running a turn when Bob sends another message with collaborative steering disabled.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: the maintainer-directed change has concrete user value, the previous upgrade-proof gap is addressed, and no actionable introduced defect was found; current-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway and channel inputs enter the session controller, which selects steering or requester-owned queued execution; runtime configuration supplies defaults while existing execution and access owners enforce permissions. flowchart TD
A[Authored configuration] --> B[Runtime preset defaults]
C[Gateway or channel input] --> D[Session controller]
B --> D
D --> E[Compatible steering]
D --> F[Requester owned queue]
E --> G[Authorized model and tool execution]
F --> G
Technical reviewBest possible solution: Retain the existing queue and authority owners, apply presets only during runtime materialization, and land once the current-head gates pass. Do we have a high-confidence way to reproduce the issue? Current main’s source shows terminal refusal for blocked cross-requester steering; the submission supplies red/green regression results and real Gateway evidence, but this read-only review executed no target code. Is this the best way to solve the issue? The implementation uses existing queue custody and configuration materialization, removes the competing persisted-default writer, and preserves the established execution-authority owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b5fa1429870a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +39, Tests +1851, Docs +93, Generated 0, Other +1. Total +1984 across 56 files. Added test files: 4. View PR surface stats
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 HistoryReviewed October 27, 2026, 4:57 PM ET / 20:57 UTC (Revision 3). |
Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: ad75623d-88c0-4c81-a27e-e480695f9f5b
Retain the landed preparation adoption owner from #185381 rather than a competing identity-marker exception. Keep the distinct startup regression and preserve upstream Gateway diagnostics. Co-authored-by: steipete <[email protected]>
Co-authored-by: steipete <[email protected]>
Select fixture-owned containers by their unique configured prefix instead of a raw session label; record sanitized observed effects and keep the host sentinel credential-free. Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 0b21aa12-3c8a-4bce-9308-078b9d13f869
Replace the stalled in-process collection route with the standard built-CLI Gateway owner and normal authenticated client. Keep all effect assertions, shutdown ownership, and security controls; use an isolated canonical client credential path. Co-authored-by: steipete <[email protected]>
Use the real wizard delta-writer contract rather than treating materialized defaults as authored source. Keep activation-error identity and provider restoration assertions, and assert preset projections never reach disk. The config size-drop guard is unchanged. Co-authored-by: steipete <[email protected]> Co-authored-by: joshavant <[email protected]>
Remove unused session record metadata from the sandbox policy fixture; retain required sandbox and node eligibility assertions. Co-authored-by: steipete <[email protected]> Co-authored-by: joshavant <[email protected]>
Keep authored steering absent while asserting personal runtime defaults; refresh the approved schema leaf. Compare JSON source against runtime without treating undefined normalization keys as authored data, preserving exact persisted-output oracles. Scope retirement fixture cleanup to its state directory and retain full refusal diagnostics without weakening safety. Co-authored-by: steipete <[email protected]> Co-authored-by: joshavant <[email protected]>
|
Merged via squash.
|
…curity preset OpenClaw's new security.preset (default personal, openclaw/openclaw#185477) fills messages.queue.allowCollaborativeSteering with true and tools.exec.applyPatch.workspaceOnly with false when a configuration leaves them unset. Deployment admission now sets the earlier values, false and true, in the AgentRevision document every Compute Driver renders, for embedded and dedicated Gateways alike. An explicit value in the Configuration is kept; a non-boolean value or a non-object on the path is refused with the setting's name. collaborativeSteeringFallback stays unset (upstream's default with steering off is queue). Revisions deployed before this change keep their immutable document until the Agent is deployed again; the breaking-change notice says so.
…sets (openclaw#185477) * fix: handle busy-session messages without queue notices Queue blocked collaborative steering under its requester by default and retain explicit strict refusal. Keep automatic fallback quiet while preserving explicit-command and overflow notices. Co-authored-by: steipete <[email protected]> * feat: align personal and corporate security defaults Co-authored-by: steipete <[email protected]> * test(gateway): add live quiet-steering authority proof Exercise an isolated real-model Gateway with synthetic authenticated callers, queue lifecycle, policy revocation, cancellation, and cold-process recovery. Preserve native steering and cross-session tool gaps as visible failures; no product changes. Co-authored-by: steipete <[email protected]> * test(gateway): bind steering authority proof to real turns Hold foreground requests instead of preparatory completions, declare the real upstream relay schema capability, and assert exact history arguments under the original turn requester. Co-authored-by: steipete <[email protected]> * test: verify default collaboration and recovered final replies Exercise the omitted personal steering default, assert quiet handling at the live event boundary, and read canonical phase-aware text after a real cold restart. Co-authored-by: steipete <[email protected]> * feat: make busy-session messages automatic with coherent security presets Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 1cf7e198-7ac4-4281-8edd-54b7b29aa24e * test(gateway): prove input arriving during preparation Co-authored-by: steipete <[email protected]> * fix(agents): retain steering accepted during preparation Keep native-admitted runtime steering visible after the preparation snapshot excluded the still-live source. Preserve foreign transcript exclusion for unrelated queued work. Co-authored-by: steipete <[email protected]> * docs: distinguish quiet steering fallback from strict refusal Co-authored-by: steipete <[email protected]> * Publish openclaw/steer-queue-security-presets Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: ad75623d-88c0-4c81-a27e-e480695f9f5b * test(security): add opt-in corporate Docker effect acceptance Co-authored-by: steipete <[email protected]> * test: scope corporate effect cleanup and receipts Select fixture-owned containers by their unique configured prefix instead of a raw session label; record sanitized observed effects and keep the host sentinel credential-free. Co-authored-by: steipete <[email protected]> * Publish openclaw/steer-queue-security-presets Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 0b21aa12-3c8a-4bce-9308-078b9d13f869 * test: isolate corporate effects behind a supervised Gateway Replace the stalled in-process collection route with the standard built-CLI Gateway owner and normal authenticated client. Keep all effect assertions, shutdown ownership, and security controls; use an isolated canonical client credential path. Co-authored-by: steipete <[email protected]> * Publish openclaw/steer-queue-security-presets Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 60ca97c0-97b3-4cf0-b091-f38fec8fe2eb * Publish openclaw/steer-queue-security-presets Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: b8a799c0-1a31-4bdd-b936-36de687a3d81 * test: use native state lifecycle for corporate effects proof Co-authored-by: steipete <[email protected]> * Publish openclaw/steer-queue-security-presets Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: d33406ad-a84c-4e33-b27c-6f34c93b564a * test(gateway): qualify corporate effects with native Podman Co-authored-by: steipete <[email protected]> (cherry picked from commit 75bb800cd7360e793aab4b586f4f029e0ed03ac6) * test: qualify corporate provider transport and refusal boundary Preserve external proxy enforcement while permitting the owned loopback provider, report bounded synthetic Gateway diagnostics, and assert host rejection at the public schema boundary. Actual Podman-backed Gateway effects pass with network-none, read-only root, init, dropped capabilities and no-new-privileges intact. Co-authored-by: steipete <[email protected]> * fix(test): align preset proof inventories and budget Keep the corporate fixture in canonical lexical order and include its config materialization dependency in trusted wrapper extraction. Reserve the exact local test-line count for the real Gateway/model authority, preparation, FIFO, cancellation and restart regressions plus corporate sandbox effects; preserve assertions and ratchet enforcement. Co-authored-by: steipete <[email protected]> Co-authored-by: joshavant <[email protected]> * test(wizard): preserve runtime merge base in recovery proof Use the real wizard delta-writer contract rather than treating materialized defaults as authored source. Keep activation-error identity and provider restoration assertions, and assert preset projections never reach disk. The config size-drop guard is unchanged. Co-authored-by: steipete <[email protected]> Co-authored-by: joshavant <[email protected]> * test(config): match execution session defaults contract Remove unused session record metadata from the sandbox policy fixture; retain required sandbox and node eligibility assertions. Co-authored-by: steipete <[email protected]> Co-authored-by: joshavant <[email protected]> * test(config): align preset consumer proof with runtime defaults Keep authored steering absent while asserting personal runtime defaults; refresh the approved schema leaf. Compare JSON source against runtime without treating undefined normalization keys as authored data, preserving exact persisted-output oracles. Scope retirement fixture cleanup to its state directory and retain full refusal diagnostics without weakening safety. Co-authored-by: steipete <[email protected]> Co-authored-by: joshavant <[email protected]> --------- Co-authored-by: steipete <[email protected]> Co-authored-by: joshavant <[email protected]>
Release adaptation: frozen candidate C=df22eeb1f74e935ab3d7877742a1332779cdb1b6. Extract only the five-hunk container-upgrade fixture repair from #185477: four stateDir-scoped cleanup calls and failure diagnostics. Do not import the broad security-preset change or alter production verification, retirement, or maintenance-lock code. Main-origin: 25da76e Reviewed-patch: doctor-fixture-backport.patch Reviewed-patch-SHA256: 638e81106c56864fd9d2fe8ce0eb96b1c0da39bf57ddc55bcbd550876d6ac049 The independently reviewed input patch bytes are unchanged. C-relative-diff-SHA256: 66af7be0c25c4235e9877d7de35e6dfb2264a69e3b099e024e749b477ee944c2 The exact upstream five-hunk patch applies at C offsets. Its C-relative serialization differs only in blob IDs and hunk line positions, not hunk contents; unrelated scoped-migration fixture changes remain excluded. Reviewed-patch-id: f15807af47be8219bc0976eb007d2df1be528f04 Proof: Controlled original-entrypoint schedule failed twice on C and passed with the repair. Final container-upgrade and retirement-mutation selection: 22 passed. Independent exact upstream-file review found no blocking code findings; precise incidental original-CI interleaving remains unproven. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 65a742bd518b663c3bcc0e2777de442416699127)
Align requester-provenance and incumbent-cancellation fixtures with the automatic fallback contract introduced by #185477. Retain explicit followup acknowledgments, refusal, FIFO, authority and effect assertions. Source-test typecheck and scoped lint/format pass. Local runtime proof is blocked before assertions by synthetic-provider connectivity; FRV confirmation remains required. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Related: #184846, #185381
What Problem This Solves
Busy-session messages can be refused or require a manual
/followupresend, while execution and steering defaults express inconsistent trust assumptions.User Impact
Default-personal messages steer when compatible and otherwise queue quietly for a requester-owned turn, without automatic queue-status spam or a resend requirement. Explicit strict rejection remains available.
security.preset: "personal" | "corporate"supplies coherent defaults across sandboxing, approvals, managed files, steering, conversation reach, and DM routing. Personal is the default trusted-operator/full-access posture; corporate selects session sandboxes and stricter steering/reach defaults. Explicit source and agent/session settings retain precedence; mandatory host, role, access, and approval floors are never granted or bypassed.Tradeoffs: collaboration retains incumbent execution authority—not a permission intersection or causal tool attribution. Shared history remains shared. Corporate is configurable, not compliance certification or hostile-tenant isolation; sandbox networking does not cover every host tool/plugin/browser request.
Why This Change Was Made
Reuse the existing requester-owned queue instead of dropping input. Expand presets only at runtime configuration materialization, removing the competing persisted steering-default writer from Doctor and fresh configuration paths.
Existing explicit steering booleans, including older Doctor-persisted values, remain unchanged; unset an override to follow the preset. Runtime expansions are not persisted as authored settings. Corporate changes future DM routing keys without deleting or moving prior history. No live configuration, identity grants, public shares, authentication, or deployment is changed.
The documentation compares primary sources for Claude Code, Codex, Copilot CLI, Cursor, Gemini CLI, and OpenCode, distinguishing approval UX, isolation, and managed policy floors.
Credit: @obviyus identified the dropped-message workflow and proposed automatic queue fallback in #184846. This work adds quiet handling, explicit strict refusal, and the broader defaults requested by @steipete. It retains @jalehman’s landed attempt-scoped preparation/adoption owner from #185381 rather than maintaining our competing identity-only exception; the distinct before-first-call regression remains.
Work sessions
Evidence
Final exact-head CI: run 40593828075 completed successfully on
1a0dc494d4df16cef583b0ca6a175b6aec58a1cc, including the aggregate CI gate, security-fast, selected test shards, production/test typechecks, lint and baseline ratchets. All 105 successful check/status observations, 57 intentional skips and one neutral CodeQL observation had no pending or failed entries at final inspection. Native completed-hosted-gate preparation passed. Historical failure/uncertainty descriptions below remain historical; no original-cause claim is inferred merely from a passing replay.Queue regression was red on the original runtime and green with the fix. The latest focused refresh passed 44 tests, core/proof typechecks, and targeted lint/format. Earlier broader verification passed 396 cases, including 13 prefix-stability cases, on its recorded source.
Production
953fde68: runtime build and one complete real isolated Gateway run withopenai/gpt-5.4passed all 12 scenarios: preparation-time and solo steering, three-principal identical/varied FIFO, quiet delivery, both directions of queued/collaborative tool authority, revocation before provider I/O, cancellation, strict rejection, and genuine cold-process recovery retaining sender identity. Owned processes/state were cleaned; no real-home credential files were staged.Real corporate Gateway → scripted provider → native Podman → tools → agent.wait/history acceptance passed (54.47s). Workspace write/read and Python execution succeeded. Tool and process attempts could not read/write the host sentinel; the host process was not visible; the sandbox could not reach the host HTTP positive control. Gateway-host override and elevation were refused despite
ask:"off", with no host effect. Actual container inspection confirmed network-none, read-only root, init, keep-id, no-new-privileges, and zero effective/bounding capabilities. Task-owned container inventory was empty after cleanup. This is real tool/container execution with a scripted provider, not live model inference.Final
2779493adiffers from tested production953fde68only in that test fixture; production/dependency inputs are unchanged. The fixture repair resolves its absent marker directory, child-exit wait, Unix-socket temp-path prerequisite, and scoped loopback proxy transport. External proxy enforcement and sandbox controls remain intact. Host override is asserted at its actual public-schema rejection boundary, not an unreachable backend error.Independent local Codex autoreview: full feature snapshot versus pinned main
d45ff6de, then complete953fde68→ final test-fix snapshot, P0/P1 scoped-clean. Static review is not execution proof. Local ClawSweeper was unavailable. The earlier hosted re-review finished; its latest-stable freshness gap is addressed below. The complete refreshed candidate624d0620versus maina189175apassed another canonical local Codex autoreview at P0/P1 (scoped-clean, static only). Enforced current-head CI/security/review gates remain required before merge.On candidate
ea86851, real published stable2026.10.7configuration/history survived Doctor/read/start upgrade: state/agent schemas 20→34 / 25→37; original trajectory bytes and authored settings preserved. Preset switching and ordinary writes did not persist runtime projections. Stable rejects the newer steering key, so explicit false/true cases are synthetic compatibility overrides over genuine stable-produced state. A real personal-default model turn executed a synthetic command; a subsequent real attempt under a task-owned host-deny floor was refused.Latest-stable refresh: real published 2026.10.8 (
dc2523e5) produced configuration and a completed synthetic model history. Tested production runtime953fde68then passed normal Doctor/read/write, preset switching/unset, and cold Gatewayconfig.get/history/HTTP readiness. All 12 original transcript and 15 trajectory payload rows stayed identical; public trajectory exports were byte-identical. State/agent schemas migrated 20→35 / 25→37. Runtime preset projections remained unpersisted; startup/read left config bytes unchanged. The existing canonical Doctor retirement converted an explicitly disabled legacy heartbeat into a verified disabled automation; ordinary metadata changes are enumerated in the linked verification session. All 27,072 dist-file fingerprints remained unchanged, and owned Gateway exit/port cleanup passed. This is installed-state proof, not package-swap/service activation; earlier personal-exec/deny proof is retained, not newly executed.CI repair: run 40575895744 exposed unsorted fixture ownership (8 assertions), an omitted wrapper extraction dependency (2 assertions), and the test-line budget. The repaired two suites pass 39/39; no assertion was weakened.
security-presets.tsis now in the trusted extraction inventory, and fixture membership is unchanged. Final signed candidate624d0620incorporates maina189175a; only the competing scalar budget needed a conflict resolution. Earlier-head CI is not claimed as current-head proof.Test-budget justification: retain the distinct real Gateway/model authority, preparation-time admission, FIFO, cancellation, strict refusal and restart regressions, plus actual sandbox-effect and runtime-preset ownership coverage, rather than delete unrelated tests or weaken boundaries. The final ceiling is 6,288,829 = main 6,287,068 + 1,761 net feature test lines. The unchanged ratchet passes at 6,287,512 lines, retaining existing main slack. This is a scoped, counted allowance, not a blanket baseline exception.
Final test-only follow-up
7017ce08: current-head CI exposed a wizard recovery fixture that fed runtime-expanded defaults to a bare authored-source writer. The real wizard already supplies its captured runtime merge base. The fixture now uses that same contract, retains its error-identity/provider-restoration oracles, and additionally asserts that preset/tool/queue projections never reach disk. Local reproduction failed 1/7 before; fixed 7/7 plus targeted typecheck/lint/format pass. Independent diagnosis and canonical local Codex P0/P1 review agree (scoped-clean, static). Production and rollback size protection are unchanged. Test-line total is now 6,287,521, below the unchanged 6,288,829 ceiling. Hosted review of624d0620found no introduced defects and accepted the updated authority/upgrade evidence; this test-only correction has its own local review.Complete consumer repair batch
1a0dc494: the full previous CI run identified stale Doctor persisted-default expectations, an unrefreshed common-schema leaf snapshot, excess execution-session fixture fields, and an include-fixture precondition that treated undefined normalization-only properties as authored JSON. These are corrected without production changes. Explicit steering overrides, included file bytes, strict saved-agent output, config safety and sandbox assertions remain checked. Preset suite 8/8, full config/CLI test typecheck, and all four affected consumer suites 127/127 passed; after the final edits, include-write 103/103 and container-upgrade 4/4 passed again. Targeted typecheck/lint/format and full-batch independent Codex P0/P1 review passed. Final test-line count 6,287,519 remains below the unchanged ceiling.Investigated uncertainty: previous CI returned
blockedduring recovery-artifact retirement without printing its reason. The unchanged four-case suite passed locally; that replay is not claimed as a fix. Source inspection found four intended offline-transition cleanup calls omitted the fixture state directory and therefore drained queues without closing its database handles. Those calls now use the existing scoped cleanup owner; the unchanged retirement assertion prints full failure details. Final four-case proof passes, but the original CI refusal cause remains unproven. No retirement safeguard was relaxed. The unrelated prior UI lint errors were in unchanged baseline files and are already repaired on main; current-head CI remains authoritative.For actual
sessions_historycalls with the default requester and no explicit participant selector:These are execution-authority results, not causal attribution to individual messages. Explicit admitted-participant selectors retain their existing authorization contract.
Limits: the existing Podman backend was explicitly selected for corporate effects on this host; Docker remains the fixture/default backend but was not positively executed here. Upgrade proof covers installed-state Doctor/read/start, not package-swap/service activation; native watcher delivery and every channel
allowFromrevocation during drain are not qualified. Prior-source proof is identified above and is not relabeled as current-head CI. No merge, deployment, operator-state change, or real-home credential staging is claimed by this body.Worked on by