Repository navigation
fix(sessions): preserve requester identity at execution admission - #157806
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 preserves authenticated requester identity through delegation, queued execution, and recovery, with opt-in collaborative steering and explicit followup behavior. Example: Alice selects accepted participant Bob for a queued child execution.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-owned repair remains useful, and the updated evidence addresses the previous authority and upgrade blockers; integration validation remains outstanding. Priority: P1 Before merge
FindingsNone. Agent review detailsHow this fits togetherAuthenticated channel and Gateway inputs enter the admission owners, which carry requester facts into queued, delegated, and recovered executions; existing tool and transport owners enforce authority before effects. flowchart TD
A[Authenticated input] --> B[Requester capture]
B --> C[Execution admission]
C --> D[Queue and recovery custody]
D --> C
C --> E[Delegated execution]
E --> F[Current authority checks]
F --> G[Tool and transport effects]
C --> H[Audit receipts]
Technical reviewBest possible solution: Retain the existing admission and custody owners, preserve the accepted requester contract, and complete integration validation without weakening authority checks. Do we have a high-confidence way to reproduce the issue? Current-main policy resolution consumes persisted delegated projections without this PR’s preserved requester-origin admission path; source inspection and the supplied source-bound behavior reports establish the affected boundary, without executing target code during this review. Is this the best way to solve the issue? The inspected implementation uses the existing requester-policy, participant-selection, transcript-custody, and recovery owners, preserves intentional delegation, and supplies the missing final-effect and upgrade evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 806ea5812ccb. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
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 (32 earlier review cycles; latest 8 shown)
Reviewed October 18, 2026, 5:52 PM ET / 21:52 UTC (Revision 33). |
|
|
The inherited plugin-installation UI failure has a deterministic browser reproduction. After a failed retry saved installation state, a completed catalog refresh recreated the card and closed its status popup. The correction keeps existing cards during a refresh of the same selection; a different query/category still waits for its own results. The controlled existing flow failed before the correction (45.672s wall) and passed afterward (15.721s wall; 1.440s case). These captures use synthetic Gateway data. All local owner checks pass: controller 16/16 (3.614s wall), plugin/install-progress browser flows 19/19 (50.870s wall), production and affected-test types, typed lint, i18n, format and line-cap checks. Fresh independent P2 review found no actionable issues. The original Linux shard passed all 79 files/372 cases in 440.434s (Vitest 438.14s), including this regression in 1.421s. All three macOS-only failures also passed there. Delegated Testbox run, wrapper exit 0; owned lease stopped and verified completed. The first remote attempt stopped before tests because the proof incorrectly expected the source commit instead of the wrapper's synthetic carrier; corrected full-tree guards passed before and after testing. Linux proof used source Before — the refresh closes the status details: After — the status details stay open: |
|
This pull request has been automatically marked as stale due to inactivity. |


Related: #150705.
What Problem This Solves
Preserves the authenticated requester when delegated work is queued, forwarded or recovered, so each new execution uses the right person's current applicable permissions.
User Impact
Each execution keeps its admitted identity and prepared permissions. Human input waiting for admission uses current policy when admitted; already-admitted native work retains its prepared policy while waiting to run. New delegations resolve current destination policy for their requester. Accepted asynchronous work survives normal source-turn completion, while cancellation, revocation and current-owner checks remain authoritative. Intentional delegation to a more capable agent remains supported.
Human steering is opt-in across people.
messages.queue.allowCollaborativeSteeringdefaults tofalse. When Bob attempts to steer Alice's active turn with collaboration disabled, the runtime refuses without invoking the model or queueing executable work, and directs Bob to/followup <message>. The refusal remains terminal through redelivery and recovery./followuprequests one new execution as Bob, respects existing queue ordering, and reports whether it actually queued, started or was rejected without changing the conversation's persistent queue mode.With explicit
true, Bob's admitted input may influence Alice's continuing execution using permissions Alice has that Bob does not. Alice's execution identity and prepared permissions remain unchanged; Bob remains the message author. Existing queue modes, conversation access, backend compatibility and live-authority checks still apply. Explicit cross-sessionsessions_send(mode="steer")requires the same authenticated requester and compatible policy; incompatible steering is refused with followup guidance. Approvals and cancellation commands keep their separate handling; natural-language “stop” does not imply cancellation.Participant selection extends main's existing
userselectors. Unqualified session operations and delegation use the incumbent execution's requester. A supported explicituser: Bobselection binds a live accepted participant's authority and requester facts together, including for a new child execution. Native delegation retains the original requester. Source-tool authorization and selected destination scope still apply. The model can select a participant's authority; this does not establish that person's intent or approval. Permissions are not combined, and shared history remains shared.Configuration: new configurations explicitly contain the default. Doctor uses the existing backed-up, include-aware writer to persist an absent setting as
false, preserving explicit includedtrue/falsevalues. Repair is idempotent and retains existing include-refusal behavior. Managed updates invoke candidate Doctor; older read-only Doctor phases and manual/package-manager/container replacements may leave the setting absent. The runtime default applies immediately;openclaw doctor --fixpersists it. Ordinary reads and startup remain read-only.Audit and rollback: existing opt-in child admissions and session-action receipts record a bounded, installation-local pseudonym for the prepared human authority subject separately from the invoking agent. The inspector labels this Recorded authority subject; generic receipt provenance remains unverified. This records authority selection, not human intent, approval or causal attribution. Collection scope, retention, row bounds and approval records are unchanged. Older released readers show new subject-bearing receipts as unknown/corrupt on otherwise compatible databases; upgrading again makes retained records readable. Full database/updater rollback is not established, and existing database-write rollback guards still apply.
Why This Change Was Made
The existing admission, queue, transcript-custody and execution-authority owners carry authenticated requester facts separately from previously calculated policy. Delegation binds authority and requester origin together instead of pairing one person's authority with another person's identity. The same facts survive native execution, worker transport, replies, recovery and compaction. Existing audit and inspector owners expose the selected subject without adding an attribution manager, store or causal graph.
Evidence
Current candidate:
d4fb6dcc6543c0ae362115b0147acbd5fb5409f1, tree24647861d8861e79218c86a1ff1bcfdbedc6fdfe, rebased onto pinned mainfcbcaad75f0db848b54df62275ff4beaacbd50d0. Current-head CI is running; GitHub reports the branch conflict-free. Execution results below remain bound to their recorded source.The rebase retains main’s combined turn-adoption/writer owner while carrying the authenticated requester facts through it. Main’s pending-final classifier remains the sole owner of that decision.
/dashboardrouting and explicit/followupadmission remain supported. Retained cron requester authority cannot bypass the interrupted-occurrence no-replay rule. These are narrow adaptations to existing owners, with no new product scope or unresolved product-direction conflict. The final replay preserves all 65 commits: 64 patch-identical and one mechanical resolution retaining main’s stabilized CI capacity test alongside this branch’s assertions.Focused integration proof on
d892648266: the prior guard permitted an unexpected recovery dispatch in the retained-requester cron fixture. The repaired full file passed all 12 cases, including an explicit check that requester facts survive shutdown. The test and repaired owner match the recorded passing bytes. Both runs used the canonical wrapper with--maxWorkers=1on Node 24.21.0: 61.903 s for the counterfactual and 62.933 s for the full file. Five existing adoption, requester-snapshot and command files then passed all 59 cases in 141.869 s grouped wall time. This is 71 passed cases across six files, not an end-to-end production or live-provider claim. The cron extension adds no cases or process boots; CI cost for its changed fixture is pending. All six tested files and the affected recovery owners are byte-identical after the final rebase; this is retained focused proof, not a new whole-candidate execution.Fresh scoped P0–P2 reviews of the
d892648266integration and subsequent line-cap repair found no actionable issues. The line-cap repair moves two parameter types into the existing companion file and removes two redundant expressions; it adds no runtime owner. Type-aware lint and formatting passed for all six integration files, and whitespace checks passed against the pinned base. That reviewed integration is unchanged in the final replay. The final capacity-test resolution preserves the upstream test block byte-for-byte; its type-aware lint, formatting and final base-wide whitespace checks pass. The full CI planner file passed all 145 cases ond4fb6dcc6543in 138.874 s command wall time, using the canonical wrapper with--maxWorkers=1on Node 24.21.0. Its current-head CI cost is pending. A new full build and current-source provenance E2E were not completed; the prior build and CI remain qualified below.The new base includes main’s updater-fixture correction and Codex parent-retention fixture correction, addressing the two identified inherited assertions/type failures. Inclusion is not a passing candidate replay. Main’s bounded worker shutdown, SQLite admission and reserved-system-store recovery changes preserve the campaign’s authority contracts on source inspection; they do not establish that the remaining teardown or rollback failures are fixed.
Remaining limits: current-source provenance E2E, live Telegram and published-updater proof are not established. The earlier authority teardown and hook
Error.causefailures remain unexplained. Rollback observation failed when the candidate recovery path classified a daemon schema1 store as agent schema31; its relevant owners matched that prior base. Neither full rollback restoration nor healthy retained-candidate recovery was proven. No matched-performance proof exists, and an earlier order-sensitive latency observation remains unexplained. The task-owned AWS lease has been released and that release verified; no broader host-cleanup completion is claimed.Prior-source behavior and CI evidence
These results establish earlier behavior and integration outcomes. They remain bound to the recorded source; the current owner adaptations require their own validation.
42a6bffeeb. Default/false refusal, same-requester steering, busy/idle/followup, changed policy at drain, explicit-true incumbent authority, and subsequent delegation had correlated transport IDs, admission records and observable effects. Refusals settled without later execution during the run. Model output was scripted; Telegram transport, native tools and effects were real.2026.10.4updated real released state to exact42a6bffeeb, preserved include-owned true and history, then candidate-created selected-Bob work survived source completion and SIGKILL, executed once under Bob, retained FIFO and did not revive withdrawn work after another restart. The released profile catalog was empty; this does not prove continuity of a pre-upgrade human profile or independently changed policy across restart. The original outer carrier's export-permission failure and artifact-only recovery remain recorded.CI on
8bfc18dfd2tested merge270b8f4e8dagainst actual basea9e5f4e3b7. It settled with 156 successful jobs, five underlying failures, a failed aggregate gate and 18 skips. Architecture, guards, production types, all five core test-type graphs and core/root lint passed. Strict refusal→explicit followup passed all three cases; worker steering passed all ten, including three request-credit cases; command execution identity passed all eleven. The provenance E2E is excluded from automatic PR CI.Delegated-authority proof passed all 20 body cases but failed during its 300-second Gateway teardown and subsequent controller cleanup. The hook test expecting rejection of shared memory in
Error.causeinstead resolved. Both reproduce earlier signatures and are not labeled unrelated. The other failures had source-backed inherited causes: an upstream Codex parent-retention test supplied an option absent fromMonitorOptions; the updater assertion omitted reserved database candidates; and the UI base already exceeded its chat budget. The measured UI delta was 1,491,366B→1,491,410B (+44B), with 25 requests each against a 1,490,000B cap. This is not a production-performance finding. The updater and Codex fixture corrections are now included in the new base as noted above.Isolated validation on
8bfc18dfd2used verified raw bytes / tree96b88f4962. The build and all three strict-followup cases passed, with source bytes unchanged after each. The provenance phase reached the canonical wrapper’s additional private-QA build and test Gateway startup, then exceeded the carrier’s 360-second phase budget and received SIGTERM without an assertion verdict. The owned process group was absent afterward, but natural descendant completion was unverified; final source/runtime closeout was withheld and the carrier reportedsource-unverified. This was not an overall proof pass. The later worker-credit, command-identity and public-settle remote files did not run; the prepared authority diagnostic was also unrun.The older frozen
9e78318ac5abreplay passed build, TUI, reply composition, private completion, registry completion authority and public settle/recovery files, while reproducing other fixture, strict-followup, provenance and chat/Doctor failures. Its authority process lacked the canonical completion receipt after assertion/teardown failures, so the overall carrier was unsuccessful. Original failures, diagnostics and costs remain recorded; no passing replay is treated as proof of an unexplained fix.Inspector screenshots
Inspected before/after captures from the inspector implementation, delivered in chat and uploaded. The rebase changes its tests, not the renderer. The existing attachment URLs returned images that were decoded and inspected; actual GitHub browser rendering remains unverified because the browser tool could not authenticate.
Before:
After:
Prior-source measured test costs
Prior-source
8bfc18dfd2validation used Node 24.19.0, pnpm 12.11.1 and pinned Bun1.4.4-canary.1+7bd4fdff3. The canonical wrapper owned all preparation; reported command walls include that preparation.--maxWorkers=1The interrupted proof carrier took 746.747 s overall and did not complete final verification. The separate prerequisite bootstrap passed in 58.043 s command time / 431.186 s total; setup is not behavior proof. Later remote test files and the prepared authority diagnostic were not run.
These measurements belong to frozen
9e78318ac5ab, using the canonical wrapper and--maxWorkers=1. Grouped wall times are not standalone per-file costs. Counts overlap other evidence and are not additive.The strict-followup and provenance diagnostic carriers took 182.064 s and 90.730 s, both failed and restored their original source. Diagnostics add no recurring CI cases and do not establish a repair. CI 820 reported 40,023 summed job-wall seconds across concurrent jobs; this is neither workflow elapsed time nor production performance. The availability counterfactual/restored commands on earlier
d95895d4c317took 62.278 s and 62.129 s. CI on8bfc18dfd2measured the repaired strict-followup case at 12.669 s and its two siblings at 1.872/1.375 s; the three worker request-credit cases took 0.393/0.406/0.463 s. These are CI case times, not standalone file costs. The remaining8bfc18dfd2standalone costs are unmeasured because its carrier stopped before those phases. These are not measurements of the candidate rebased ontofcbcaad75f. Historical Telegram, selected-child and updater costs remain attached to their original source-qualified evidence.Scope and LoC churn
Current committed candidate against pinned main
fcbcaad75f0db848b54df62275ff4beaacbd50d0. Counts include moved and blank lines.Gross churn: 20,715 lines; net growth: 12,115 lines. The rebase adds no new product scope.