fix(protocol): preserve gateway session attribution across node runs - #116792
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 7:32 PM ET / 23:32 UTC. ClawSweeper reviewWhat this changesAdds a connection-negotiated session-key envelope so gateway-admitted session attribution survives node invocations while legacy nodes retain compatible omission behavior. Merge readinessKeep open: current main still lacks the tri-state node session envelope, and the proposed gateway-owned boundary is appropriate. No actionable defect was established from the supplied patch, but exact-head blobs could not be hydrated locally; normal maintainer source/merge review remains needed. Likely related people: vincentkoc (medium confidence). Priority: P1 Review scores
Verification
How this fits togetherGateway admission sends commands to connected node hosts. This change carries the admission-owned session decision through the node protocol into Android and macOS execution paths without allowing command parameters to redefine it. flowchart LR
A[Gateway command request] --> B[Gateway admission]
B --> C[Connection feature negotiation]
C --> D[Node invocation envelope]
D --> E[Android or macOS node host]
E --> F[Session-attributed execution]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +280, Tests +1038, Docs +1, Other +1865. Total +3184 across 56 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Retain one gateway-owned negotiated envelope, then hydrate and review the exact merge tree before landing this first stack layer. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main lacks the node-envelope schema and drops the explicit-null distinction across registry and node-host paths. Is this the best way to solve the issue? Unclear: the proposed gateway-owned negotiated envelope is the right repair location, but the complete exact-head implementation could not be independently read from this partial clone. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d64f5b6a0960. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (33 earlier review cycles; latest 8 shown)
|
d87d45f to
9e6a468
Compare
|
@clawsweeper re-review Maintainer decision and comment resolution for head
The five PRs remain intentionally ordered and should be reviewed/landed 1 through 5. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
9e6a468 to
45dd17e
Compare
|
@clawsweeper re-review Exact head: The prior durable review found no defect but was incomplete because exact-head TypeScript and Swift blobs/checks were unavailable. Those sources are now retrievable, including Please refresh the compatibility/security review against the accessible exact head and replace the stale missing-source decision gap. |
|
🦞👀 I queued a lightweight read-only assist pass. It will post a separate answer comment and will not edit the durable ClawSweeper review comment or trigger close, merge, repair, label, or branch changes. Request: re-review\n\nFinal exact-head refresh at f258afd after CI identified and we fixed the generated native i18n inventory offsets. Runtime changes are unchanged; |
|
Maintainer exact-head source audit completed for the ClawSweeper environment gap; no actionable defect found. Reviewed
Exact-head coverage includes protocol validation, Gateway negotiation, nested forgery replacement, deadline charging, Swift value/null/omission forwarding, and Android value/null/omission dispatch. Hosted status remains 96 passing checks, zero pending, zero failing. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Exact-head refresh for Prior findings and rank-up moves are resolved:
Please review this head against #117034 as the transport-only first layer of the private attribution stack. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Current head: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review Exact reviewed head requested: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Exact reviewed head remains The native detached-task proof gap is resolved by exact-head source and existing tests:
This composes the requested GatewayNodeSession-to-MacNodeHostWorker boundary without adding duplicate coverage. Please refresh findings, before-merge blockers, and rank-up moves against this SHA. |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review exact head 5d2c38b after the prior lease expired. The requested nonzero-timeout macOS value/null/legacy boundary proof is at GatewayNodeSession.swift:1371-1383, GatewayNodeSessionTests.swift:2457-2511, MacNodeHostWorker.swift:120-153, and MacNodeHostWorkerTests.swift:241-279. Current main merge-tree is clean. Please publish a fresh durable review and reassess the prior rank-up moves. |
|
Maintainer disposition for the current ClawSweeper rank-up moves at exact head
The remaining item is normal maintainer acceptance of the negotiated protocol contract, not unresolved author work or a code defect. |
|
Maintainer decision: accepted. The authenticated I also completed exact-head local source review; the earlier ClawSweeper hydration gap is not a remaining maintainer blocker. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
Merged via rebase.
|
Related: #116528, #117034
Stack: 1 of 5. Next: #116793
What Problem This Solves
Node-invoked agent runs could lose the gateway-admitted session identity, especially across mixed gateway/node versions and reconnects.
Why This Change Was Made
Adds an additive, connection-negotiated node invocation envelope with value/null/omitted semantics. The gateway remains authoritative: nested node parameters cannot mint or replace attribution.
Relationship To Execution Identity Inspection
#117034 owns opt-in persisted execution-identity inspection under
logging.audit.executionIdentity. This stack does not duplicate that config or public schema. PR1 only transports the gateway-owned session decision across node boundaries so later layers can build immutable private runtime attribution.Native Windows companion: openclaw/openclaw-windows-node#1072
User Impact
Node-hosted runs preserve or explicitly clear the same admitted session identity as local runs. There is no new config, environment variable, credential shape, prompt field, model schema, or plugin SDK surface.
Evidence
6d37e1e9291, rebased conflict-free onf5add8197fa.GatewayChannelSupport.swiftand the role-specific connect payload inGatewayChannel.swift.tbx_01kzahyvd5rjn6v83ebxrc5369, Actions31068629967.ClawSweeper Resolution
sessionKeyandsystemRunPlan.sessionKeyso forged nested values cannot replace the gateway session.AI-assisted: yes; implementation, review decisions, and verification are maintainer-directed.