Skip to content

feat(beam): preserve live logical conversation handoff - #192513

Merged
vincentkoc merged 14 commits into
mainfrom
openclaw/prepare-native-publication-custody-for-the-accepted-beam
Nov 4, 2026
Merged

vincentkoc merged 14 commits into
mainfrom
openclaw/prepare-native-publication-custody-for-the-accepted-beam

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

An authorized Beam publisher could open the Team link but could not compose, and repeated adoption created independent transcript copies. Beam now transfers ownership explicitly and retains one live logical conversation for Team and the source client.

Fixes #192520. Receiver merged as 7552558bfb389d57c760cc37a641bbed7a250175 from head 81953d01bb3c95706940a20b9e53e1b7882aa9fc (tree cea3dcd0491cf6b6d1d812a6c9d804c001329116). The companion openclaw/agent-skills#356 subsequently merged as 4de04c55d02f57caea32176005c6a6c9517200da from pinned head b637385f21ab78ada03d87bba25e16aa9f192404.

  • Ordinary publication is a read-only snapshot. Only the authenticated original publisher can release its exact receiver generation with beam handoff. Release freezes source history and permanently retires source writes; archive or snapshot expiry cannot restore source ownership. Lost acknowledgments cannot recreate an expired publication.
  • First continuation imports bounded untrusted history once. Durable plugin SQLite metadata retains the destination across concurrent requests, retry, restart, deletion and reopen. Exact creation tokens fence rollback/finalization; stale cleanup cannot clear a newer attempt. Reconciliation requires core-verified destination provenance. No schema or protocol version bump.
  • Gateway owners authorize source access, destination creation/history and model selection. Destination aliases and provider-owned equivalent versions normalize against available models. An unavailable preference leaves the override unset for ordinary configured-default resolution. Available forbidden models remain forbidden. No credential, account selection or provider runtime session ID transfer.
  • The companion uses its existing authenticated Gateway profile/device identity for read/follow-up. Query links resolve through a read-only owner; prefix links retain ambiguity discovery. UI continuation captures draft, attachments and ownership synchronously, fences deferred work and RPC results, and releases only its own unscoped sending state. Optional continuation work stays outside common chat boot preloads.

Validation

Final exact-head CI41793020965 succeeds, including all selected unit/browser/native, packaging, type/lint, prompt snapshot, Android and three PostgreSQL conformance jobs. Required openclaw/ci-gate passes. Exact-head ClawSweeper review has no findings or before-merge items.

  • Hosted bundle qualification: chat1282633→1282788B (+155B within unchanged192B variance), requests20→20; startup90691B under90815B and new797172B under797395B. All22 locale payload pairs pass, largest ru143.1KiB under300KiB. No budget/preload/variance relaxation. Before publication, pinned-toolchain native archive builds measured153B saved; canonical precompression/comparison checks and34 focused tests passed (24 UI ownership,10 native SQLite store).
  • Joined pinned-client/Gateway proof passes the complete scenario in33.858s: normal profile/device authentication, real HTTP publication, dropped release acknowledgment, destination first turn/default selection, client read/follow-up/idempotency, Gateway restart preserving session identity, late-source rejection and ordinary revocation with no additional inference. The shard exits0 after verified process cleanup. The provider is synthetic.
  • Native persistence covers release generation, exact rollback/finalization after snapshot removal, archive-retained destination and source retirement. The new SQLite upgrade case seeds a pre-handoff owned row without generation/binding fields, proves list/read and nonmutating premature refusal, preserves owner/createdAt during original-publisher refresh, then releases and reopens one destination. Existing ownerless restrictions remain covered. Reusable real-Gateway authority proof covers foreign publishers, forbidden models, actual post-import revocation, row/transcript rollback and authorized retry; those owners are unchanged.
  • Three prompt JSON drifts were reproduced on exact base062d5d85481fca84c57014e7c3a128fc4386ea79 and independent same-base CI. The repair retains upstream111ae119 generator semantics and changes only canonical JSON formatting, preserving values/order/schema. Final snapshot gate passes.

Dependency contracts personally checked in Codex revision414782450952a196bbb64b1605a458c2531c47b6: SessionMeta provider, turn model, destination model resolution, and account-filtered app-server catalog. No installed Team Codex revision is asserted.

Against original base868609a3f6cb9d736d89b577b57ebedb899d5d4f: production net+1242 (including2 generator lines); tests/support/routing+2336 (counted LF+2334), pinned MIT client proof fixture+1524, snapshot formatting+193; docs+17/-10. Production growth supplies durable ownership, canonical resolution and final-effect cleanup/security contracts. Independent-copy mutation and duplicate startup admission paths were removed.

This implements one-way retirement and normal-auth routing to the canonical conversation. It does not control a native runtime process or synchronize independent native transcript edits. No Team deployment or live-provider/account proof is claimed. Genuine Team media was deferred because no deployment occurred; isolated proof is separately identified. Privacy runtime qualification remains separately denied by the Gateway operator role; no policy or credential bypass was used.

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 28e347fd-88da-4d15-904f-c687a853c002
@clawsweeper

clawsweeper Bot commented Nov 4, 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 docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime plugin: beam Beam session sharing plugin size: L labels Nov 4, 2026
@vincentkoc vincentkoc self-assigned this Nov 4, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment 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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR adds explicit Beam source retirement and one durable Team conversation reused across continuation, retry, restart, and reopen.

Example: Alice opens /beam/synthetic-alice-aaaaaaaaaaaa after releasing her published conversation.

  • Before: Her restricted publisher account cannot compose, and independent continuations can split subsequent work.
  • After: She can continue through ordinary destination permissions, and reopening returns the same Team conversation.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent implementation with production-path authority evidence and resolved prior findings; ordinary required CI is still pending.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The supplied joined proof runs the pinned client through real HTTP publication and CLI/Gateway entry points with synthetic inference, covering lost acknowledgment, turns, retry, restart, late-source rejection, and revocation without further inference; the real Gateway authority scenario additionally covers foreign publishers, forbidden models, and post-import rollback. Job outcomes were verified, while raw Actions logs were inaccessible through the sandbox redirect; no deployment or live-provider success is inferred.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Publishers cannot continue their owned Beam links, and repeated independent copies split subsequent conversation history.
Reason: The maintainer explicitly approved one-way logical continuity; this receiver implementation and the pinned companion jointly cover that direction without transferring credentials or source-machine control.

Merge readiness

✅ Ready for maintainer review

Keep open: the prior boot-budget and deletion-guidance findings are resolved, and no new actionable defect was found; required CI remains pending.

Priority: P2
Reviewed head: 81953d01bb3c95706940a20b9e53e1b7882aa9fc

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Beam plugin receives authenticated transcript snapshots, stores publication and handoff state in plugin SQLite, and delegates destination creation, authorization, history import, and model selection to existing Gateway owners.

flowchart LR
  A[Source Beam client] --> B[Authenticated Beam receiver]
  B --> C[Plugin SQLite ownership]
  C --> D[Gateway catalog continuation]
  D --> E[Session and model authorization]
  E --> F[One Team conversation]
  G[Control UI and client followups] --> E
Loading

Technical review

Best possible solution:

Use the existing plugin-state and Gateway session owners for one irreversible handoff, then land the pinned companion in the recorded receiver-first order.

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

Current-main source establishes independent-copy behavior and restricted publisher viewing without continuation; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The implementation extends existing ownership boundaries rather than adding a parallel session writer, and its durable claim states address demonstrated retry, restart, revocation, and deletion cases.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 79ea47fdf7cf.

Provenance checked

  • Independent snapshot continuation and exact model matching changes intended behavior with a stated reason (c79c8c4: The original continuation deliberately created independent copies using destination authorization, bounded untrusted history, and available permitted source models.)
  • Restricted publisher viewing keeps the original intent (6a82c55: Original-publisher access was isolated from shared catalog privileges and required current identity and Visitor authority before disclosure.)
  • Worker-owned Beam publication keeps the original intent (ec7b564: Publication ownership and quotas were made atomic while separating immutable publisher ownership from mutable attribution.)
  • Stale UI continuation protection keeps the original intent (c9c2263: Continuation must not navigate, send a draft, publish an error, or clear newer sending state after its conversation owner changes.)
  • Atomic session initialization keeps the original intent (cbc2017: Session creation and transcript consumers were moved onto shared actor operations while preserving lifecycle and rollback ownership.)
  • Prompt snapshot formatting keeps the original intent (111ae11: Canonical JSON bytes must not depend on formatter-ignore discovery in temporary generation roots.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit bbc73c3 adds extensions/beam/src/store.ts:11 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: bbc73c36bd6e; files: extensions/beam/src/store.ts)
  • Jason (Json): Raw commit c79c8c4 adds extensions/beam/src/session-catalog.ts:156 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c79c8c4c0aa7; files: extensions/beam/src/session-catalog.ts)
  • RoboClaw: Raw commit 6a82c55 adds extensions/beam/src/owned-view.ts:106 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6a82c555d2d4; files: extensions/beam/src/owned-view.ts)

PR surface

Source +1240, Tests +4053, Docs +7, Other +6. Total +5306 across 69 files. Added test files: 8.

View PR surface stats
Area Files Added Removed Net
Source 32 1609 369 +1240
Tests 32 4213 160 +4053
Docs 1 17 10 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 4 8 2 +6
Total 69 5847 541 +5306

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #192520
Summary: The canonical issue owns logical conversation continuity, and this PR supplies the receiver implementation coordinated with the companion client.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is an approved Beam capability expansion with limited reach and no demonstrated urgent regression.
  • merge-risk: 🚨 compatibility: The additive catalog contract and explicit-release requirement change continuation behavior for existing publishers; the maintainer-approved direction documents this tradeoff and coordinates the updated client.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • 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-11-04T03:57:31.119Z sha 53179a7 :: needs real behavior proof before merge. :: [P2] Reduce the added catalog-routing code to fit the boot budget
  • reviewed 2026-11-04T07:22:39.946Z sha 2dc78d6 :: blocked before merge. :: [P2] Reduce the remaining catalog code in the chat boot payload | [P3] Correct the deletion guidance for released Beams

Reviewed November 4, 2026, 2:47 AM ET / 07:47 UTC (Revision 3).

@vincentkoc vincentkoc changed the title fix(beam): let publishers continue from uploaded session links feat(beam): preserve live logical conversation handoff Nov 4, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 4, 2026 05:56
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member

@clawsweeper re-review

Please review exact head 81953d01bb3c95706940a20b9e53e1b7882aa9fc (tree cea3dcd0491cf6b6d1d812a6c9d804c001329116). The last review's boot, deletion-guidance and data-compatibility requests are addressed:

  • Native archive builds with fixed identity/pinned toolchain measured 153B gzip saved before this publication; canonical precompression/performance checks pass. Redundant scope checks and one-use cleanup closure are removed; synchronous source capture and every connection/session/agent/generation/token fence remain. Budgets/preloads unchanged. Hosted merged-tree performance is still required.
  • Both focused archive shards pass:24 UI ownership cases and10 native SQLite store cases. The added old-owned-row upgrade test seeds pre-handoff persisted data, proves list/read and nonmutating premature refusal, original-publisher refresh with owner/createdAt preservation, release and one destination across reopen. Existing ownerless restrictions remain covered.
  • Docs distinguish unreleased recreation from permanent retirement and released-and-bound link retention after snapshot removal.
  • Previous exact2dc CI passes all unit/browser UI shards, prompt snapshots and joined real client/Gateway/restart/revocation proof; those unchanged owner proofs are linked in the body. Final exact-head CI is pending and remains a landing gate.

No Team deployment or live-provider/account proof is claimed. Genuine Team screenshots remain deferred with no deployment; isolated UI proof is separately identified. Receiver lands before companion openclaw/agent-skills#356. Normal auth and the separately denied operator boundary remain enforced.

@clawsweeper

clawsweeper Bot commented Nov 4, 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 4, 2026
@vincentkoc
vincentkoc enabled auto-merge (squash) November 4, 2026 07:52
@vincentkoc
vincentkoc merged commit 7552558 into main Nov 4, 2026
183 checks passed
@vincentkoc
vincentkoc deleted the openclaw/prepare-native-publication-custody-for-the-accepted-beam branch November 4, 2026 07:59
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
* fix(beam): let publishers continue from uploaded session links

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 28e347fd-88da-4d15-904f-c687a853c002

* perf(ui): reuse catalog continuation policy inputs

* feat(beam): retain one live logical conversation across handoff

* fix(ui): fence catalog resolution across reconnects

* fix(beam): retire source ownership and continue the bound conversation

* test(beam): qualify native persistence and joined handoff diagnostics

* test(beam): join canceled client polls and honor history selectors

* fix(beam): bind resources to their disposal owners

* perf(ui): resolve catalog query links without duplicate discovery

* perf(ui): defer catalog continuation work to session actions

* fix(test): align prompt fixtures with canonical JSON bytes

Complete the snapshot-byte correction introduced upstream by111ae119613 (openclaw#192596). Preserve every parsed fixture value and carry its identical generator hunk for consistent head/merge qualification.

Co-authored-by: RomneyDa <[email protected]>

* perf(ui): load catalog continuation outside common action preloads

* test(ui): model unbound catalog resolution in Gateway defaults

* fix(beam): trim continuation boot work and verify stored upgrades

---------

Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: beam Beam session sharing plugin proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed size: XL 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.

feat(beam): preserve logical conversation continuity across Team handoff

2 participants