Skip to content

fix(beam): keep automatic mirrors on the original authorized source - #204568

Merged
vincentkoc merged 15 commits into
mainfrom
fix/beam-mirror-source-home
Nov 24, 2026
Merged

vincentkoc merged 15 commits into
mainfrom
fix/beam-mirror-source-home

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Depends on #204558.

What Problem This Solves

The Beam mirror previously selected rows by Gateway host kind and dropped the source home when reading a thread. A federated Gateway can look local, and more than one home can contain the same thread. Assigning a new public ID on upgrade can also publish a fresh row after the old source was released.

User Impact

The v1 mirror uses each eligible source's original public ID and keeps its exact agent and home for every read. Imported, unclassified, and ambiguous sessions require explicit selection. A receiver's previous release continues to retire the source. A catalog removed from the allowlist during a read cannot publish the pending result.

Why This Change Was Made

Providers can certify that host and thread identify the original native source across agents and homes. The host-qualified Codex homes can make that guarantee. The rebindable primary alias cannot. The receiver still sees the same v1 ID it used to track both publications and their release receipts.

Evidence

The staged formatter and whitespace checks passed. Regression cases exercise a qualified source with an existing v1 release receipt, two homes sharing an ID, an unclassified source, and a catalog removed while its read is in progress. Blacksmith Testbox completed the historical release, source identity and host-isolation suites described below.

Validation

Trusted Blacksmith proof passed the historical v1 release, ambiguous source, full-locator and host isolation scenarios in Beam, Claude, Pi and Codex at 002fc4f. https://github.com/openclaw/openclaw/actions/runs/45372668964

The subsequent reviewed Pi optimization reuses the uniqueness index across each native discovery generation. It does not retain file decisions after that generation expires. The latest source review cleared that change and the amended operator examples.

The synthetic credential integration catalog now declares native eligibility and its source home at 2c3f738. It still checks the prepared bearer, mid-read revocation, cold secret store and recovery. A pre-existing released v1 publication can originate on the frozen main implementation. The latest stable source sender has the same deterministic v1 ID and its receiver predates release receipts. The historical active-release regression therefore exercises the revision that can actually create that state.

The incremental change at f101a870 uses the same strict agent selector for discovery and dispatch and preserves the source identity on the fresh Pi projection. The earlier run's Android instrumentation job stopped during dependency download with HTTP 403.

@vincentkoc vincentkoc self-assigned this Nov 24, 2026
@clawsweeper

clawsweeper Bot commented Nov 24, 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 extensions: acpx extensions: anthropic extensions: codex plugin: beam Beam session sharing plugin size: M labels Nov 24, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 24, 2026 10:20
…-mirror-source-home

* commit 'c7030b6eecc0924071adf03aec1f7feeae92d477':
  test(plugins): assert federated provenance in receiver integration
@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. labels Nov 24, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 24, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 24, 2026
…-mirror-source-home

* commit 'd066b15cbf5cdfa58b07e98e22bcec490fc0bd17':
  fix(catalog): project export policy within linted row mappings

# Conflicts:
#	extensions/acpx/src/pi-session-catalog-runtime.ts
@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Bind automatic Beam exports to producer-certified native sources while preserving historical publication IDs.

Example: Two catalog rows identify thread shared under home-a and home-b.

  • Before: The mirror collapses their identities and reads without the selected home.
  • After: The mirror skips the conflicting publication instead of uploading an ambiguous transcript.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is coherent and the previous finding is resolved, but the inspectable evidence does not establish required product behavior.
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: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Automatic mirroring can select an unintended source or publish a separate identity after a historical source publication was released.
Reason: The maintainer-authored direction preserves receiver ownership and narrows automatic sharing to sources the producer can identify.

Merge readiness

✅ Ready for maintainer review

This PR addresses a source-selection defect that remains on main; the earlier credential-fixture finding is fixed, and no new correctness blocker was found.

Priority: P2
Reviewed head: 66ee4a21a10b7a7a4b2b7759afdcbbd938292a52

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Record the shipped Gateway mirroring a bound native source, rejecting an ambiguous source, and preserving an existing v1 publication through upgrade; base-red/head-green regression execution is not shown.
Agent review details

How this fits together

Beam polls registered session catalogs, reads eligible local transcripts, and uploads bounded snapshots to a configured receiver.

flowchart LR
A[Native session files] --> B[Catalog providers]
B --> C[Source eligibility and locator]
C --> D[Beam mirror]
D --> E[Bound transcript read]
E --> F[Beam receiver]
Loading

Technical review

Best possible solution:

Keep producer-owned eligibility, exact source locators, and the existing receiver publication identity in the current catalog and mirror owners.

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

Current main visibly ignores producer export eligibility and drops the selected source home before reading; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The change repairs the existing owners rather than introducing a second exporter, and retaining v1 IDs prevents bypassing receiver retirement through a newly minted publication.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Beam publication IDs and catalog reuse keeps the original intent (7e8afba: Continuously mirror local sessions through existing catalog providers and deterministic publication IDs.)
  • Dispatch-time credential selection keeps the original intent (bb8183d: Use prepared current credentials and pause only outbound mirroring when credentials are unavailable.)
  • Provider-owned export eligibility keeps the original intent (3584473: Distinguish native local sessions from imported and federated catalog rows.)
  • Interactive Pi lookup and catalog composition keeps the original intent (4d4ee7b: Keep shared catalog composition in one owner while providers retain storage-specific behavior.)
  • Codex automatic mirroring changes intended behavior with a stated reason (7e8afba: Include local Codex sessions in automatic mirroring; this change documents their exclusion because historical host aliases cannot identify one publication reliably.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 7e8afba adds extensions/beam/src/mirror.ts:305 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7e8afba70325; files: extensions/beam/src/mirror.ts)

PR surface

Source +156, Tests +166, Docs +8. Total +330 across 19 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 11 196 40 +156
Tests 6 172 6 +166
Docs 2 10 2 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 19 378 48 +330

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
Catalog protocol extension 1 optional policy field stableHostThreadIdentity supplies the producer guarantee required by the v1 mirror without adding user configuration.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This fixes source selection in an opt-in background export workflow with limited blast radius.
  • merge-risk: 🚨 compatibility: Existing Codex and uncertified catalog mirrors stop exporting automatically; the maintainer-authored change explicitly accepts and documents this restriction.
  • 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 (3 earlier review cycles)
  • reviewed 2026-11-24T10:44:37.245Z sha e2fa8ee :: needs changes before merge. :: [P2] Update the credential integration catalog for export eligibility
  • reviewed 2026-11-24T10:56:48.938Z sha 2c3f738 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-24T11:12:49.760Z sha f101a87 :: needs maintainer review before merge. :: none

Reviewed November 24, 2026, 6:34 AM ET / 11:34 UTC (Revision 4).

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Check 2c3f738. The native credential integration fixture now declares the actual producer, source home and stable automatic eligibility. Its existing prepared-token, cold-reload and recovery assertions remain.

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 24, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review the current head f101a8709cb2e63c1babb69792071dbbeb6587dd. It consolidates discovery and dispatch agent selection and repairs the two linted row projections.

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Base automatically changed from feat/catalog-export-provenance to main November 24, 2026 11:26
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review current head 66ee4a21a10b7a7a4b2b7759afdcbbd938292a52 against main. Catalog provenance from the prerequisite has landed. This merge preserves the exact mirror identity diff previously reviewed at f101a8709cb2e63c1babb69792071dbbeb6587dd (stable patch ID dac7cfc7ed5d).

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc
vincentkoc merged commit c4c9a78 into main Nov 24, 2026
126 checks passed
@vincentkoc
vincentkoc deleted the fix/beam-mirror-source-home branch November 24, 2026 12:26
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 25, 2026
…penclaw#204568)

* feat(catalog): identify sessions eligible for automatic export

* fix(codex): reserve automatic export for direct managed sessions

* test(session-share): verify provenance in projected peer rows

* fix(beam): keep mirror reads bound to the selected source home

* fix(beam): fence automatic exports at the original v1 publication

* fix(beam): pin source files and fence historical host aliases

* perf(acpx): share Pi file identity checks across a catalog scan

* test(plugins): assert federated provenance in receiver integration

* fix(catalog): project export policy within linted row mappings

* test(beam): preserve the native credential reload integration

* refactor(beam): share the current agent selection at dispatch
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 extensions: acpx extensions: anthropic extensions: codex 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 rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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.

1 participant