Skip to content

fix(agents): retain requester selection for returned peer replies - #178750

Merged
roboclaw-bot merged 3 commits into
openclaw:mainfrom
enki:fix/peer-requester-selection-followup-20261020
Oct 24, 2026
Merged

roboclaw-bot merged 3 commits into
openclaw:mainfrom
enki:fix/peer-requester-selection-followup-20261020

Conversation

@enki

@enki enki commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A returned legacy peer result may need the original requester's personal-tool selection after the originating tool invocation has ended. The existing continuation retains operator source authority but deliberately removes its ambient tool caller. Reconstructing a fresh caller later can select the wrong requester or reject valid return work.

This is the personal-requester proposal extracted from #177698, presented separately so its authority decision does not hold up the lifecycle consolidation.

Proposed Behavior

Capture the requester selection while the originating caller is live. Only the legacy replyMode: peer return flow opts into re-entering that selection under its existing retained operator source. Completion custody follows its existing path; peer messages retain separate turns. The ended invocation's receipt and operational-run instance are not restored.

The retained source's device/Gateway lifetime, release and operator-policy checks remain. The selected person's authority is intersected with the existing caller's scopes. No schema, configuration option, dependency, storage migration or native Codex change is introduced.

Current upstream conflict repair (2026-10-22)

Current head 615876add6b9448d661e73d9f3ae597f5f9d349f integrates pinned upstream 52df852cd5be3b3691ef27d0942a4db7b2258eb1 into this standalone requester-selection proposal. Upstream’s accepted-steering custody suite and regular continuation behavior are preserved. Only legacy returned-peer work without a completion owner opts into the captured selected-requester path; completion-owned work retains its existing custody. The requester remains Bob when Alice selected Bob, while upstream’s initiating-creator provenance remains Alice. The ended invocation’s receipt, operational run and full-permission flags are not restored.

The conflict repair also adopts the upstream AgentStepSession type owner. One stale test expectation exposed upstream’s new delegated-creator field; the tests now assert both Bob’s selected identity and Alice’s original creator field, including the actual reply-flow composition. This requires no production permission change or new fallback.

The final affected suites pass 20 checks: four real reply-flow compositions, eight retained-source/accepted-steering custody cases, and eight AgentStep siblings (25.74 seconds through the canonical wrapper). The production-identical regular continuation suite separately passes 13 cases (12.05 seconds file duration). Core production types, the bounded four-file owning test type graph, scoped production/test typed lint, six-file formatting, and whitespace checks pass. The earlier integrated run correctly exposed the stale creator expectation; its failure is retained as the reason for this test-only repair. Broad exact-head CI remains pending publication.

Fresh independent P0–P2 review of the final candidate against the pinned base returns scoped-clean, with no actionable findings. Both passes complete: one metadata/context pass explicitly records its limited implementation coverage, and the second reviews the actual patch with frozen authority context. This is a source assessment; the reviewer did not execute project code and does not supply owner approval or a new runtime capture.

The simplify pass keeps selection capture and source re-entry in the existing continuation owner; no second authority store or recipient-permission owner is introduced. The two test groups protect different boundaries: accepted queue custody and retained selected-human identity. Existing compositions additionally protect return delivery, source revocation and requester-session replacement. Net changes against pinned upstream are production +81/−20 lines, tests +640/−3, and one test-planner line. The test growth is retained focused proof from this standalone proposal; this repair adds only explicit initiating-creator expectations and preserves upstream cases.

The security/session-owner decision below remains explicitly open; this PR is ready for that review. Historical authenticated returned-peer, canonical revocation, and personal-tool final-effect captures remain qualified to their recorded 9600c93 source. Their satisfied proof requests are not reopened by this integration; they are also not new runtime executions of the repaired head. Source reassignment, native Codex personal-tool effects, and owner approval remain unclaimed. No operator Gateway was changed or restarted.

Local deployment checkpoint (2026-10-20)

The operator explicitly opted into a combined local deployment containing main consolidation 7605b4fc8c28a628cd4d6b9a3e63bc9f1304ce10, reply-obligation candidate 66eea4b4ef10f196ba1640398d186884d5557cdd, reconnect candidate de1dfafe07c8f0762b9e5fc16d4dfc6b36a3fbeb, and selected-requester candidate 9600c93d45bbdb867ff738d258f25ea94a7f2f45, alongside existing local integrations and the separately restored saved-attempt UI work. The resulting local build is 764886a56987d82f3a3934e2dd7d6a2416ef98da.

Operational readback confirms the exact loaded build, readiness, health, Node 24, unchanged service environment, and all 25 previously active plugins. This is a combined integration deployment, not standalone validation of each PR or security/session-owner acceptance of any extracted policy. No new business-message, native-effect, revocation or reassignment proof is inferred from operational health. The earlier isolated traces below retain their recorded revisions, scenarios and failed-collector qualifications.

Maintainer Decision

Should accepted returned peer work be allowed to re-enter the originally selected personal-tool requester under its retained, live-checked source authority? This is a policy proposal, not inferred approval from matching profiles or session identifiers. It does not authorize reviving the ended invocation or replacing recipient execution permissions.

Recommendation: permit this bounded return path only with the original selection, live checks and the full-flow/final-effect proof below. Review it independently of #177698; that consolidation excludes this machinery.

Evidence

Actual returned-peer personal-tool effects

An isolated Gateway built at 9600c93d45bbdb867ff738d258f25ea94a7f2f45 completed the genuine public sessions_send return using the built-in OpenClaw runtime and scripted inference. Configured trusted-proxy authentication established distinct synthetic Alice and Bob profiles. Bob's explicit human steering was actually accepted into Alice's original execution before the provider selected Bob through the advertised tool. The original invocation and peer ended normally. The returned result then started a distinct execution in the original Gateway session, retaining Bob and the original read/write ceiling without the ended invocation's receipt, operational run or full-permission flag.

The returned execution made three actual advertised personal_instructions calls: get and set on Bob's permitted agent succeeded and matched Bob's authenticated canonical readback; set on an agent permitted to Alice but forbidden to Bob returned the exact current-role error. Canonical history attributes all three tool results to that returned execution, with two successes and one error. Alice's own-file readbacks on both agents and five confined filesystem observations remained unchanged; no Bob file appeared on the forbidden agent. The returned execution ended normally with one visible final, one attributed forwarded peer row and an empty pending-input queue. Four main provider requests covered this returned tool/final cycle; background utility requests are counted separately.

The collector exited 0, qualified=true without timeout or forced containment. Raw facts retain stale initializer fields (status=UNRUN-unqualified, pass=false); the final bodyQualified=true and passed=true, exercised assertions and joined exit0 determine qualification. Raw records were not rewritten. The Gateway exited0, all eight observed task processes exited0 and were absent afterward, clients/proxy/provider joined, and task/bootstrap state was removed. The allowlisted trace below uses fixed aliases and relative timing; raw identifiers and state remain private.

Scope and retained failures: the API is self-only. This proves a personal effect on an Alice-permitted/Bob-forbidden agent, not a foreign-profile file target API or every recipient permission. This is built-in runtime/scripted-provider evidence, not native Codex or real-model inference. Profile reassignment and source revocation are not exercised by this effect case; the separate revoked-source trace retains its own scope. No owner/security approval is inferred. Three prior effect captures remain unqualified setup failures (multi-agent ownership marker, missing private workspace, then the implicit QA workspace suffix); none reached a provider or personal-effect call. Each was preserved and corrected through the supported fixture contract, without changing production guards or permissions.

Redacted final-effect trace
{
  "kind": "derived allowlisted trace; fixed aliases, not a verbatim raw dump",
  "sourceRevision": "9600c93d45bbdb867ff738d258f25ea94a7f2f45",
  "runtime": "built-in OpenClaw",
  "syntheticState": true,
  "scriptedInference": true,
  "authentication": "configured trusted proxy; distinct non-owner profiles",
  "collectorExitCode": 0,
  "qualified": true,
  "trace": [
    {
      "tMs": 0,
      "event": "original runtime accepted Bob human input into Alice execution",
      "participantRecorded": true
    },
    {
      "tMs": 291,
      "event": "original Alice execution ended normally"
    },
    {
      "tMs": 624,
      "event": "peer ended normally"
    },
    {
      "tMs": 656,
      "event": "returned requester is Bob",
      "scopes": [
        "operator.read",
        "operator.write"
      ],
      "oldInvocationReceipt": false,
      "oldOperationalRun": false,
      "fullPermission": false
    },
    {
      "tMs": 767,
      "event": "distinct returned execution started",
      "sameGatewaySessionAsOriginal": true
    },
    {
      "tMs": 921,
      "tool": "personal_instructions",
      "action": "get",
      "agent": "shared-agent",
      "resolvedPerson": "Bob",
      "isError": false
    },
    {
      "tMs": 976,
      "tool": "personal_instructions",
      "action": "set",
      "agent": "shared-agent",
      "resolvedPerson": "Bob",
      "isError": false,
      "canonicalAuthenticatedReadbackMatches": true
    },
    {
      "tMs": 1012,
      "tool": "personal_instructions",
      "action": "set",
      "agent": "Alice-permitted-agent",
      "isError": true,
      "error": "Your operator role cannot edit personal instructions for this agent."
    },
    {
      "tMs": 1070,
      "event": "returned execution ended normally",
      "visibleFinalRows": 1
    }
  ],
  "verification": {
    "returnedMainProviderRequests": 4,
    "personalToolCalls": 3,
    "successfulPersonalToolCalls": 2,
    "forbiddenPersonalToolCalls": 1,
    "canonicalAttributedPeerResultRows": 1,
    "pendingInputs": 0,
    "aliceSharedAgentPersonalFileUnchanged": true,
    "alicePrivateAgentPersonalFileUnchanged": true,
    "sharedUserFileObservationsUnchanged": 2,
    "bobPrivateAgentFileAbsent": true
  },
  "cleanup": {
    "gatewayExitCode": 0,
    "observedTaskProcessExitCodes": [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ],
    "observedPidsAbsent": true,
    "gatewayProxyProviderClientsJoined": true,
    "taskStateRemoved": true,
    "launcherBootstrapRemoved": true,
    "forcedContainment": false
  },
  "limits": [
    "Self-only personal-file API: agent-scoped Alice-permitted/Bob-forbidden effect, not a foreign-profile target API.",
    "Built-in runtime with scripted inference; no native Codex execution or real-model claim.",
    "This effect case does not exercise profile reassignment or source revocation; the separate revoked-source capture retains its own scope.",
    "No security/session-owner or product approval is inferred.",
    "Three earlier effects attempts remain unqualified setup failures; none reached a provider/effect call."
  ],
  "qualification": {
    "finalBodyQualified": true,
    "finalPassed": true,
    "joinedCollectorExitCode": 0,
    "staleInitializerFieldsRetained": [
      "status=UNRUN-unqualified",
      "pass=false"
    ],
    "rawFactsRewritten": false
  }
}

Actual authenticated returned-peer and revocation boundaries

At source 9600c93d45bbdb867ff738d258f25ea94a7f2f45, an isolated authenticated Gateway and the built-in OpenClaw runtime exercised genuine public selection: Alice and Bob became real participants; Alice selected Bob in sessions_send; the original and peer runs completed normally before the separate returned execution. The observed requester remained Bob with the original read/write intersection, without borrowing the ended receipt, run, or full permission. One returned main-execution request and one attributed peer history entry produced a normal final. The original positive collector exited 1 because it incorrectly required a user-role history row; the canonical display projection returns that forwarded entry as assistant. The saved raw observations were audited after the run; this is not a whole-collector pass.

A separate revoked-source capture exited 0. A metadata-only pause held the actual prepared result before its unchanged consumer; the revocation record timestamp was 49 ms after the hold; the successful RPC confirmed persistence by 52 ms, before resumption/source refusal at 54 ms. There were zero returned main-execution requests and zero attributed peer entries. Auxiliary label inference is distinct: two positive and one revoked-case label requests also contained peer text, so this evidence makes no global zero-model-I/O claim. Gateway, provider, proxy, task state and bootstrap cleanup joined without forced containment in both captures.

This uses a scripted local provider with actual loopback provider I/O and disclosed in-memory observation of original owner code, not native Codex. Personal-tool effects, recipient execution permissions and reassignment remain unproved by these captures. Earlier failed collectors remain preserved.

The original positive collector's final history-role assertion remains a failed collector result. Its successful target observations were independently correlated against the real controller, provider, attributed history and normal terminal receipts; the negative capture passes its complete collector. No failed attempt is relabeled. The earlier authentication/omitted-explicit-steer fixture failures remain preserved as setup/admission evidence. Both cases use the actual public chat.send with explicit steer and advertised sessions_send user selection; the observation records the original successful acceptance after participant registration, and pauses the original returned preparation without replacing authorization, return values or errors.

Redacted allowed-return and canonical-revocation receipts
{
  "scope": "Actual authenticated Gateway and built-in runtime with scripted local provider (actual loopback provider I/O); instrumented original preparation await, no authority/result replacement.",
  "positive": {
    "sourceCommit": "9600c93d45bbdb867ff738d258f25ea94a7f2f45",
    "runtime": "built-in OpenClaw",
    "provider": "scripted local provider",
    "selectedRequester": "Bob",
    "originatingParticipant": "Alice",
    "scopeCeiling": [
      "operator.read",
      "operator.write"
    ],
    "endedReceiptOrRunOrFullPermissionBorrowed": false,
    "actualHumanEnqueueAcceptedAndParticipantRecorded": true,
    "originalRunNormalTerminal": true,
    "peerRunNormalTerminal": true,
    "preparedReturnOrderingMs": {
      "held": 0,
      "resumed": 47,
      "returnedReceipt": 84
    },
    "returnedMainExecutionProviderInputs": 1,
    "auxiliaryLabelRequestsContainingPeerText": 2,
    "attributedPeerHistoryEntries": 1,
    "separateReturnedRunNormalTerminal": true,
    "collectorExit": 1,
    "wholeCollectorPass": false,
    "collectorQualification": "Incorrect user-role assertion failed after successful returned delivery; expected attributed assistant projection independently verified.",
    "cleanup": {
      "gatewayExitZero": true,
      "gatewayProviderProxyJoined": true,
      "taskStateRemoved": true,
      "bootstrapRemoved": true,
      "forcedContainment": false
    }
  },
  "revoked": {
    "sourceCommit": "9600c93d45bbdb867ff738d258f25ea94a7f2f45",
    "runtime": "built-in OpenClaw",
    "provider": "scripted local provider",
    "selectedRequester": "Bob",
    "originatingParticipant": "Alice",
    "scopeCeiling": [
      "operator.read",
      "operator.write"
    ],
    "endedReceiptOrRunOrFullPermissionBorrowed": false,
    "actualHumanEnqueueAcceptedAndParticipantRecorded": true,
    "originalRunNormalTerminal": true,
    "peerRunNormalTerminal": true,
    "preparedReturnOrderingMs": {
      "held": 0,
      "revocationRecordTimestamp": 49,
      "revocationRpcReturnedCommitConfirmedBy": 52,
      "resumed": 54,
      "sourceDenied": 54
    },
    "returnedMainExecutionProviderInputs": 0,
    "auxiliaryLabelRequestsContainingPeerText": 1,
    "attributedPeerHistoryEntries": 0,
    "separateReturnedRunNormalTerminal": false,
    "collectorExit": 0,
    "wholeCollectorPass": true,
    "collectorQualification": "Qualified revoked-source refusal before returned provider input.",
    "cleanup": {
      "gatewayExitZero": true,
      "gatewayProviderProxyJoined": true,
      "taskStateRemoved": true,
      "bootstrapRemoved": true,
      "forcedContainment": false
    }
  },
  "unproved": [
    "Personal-tool effects and recipient execution permissions",
    "Source reassignment",
    "Native Codex adapter"
  ]
}

Selected-requester producer repair at 9600c93d45bbdb867ff738d258f25ea94a7f2f45

The new actual reply-flow composition exposed a real producer mismatch: after Alice selects Bob, the retained continuation correctly holds Bob's authority, but prepareSessionsSendReplyContext copied Alice's plain caller origin into the outgoing agentToolCaller. The factory now takes requester origin from the existing canonical selected-operator resolver, with its required-origin check, while retaining the original caller's agent/session bindings. No authority fallback or new policy owner is introduced.

The composition exercises the real requester factory, canonical session readers and communication receipts, detached reply custody, A2A flow and AgentStep. A held peer returns only after the originating invocation/receipt ends. On the preceding candidate, three controls pass and the selected-Bob row fails specifically because outgoing origin says Alice. With the repair, all four cases pass: normal return, selected Bob with original read/write scope ceiling, canonical source revocation, and requester session replacement. No ended invocation, receipt or full-permission flag is restored. A separate determining-owner rollback to original upstream also reproduces the missing-requester failure; this is not a whole historical-tree execution.

The 4 composition cases, 4 retained-source cases and 7 AgentStep siblings pass (15 total, 62.48s canonical wrapper). Core production and owning agent-tools test types, scoped typed lint, formatting and fresh independent P0–P2 review pass. The exact committed runtime build also passes (120.3s). These compositions intercept transport; the separate Gateway captures above establish their own stated runtime boundaries. No claim of Alice-only personal-tool denial, reassignment rejection or recipient execution permissions follows from these tests.

The original extracted candidate 9ec7457c42d80015ef85ca36d77bee3cafc38bdd was based on upstream 1429fd5487b508d59b0466fb83a9618c8022f162. Its retained-owner suite separately covers release, device revocation, Gateway replacement and selected-person scope intersection. These owner tests do not stand in for Gateway/final-effect evidence.

The proof fixtures above are synthetic. No operator Gateway or business session was changed, restarted or deployed to collect them.

Related Work

#162299 already separates accepted reply custody from the original invocation's lifetime. #177296 clears stale ambient caller context when starting a recipient; it does not restore the originally selected requester for this returned personal-tool path. #177618 fixes pre-ACK run-scope binding, which stays in #177698.

Remaining Merge Gates

  • Security/session-owner acceptance of the bounded requester re-entry policy remains required. Passing checks do not grant that approval.
  • Source reassignment and native Codex personal-tool effects are not claimed; the canonical source-revocation capture exercises the requested revocation alternative.
  • Hosted CI and any security-sensitive-change approval remain subject to the repository's normal maintainer gates.

This PR is ready for security/session-owner review of its extracted authority-policy proposal, independently of the lifecycle consolidation.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: M labels Oct 20, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR preserves the selected requester when a delayed legacy peer reply starts a separate execution after the originating invocation ends.

Example: Alice selects Bob for a nonblocking sessions_send, and the peer replies after Alice’s invocation ends.

  • Before: The return continuation drops the selected caller context, while outgoing requester provenance can still identify Alice.
  • After: The returned execution retains Bob with the original scope intersection and Alice’s creator provenance, without restoring the ended invocation.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Qualified production-boundary proof and focused source changes support the implementation; overall readiness remains capped by the unresolved policy decision.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Authenticated public Gateway captures at 9600c93 exercise separate returned execution as Bob, permitted personal-file effects, denial on a Bob-forbidden agent, and canonical revocation before returned provider input. The capture/re-entry implementation remains unchanged at the reviewed head; integration compositions preserve creator provenance. Scripted inference and native-runtime exclusions remain explicit, and operational health is not counted as behavior proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: A delayed returned peer result can lose the person selected for the original request and fail to use that person’s personal tools correctly.
Reason: The implementation is focused, but extending selected-person context past invocation closure is an explicitly unapproved authority-policy proposal.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open for the security/session-owner decision on retained requester selection; source review found no actionable introduced defect.

Priority: P2
Reviewed head: 615876add6b9448d661e73d9f3ae597f5f9d349f
Owner decision: Required. See Decision needed.

Decision needed

  • Question: May accepted legacy peer returns re-enter the originally selected personal-tool requester after the originating invocation ends?
  • Recommendation: Approve bounded requester re-entry: Permit the captured selection under the existing retained source, scope ceiling and final-effect authorization checks.
  • Why: The PR explicitly proposes this authority-lifetime change, and neither its discussion nor the merged lifecycle consolidation records owner acceptance.

Before merge

  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

None.

Agent review details

How this fits together

Session tools hand accepted peer work to the Gateway continuation owner, which retains live operator authority and later admits the returned result into the requesting session.

flowchart TD
  A[Requester selects Bob] --> B[Session send tool]
  B --> C[Existing continuation owner]
  B --> D[Peer execution]
  D --> E[Returned peer result]
  C --> E
  E --> F[Separate requester execution]
  F --> G[Personal tool authorization]
Loading

Technical review

Best possible solution:

If approved, retain only the original selection through the existing continuation owner, preserving current source checks, scope intersection and separate-turn delivery.

Do we have a high-confidence way to reproduce the issue?

Current main visibly clears the caller during continuation and copies the unselected caller origin; the submitted composition records a selected-Bob failure before the producer repair, but this read-only review executed no target code.

Is this the best way to solve the issue?

The patch uses the canonical selection resolver and existing continuation owner, giving the smallest coherent implementation of the proposed policy without a second authority store.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7ba05b683647.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Bounded opt-in: Only peer reply flows without a completion owner request retained selection; completion-owned work continues through its existing custody. (src/agents/tools/sessions-send-reply-flow.ts:54, 615876add6b9)
  • Authority remains with the existing owner: Requester re-entry uses the retained source’s current-authority assertion and omits receipt, operational-run, approval and full-permission fields. (src/gateway/server-plugin-in-process-authority.ts:250, 615876add6b9)
  • Qualified production proof: The full PR body records authenticated public Gateway runs at 9600c93: Bob’s permitted personal-file get/set succeeded with canonical readback, an Alice-permitted/Bob-forbidden agent was denied, and separate canonical source revocation prevented returned execution input. Scripted inference, failed earlier collectors and native-runtime exclusions are disclosed. The supplied body identity is da4622394edcb7eeb0c4bbd603ce0275dad599d7c60d50b1a12c0590f33c2c52. (9600c93d45bb)
  • Proof reuse after integration: The capture and re-entry production modules are unchanged from the proven revision; reply-flow differences adopt the upstream type owner and steering behavior, and the composition expectation preserves initiating-creator provenance. (src/agents/tools/sessions-send-reply-flow.requester.test.ts:119, 615876add6b9)
  • Final filesystem boundary: The personal-file owner checks the admitted source, current profile, scopes and agent policy, and supplies a current-authority check to filesystem mutations. (src/gateway/server-methods/users-personal-file.ts:89, 615876add6b9)
  • Separate policy proposal: The Policy Split section of refactor: consolidate session input ownership and authority #177698 explicitly excludes personal-requester re-entry and routes it to this PR; merging that consolidation supplies no approval for this proposal. (f83b7ade15f3)

Likely related people:

  • Peter Steinberger: Raw commit d0dcc9d adds src/gateway/server-plugin-in-process-authority.ts:143 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d0dcc9deddc8; files: src/gateway/server-plugin-in-process-authority.ts)

PR surface

Source +61, Tests +638. Total +699 across 6 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 3 81 20 +61
Tests 3 641 3 +638
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 722 23 +699

Review metrics

Metric Value Why it matters
Production versus test changes Production +81/−20; tests +640/−3 Production stays within existing owners; test growth covers return composition, selected-person scope intersection, release, revocation and Gateway/session replacement.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The proposal addresses delayed peer-return identity with limited scope and no demonstrated urgent outage.
  • merge-risk: 🚨 security-boundary: The change deliberately carries selected-human context beyond the originating invocation, requiring the explicit owner decision recorded above.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-20T20:36:40.397Z sha 9ec7457 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-20T21:52:46.577Z sha 9600c93 :: blocked before merge. :: none

Reviewed October 21, 2026, 11:59 PM ET / October 22, 2026, 03:59 UTC (Revision 3).

@enki

enki commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head: 9600c93d45bbdb867ff738d258f25ea94a7f2f45. The PR body now includes independently audited, allowlisted traces from the actual authenticated isolated Gateway and built-in runtime: normal original/peer closure, a distinct returned execution retaining selected Bob with the original scope ceiling, actual advertised personal-tool get/set with canonical Bob readback, and the exact current-role denial for an Alice-permitted/Bob-forbidden agent. Protected Alice/shared files remain unchanged. A separate canonical source-revocation capture refuses before returned execution input. The real reply-flow composition also exposed and now fixes the outgoing Alice-versus-selected-Bob producer mismatch, with its base-red/candidate-green regression.

The positive first collector's incorrect history-role assertion, earlier setup failures, stale initializer fields and each capture's runtime/effect limits are explicitly preserved. No native Codex effect, profile reassignment, all-recipient-permissions claim or security/session-owner approval is inferred. This remains a separate draft policy proposal; #177698 excludes it.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 20, 2026
@roboclaw-bot roboclaw-bot added the clawtributor-review Clawtributor pull request awaiting prioritized maintainer review label Oct 22, 2026
@enki

enki commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head 615876add6b9448d661e73d9f3ae597f5f9d349f resolves the real upstream conflicts against pinned 52df852cd5be3b3691ef27d0942a4db7b2258eb1. It retains upstream accepted-steering custody and the moved AgentStepSession type owner. Selected-requester tests now explicitly preserve the upstream delegated creator as well as the selected person. All 33 targeted checks across four suites, production/owning-test types, typed lint, formatting and fresh P0–P2 review pass. Current integration evidence is separated from the already accepted prior-head runtime captures. This remains a draft policy proposal: the security/session-owner decision is open, peer messages retain separate turns, and no deployment or new personal-tool runtime proof is claimed.

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@enki
enki marked this pull request as ready for review October 22, 2026 14:17
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Maintainer security changes approved

A maintainer approved this revision with an explicit security approval comment.

A later push requires a fresh approval comment for an external contributor's PR.

@jalehman

Copy link
Copy Markdown
Contributor

/allow-security-sensitive-change

@roboclaw-bot
roboclaw-bot merged commit d705a4b into openclaw:main Oct 24, 2026
227 of 229 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawtributor-review Clawtributor pull request awaiting prioritized maintainer review gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-sensitive-changed size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants