Skip to content

fix(agents): preserve invitation custody through transcript writes - #184513

Merged
roboclaw-bot merged 1 commit into
mainfrom
fix/guest-access-11-runtime-adapters-20261026
Nov 12, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
fix/guest-access-11-runtime-adapters-20261026

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Invitation authority must survive the normal recorder, worker and SessionManager persistence paths without becoming transcript-controlled metadata.

User Impact

Original human input keeps private invitation custody through runtime persistence and publishes committed membership before observers reuse retained reads.

Why This Change Was Made

Connect the canonical transcript commit to existing runtime adapters. Keep notification completion separate from the input owner's lifetime and preserve post-hook approval decisions.

Stack step 15/17, based on fix/guest-access-10-transcript-commit-20261026. Review and merge in order; each upper PR contains only its own slice against its predecessor.

Previous: commit invitations with original messages; release retained authority.

Next: explain invitations and show delivery failures.

Stack order: complete stack.

Evidence

Slice head: 0b478947d426a073d5ced337eed6f2328a1800d6, on fixed main 5bf0c41a03f1dba03d625460607ed5b959710458. The complete 13-file integration matrix passed 46/46 on pinned Bun at ddc49fd63d3b82e41eb6c74af4ad935a56aebc8f before this main rebase. Main's canonical fixture repairs are preserved and duplicate prerequisite changes removed. Prefixes are not separately built locally; this prefix's hosted CI and review are recorded below.

The final real-invitation matrix exercises actor and non-actor SessionManager writes. Allowed writes publish membership to retained/acquiring readers; sender demotion at native commit rolls back transcript events, membership and watermarks and leaves retained readers denied. It uses the real Inbox preparation and native admission callback. This replaces two synthetic positive-only cases in the final activation PR. Original Gateway chat coverage supplies the non-manager path; input admission precedes adapter selection.

The native PR wrapper inventory includes the imported authority leaf. Worker inventory locations are regenerated without changing classifications.

The stack evidence ledger records runtime results, prior build/upgrade proof and limits. Integration tests are owned by the final activation PR. Current-head hosted CI and review remain required before landing.

Current-head qualification

Required CI passed at 0b478947d426a073d5ced337eed6f2328a1800d6. The ClawSweeper review covers the same head and reports no actionable findings or required rank-up moves. Merge in the recorded stack order.

Change size

Production +129/-50; tests +92/-1; generated +1/-1.

Runtime adapters preserve host-owned invitation custody; public SDK write options cannot supply invitation authority.

Upstream contract checked directly: Codex turn text elements are display spans, not Gateway profile membership authority (turn protocol, turn processing).

Test-line allowance

config/test-lines-baseline.txt: 6,283,946 → 6,284,037 (+91). Covers invitation custody through SessionManager persistence. The ceiling equals this prefix's measured 6,284,037 test lines; no spare allowance is added. This is a bounded baseline exception under the repository testing workflow, not a functional-test waiver. No runtime assertion, SDK budget or required CI check is weakened. Change-size test counts include the baseline metadata edit.

Maintainer restack and current-head verification — November 12, 2026

This section supersedes the historical slice-head/current-head qualification, change-size and test-line allowance above; the original contributor narrative and stack references are preserved.

Published head: 939a5a026583198e6fc5cef60b20ca4ec19d67bf, single parent baca36ea403cf681b9ec531c5f27837d0586dcad (#184512). The PR now targets main and contains only the runtime-adapter slice: 14 files, +263/-49. All 64,449 published raw entries match the qualified post-generation source.

  • Candidate qualification: 102 Node +102 pinned-Bun cases passed across fourteen actual raw reports, zero failed/pending/todo; four scoped type leaves and typed lint passed. All five canonical validator generators and pre/post checks passed, with unchanged validator outputs and installed/copied Lobster bytes.
  • Completion gates: the completion-only run passed all 36 fresh phases, formatting with Bun/oxfmt parity, targeted lint, all nine previously unrun gates and final validators check. The sole generated document update moves the canonical worker inventory location from line 265 to 267.
  • Ratchets: test lines +139/400, allocation0; DB workers167→167 T1 and compatibility calls15→15. Main's test-line ceiling is unchanged; the historical +91 allowance is not carried into this restack.
  • Final exact-head proof: AWS run passed all 27 phases and native collection. Clean full builds passed at HEAD (380s) and BASE (402s) before any overlay. view, none and invited passed at both roots: 6/6 cases, zero pending/failures, six same-process Gateway restart markers per root. Both roots' full source, physical index and refs were restored exactly.
  • Cleanup and custody: final lease cbx_d77a8ab10f4d is verified released/cleanup complete/no host/ready false. All 250 retained hashes were independently verified after release; native paired receipt/manifest bytes match the complete archive. All qualification leases are also verified released.
  • Exact-head CI: CI run43260893470 and openclaw/ci-gate passed at 939a5a026583198e6fc5cef60b20ca4ec19d67bf. A fresh hosted re-review is being requested after this evidence update; the historical old-head review above is not substituted for it.

The original expected-RED run remains native1/classifier1, with four expected failures and eighteen excluded cases. The 204-case run remains native1/format1: its completed passing proof is reused across an independently verified relocation across explicit type-only imports. Neither failed receipt is relabeled successful, and tests/types/generators were not replayed to erase those failures.

Proof scope: internal-policy proof using an identical test-only local enum overlay, restored and never pushed. Membership is created through the existing Gateway member RPC; public selected-invitation producer/config activation stays in #184515. Deterministic HTTP replay is not live inference; same-process Gateway close/start is not cold-crash or general isolation proof. No new database schema, serialized-format migration or public configuration activation is introduced, and #184514/#184515 are unchanged.

Exact unpushed runtime-only overlay
-    others: z.enum(["none", "view", "suggest", "write"]),
+    others: z.enum(["none", "invited", "view", "suggest", "write"]),

The identical overlay was applied only after both clean builds, used for all three modes at both roots, and fully restored before final source verification.

@vincentkoc vincentkoc self-assigned this Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 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 agents Agent runtime and tooling size: M labels Oct 26, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro 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:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR carries private invitation authority through recorder and SessionManager transcript persistence.

Example: Alice submits “@bob please review” with a host-approved invitation for Bob.

  • Before: SessionManager persistence does not forward the private invitation plan to the transcript transaction.
  • After: The original message and Bob’s membership can commit together, with committed membership published to retained readers.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is coherent and has meaningful integration coverage, but the supplied runtime scenario does not establish the changed invitation path.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: An approved selected invitation must remain bound to the original human input when runtime persistence chooses a recorder, worker, or SessionManager path.
Reason: Maintainer authorship establishes direction, and the focused adapter slice completes the existing transaction boundary without enabling public invitation configuration.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR provides a useful, focused runtime-adapter slice, and source review found no definite introduced defect.

Priority: P2
Reviewed head: 939a5a026583198e6fc5cef60b20ca4ec19d67bf

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted runtime logs or terminal output showing an original invitation traversing the changed recorder and SessionManager paths into an atomic membership commit, with replay unable to regrant access.
Agent review details

How this fits together

Authenticated input owners prepare invitation authority; recorder and SessionManager adapters carry it to the existing transcript transaction, which commits membership and publishes receipts.

flowchart TD
A[Authenticated input owner] --> B[Transcript recorder]
B --> C[Private commit guard]
C --> D[SessionManager adapter]
D --> E[Transcript transaction]
E --> F[Message and membership]
F --> G[Retained reader publication]
Loading

Technical review

Best possible solution:

Preserve invitation custody through the existing recorder, pending-input owner, adapters, and atomic transcript transaction.

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

The pinned base lacks invitation-plan forwarding through these runtime adapters; this establishes the integration gap in source, without claiming a released-user reproduction or executing target code.

Is this the best way to solve the issue?

The patch reuses the existing admission and transaction owners, preserves requester projection and replay behavior, and introduces no competing persistence owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9ca7932563ff.

Provenance checked

  • Original-input runtime commit guard keeps the original intent (3de18f6: Bind native requests to their selected profile and preserve original accepted custody through transcript persistence.)
  • Original-message notification ownership keeps the original intent (516fbb2: Notify explicit human selections only after a fresh canonical user-message commit; replay and rewritten content must not create a new mention.)
  • Requester identity projection keeps the original intent (fd2a6ca: Fresh write identity comes from authenticated producer facts or exact accepted pending custody rather than exposed message metadata.)
  • Worker message admission keeps the original intent (d5173cc: Keep session actor writes under existing transaction, scoped-receipt, and live-authority ownership.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 3de18f6 adds src/sessions/user-turn-transcript-runtime-context.ts:73 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3de18f60bdef; files: src/sessions/user-turn-transcript-runtime-context.ts)
  • Peter Steinberger: Raw commit d5173cc adds src/agents/sessions/session-manager-message-admission.worker.ts:26 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d5173ccc77b9; files: src/agents/sessions/session-manager-message-admission.worker.ts)

PR surface

Source +74, Tests +139, Docs 0, Other +1. Total +214 across 14 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 11 122 48 +74
Tests 1 139 0 +139
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 14 263 49 +214

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +122/-48; tests +139/-0 Growth carries private authority through existing persistence boundaries and covers distinct actor, worker, publication, and rollback behavior.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P2: This is a scoped prerequisite for selected invitations, with public activation remaining in the downstream feature PR.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 (7 earlier review cycles)
  • reviewed 2026-10-26T10:53:43.749Z sha b440e15 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-27T11:55:24.367Z sha 742c6f2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-27T13:16:11.616Z sha 00cd4cac5a99341969f88d580db4488b95bcf311 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T14:20:48.975Z sha 760011a1e9af6ca7d24f2e7cb98a11417f7e75ee :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T14:28:44.873Z sha 760011a1e9af6ca7d24f2e7cb98a11417f7e75ee :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T14:47:18.014Z sha 215ebff7ff6d58d4f2018c51bc747e22e7a96b5d :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T15:05:18.245Z sha 0b47894 :: needs maintainer review before merge. :: none

Reviewed November 12, 2026, 12:29 PM ET / 17:29 UTC (Revision 8).

@vincentkoc
vincentkoc force-pushed the fix/guest-access-11-runtime-adapters-20261026 branch from b440e15 to d2a40b2 Compare October 27, 2026 08:17
@vincentkoc
vincentkoc force-pushed the fix/guest-access-10-transcript-commit-20261026 branch from d4fa7d6 to 49cba53 Compare October 27, 2026 08:17
@vincentkoc
vincentkoc marked this pull request as ready for review October 27, 2026 08:20
@vincentkoc
vincentkoc force-pushed the fix/guest-access-11-runtime-adapters-20261026 branch from d2a40b2 to ab93b5d Compare October 27, 2026 09:30
@vincentkoc
vincentkoc force-pushed the fix/guest-access-10-transcript-commit-20261026 branch from 49cba53 to ff036af Compare October 27, 2026 09:30
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 27, 2026
@vincentkoc
vincentkoc force-pushed the fix/guest-access-10-transcript-commit-20261026 branch from ff036af to 24c921a Compare October 27, 2026 11:28
@vincentkoc
vincentkoc force-pushed the fix/guest-access-11-runtime-adapters-20261026 branch from ab93b5d to 85b2b78 Compare October 27, 2026 11:28
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Oct 27, 2026
@vincentkoc
vincentkoc force-pushed the fix/guest-access-10-transcript-commit-20261026 branch from 24c921a to 583b3fc Compare October 27, 2026 11:46
@vincentkoc
vincentkoc force-pushed the fix/guest-access-11-runtime-adapters-20261026 branch from 85b2b78 to 742c6f2 Compare October 27, 2026 11:46
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review current head 742c6f2153b15e1613dbbabd6e8dda8d33a645c8 against fix/guest-access-10-transcript-commit-20261026. The PR body records the scoped change, production/test LOC and validation. Complete-stack runtime proof and the final test-only restack checks are recorded at #184515 (comment); each prefix also requires its own current-head hosted CI.

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc
vincentkoc force-pushed the fix/guest-access-10-transcript-commit-20261026 branch from 5a48d0c to b9b53fd Compare October 27, 2026 14:39
@vincentkoc
vincentkoc force-pushed the fix/guest-access-11-runtime-adapters-20261026 branch from 760011a to 215ebff Compare October 27, 2026 14:39
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Current head: 215ebff7ff6d58d4f2018c51bc747e22e7a96b5d.

The worker-preparation prerequisite now excludes its new subscription consumer from the existing negative admission fixture. The full admission and worker-runner files pass 211/211 under pinned Bun; the corrected negative case and positive compiler sibling pass 2/2 under Node. P0-P3 scoped review is clean. This restack preserves the production patches and all assertions; descriptions include updated source identities and exact test-line allowances. Please review this current head for remaining findings and required rank-up moves.

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@vincentkoc
vincentkoc force-pushed the fix/guest-access-10-transcript-commit-20261026 branch from b9b53fd to 21b2518 Compare October 27, 2026 14:58
@vincentkoc
vincentkoc force-pushed the fix/guest-access-11-runtime-adapters-20261026 branch from 215ebff to 0b47894 Compare October 27, 2026 14:58
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Current head: 0b478947d426a073d5ced337eed6f2328a1800d6.

The coordination-cleanup prerequisite now places both ACP databases under the canonical fixture owner and verifies that their actual native handles close before directory removal. Both old external-path controls failed; the repaired complete file passes 30/30 under pinned Bun, and both ACP cases pass 2/2 under Node. P0-P3 scoped review is clean. This seven-PR restack preserves all production and downstream source patches; descriptions include current source identities and exact test-line allowances. Please review this current head for remaining findings and required rank-up moves.

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@roboclaw-bot
roboclaw-bot force-pushed the fix/guest-access-10-transcript-commit-20261026 branch 2 times, most recently from 039b718 to d0dec5d Compare November 2, 2026 10:51
Base automatically changed from fix/guest-access-10-transcript-commit-20261026 to main November 12, 2026 14:35
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Security-sensitive guard cleared

Current revision: 939a5a026583198e6fc5cef60b20ca4ec19d67bf

This PR no longer changes files in the maintainer security-review tier.

Separate CODEOWNERS requirements still apply to security policy and enforcement files.

Carry original-message admission and selected invitation authority through the runtime transcript adapters, retaining private input custody, replay denial and atomic settlement. Port the runtime-adapter slice onto the merged transcript-commit owner without enabling public invitation/config producers.

Qualify 102 Node and 102 pinned-Bun cases, scoped types/lint, canonical validators and unchanged worker/test-line ratchets. Preserve the original expected-RED and formatting-failure receipts separately from the successful completion run; apply only the canonical generated inventory update. Final published-head builds and Gateway comparison remain pending.

Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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 docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants