Skip to content

feat(catalog): identify local sources for automatic session exports - #204558

Merged
vincentkoc merged 5 commits into
mainfrom
feat/catalog-export-provenance
Nov 24, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
feat/catalog-export-provenance

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

A catalog can present both a native session and a conversation received from another Gateway. Both can currently appear under a Gateway host. An exporter needs the producing catalog to identify which rows can be selected automatically.

User Impact

Catalog integrations can distinguish native local sessions from imported copies and federated sessions. This is the producer contract for the Beam connector. Existing catalog clients can keep selecting sessions explicitly.

Why This Change Was Made

Each provider knows its own source. Codex checks the selected home and locally started connection. Pi and Session Share assign provenance on the receiving side. The optional policy combines source origin with permission for automatic export.

Evidence

The Codex catalog and both Session Share catalog suites passed on Blacksmith Testbox. The same run checked protocol compatibility against the base commit. The changes include direct managed stdio, a managed proxy with an explicit socket, and a custom executable. The preceding run exercised all 13 Pi tests, including the paired-node case. The protocol registry, schema generation, and native model determinism checks also passed.

At d066b15, the direct native Testbox command ran the same oxc/no-map-spread rule on the two previously failing files, then passed all 11 Session Share integration tests. Lease tbx_01m86jk3waprekb7399yynqcb8. The separate installed-Gateway qualification is exercising native, imported and proxied catalog rows.

@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 plugin: session-share size: S labels Nov 24, 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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 24, 2026
@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds optional catalog-row metadata identifying native, imported, and federated sessions and their eligibility for automatic export.

Example: A paired Pi node returns thread pi-remote with native-local provenance and automatic export enabled.

  • Before: The receiving Gateway has no explicit export-provenance contract for the row.
  • After: The receiver marks pi-remote as federated with automatic export disabled.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is focused and source review found no actionable defect, but supplied tests do not complete the required shipped-entry-point proof.
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: Export integrations cannot reliably distinguish native sessions from received or federated conversations using Gateway host kind.
Reason: The maintainer-authored proposal supplies a narrow, reusable producer contract with a concrete downstream consumer.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR supplies a useful producer contract for automatic exports, and review found no actionable code defect.

Priority: P2
Reviewed head: d066b15cbf5cdfa58b07e98e22bcec490fc0bd17

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide the installed-Gateway result showing native eligibility, imported and federated exclusion, and proxy/custom-command classification through sessions.catalog.list.
Agent review details

How this fits together

Catalog plugins project native stores and remote sources into Gateway session rows consumed by clients and export integrations.

flowchart LR
  A[Native session stores] --> C[Catalog providers]
  B[Paired nodes and Gateways] --> D[Receiver projections]
  D --> C
  C --> E[Gateway catalog rows]
  E --> F[Clients and export integrations]
Loading

Technical review

Best possible solution:

Keep provenance with existing catalog producers and receiver projections, with automatic selection enforced by the downstream exporter.

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

This is a feature contract rather than a bug reproduction; current-main source confirms the metadata is absent.

Is this the best way to solve the issue?

The change uses the existing schema and projection owners, preserves source-home identity and explicit selection, and adds no competing exporter or persistent state.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Codex source and action projection keeps the original intent (6b16949: Keep catalog actions bound to their selected physical source home; the PR retains that identity and existing action eligibility.)
  • Shared local and paired-node catalog family keeps the original intent (4d4ee7b: Consolidate shared paging, composition, and capability projection; provenance is added at that existing receiver boundary.)
  • Session Share receiver projections keeps the original intent (177e554: Use one receiver path while preserving source publication boundaries and identity projection; those behaviors remain intact.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned change and focused repair: The introduced diff adds provenance through existing projection owners; the latest commit replaces the two reported map-spread expressions without changing their intended output. (extensions/session-share/src/gateway-catalog.ts:279, d066b15cbf5c)
  • Current-main capability gap: Fetched main lacks exportPolicy in the catalog-row schema and Codex projection; this PR provides the producer metadata consumed by the separate Beam work. (packages/gateway-protocol/src/schema/sessions-catalog.ts:68, 74f61cac6c81)
  • Source qualification: Codex grants native automatic eligibility only for a matching source home using a managed, non-proxy stdio launch; remote sources receive federated provenance. (extensions/codex/src/session-catalog.ts:165, d066b15cbf5c)
  • Personally inspected Codex dependency contract: The changed classification depends on Codex launch semantics. The sibling implementation forwards app-server proxy to the explicitly selected Unix socket, supporting exclusion from local-home attestation; the sibling repository owner was not independently established. (codex-rs/cli/src/main.rs:1510, d32063f96c2dff1dc96af839b3952abb6acfeda4)
  • Distinct downstream consumer: fix(beam): keep automatic mirrors on the original authorized source #204568 explicitly depends on this PR and applies the producer contract to Beam mirror selection and source-bound reads. (2c3f738fd587)
  • Validation and proof coverage: The current body reports focused lint and integration-test success but describes installed-Gateway qualification as ongoing. Exact-head check-lint, production types, test types, and both changed extension bundles passed. The older linked workflow is cancelled; its redirected logs were blocked by the review environment, so cancellation is not treated as evidence against the reported individual test results. (d066b15cbf5c)

Likely related people:

  • Vincent Koc: Raw commit 177e554 adds extensions/session-share/src/session-catalog.ts:147 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 177e5545ddfb; files: extensions/session-share/src/session-catalog.ts)

PR surface

Source +43, Tests +46, Docs +6. Total +95 across 14 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 59 16 +43
Tests 5 98 52 +46
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 163 68 +95

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.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A useful catalog capability with limited immediate blast radius; this PR does not activate automatic exporting.
  • merge-risk: 🚨 compatibility: Adds an optional public Plugin SDK and Gateway row contract; the maintainer-authored direction is accepted and existing explicit selection remains available.
  • 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.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Publish the result of the installed-Gateway qualification already described in the PR body.

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 (1 earlier review cycle)
  • reviewed 2026-11-24T10:42:36.456Z sha c7030b6 :: needs maintainer review before merge. :: none

Reviewed November 24, 2026, 5:56 AM ET / 10:56 UTC (Revision 2).

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Check d066b15 after the two reported extension lint errors were repaired. The direct focused lint and all 11 Session Share integration tests passed.

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc
vincentkoc merged commit 3584473 into main Nov 24, 2026
129 checks passed
@vincentkoc
vincentkoc deleted the feat/catalog-export-provenance branch November 24, 2026 11:26
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

@obviyus

obviyus commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Scheduled main CI went red after this merge: checks-node-compact-large-15, src/gateway/server-methods/session-catalog.test.ts > "keeps a delayed source off the catalog RPC path" (run https://github.com/openclaw/openclaw/actions/runs/45394324890, head 546d736). The assertion: expected [ { …(7) } ] to deeply equal [ { …(6) } ]. The catalog entry now carries an extra exportPolicy field ({ "automatic": false, "origin": "federated", … }) that the test's expected entry does not list.

Bisect, local Node (node scripts/run-vitest.mjs run src/gateway/server-methods/session-catalog.test.ts), between the last green scheduled head 60d2ac6 and 546d736:

Could you update the test's expected entry for the new exportPolicy field, or confirm the field should not reach this RPC path?

vincentkoc added a commit that referenced this pull request Nov 24, 2026
The receiver adds federated export provenance to shared catalog rows. Include it in the existing exact row assertion while retaining the unchanged peer fixture and latency, coalescing, and failure checks.

Related: #204558

Validated: original focused case reproduces the scheduled CI failure; all 15 catalog Gateway tests pass with the updated expectation. Targeted lint, format, and Gateway-method test typecheck pass.
vincentkoc added a commit that referenced this pull request Nov 24, 2026
The receiver adds federated export provenance to shared catalog rows. Include it in the existing exact row assertion while retaining the unchanged peer fixture and latency, coalescing, and failure checks.

Related: #204558

Validated: original focused case reproduces the scheduled CI failure; all 15 catalog Gateway tests pass with the updated expectation. Targeted lint, format, and Gateway-method test typecheck pass.
(cherry picked from commit 4c68c0b)
vincentkoc added a commit that referenced this pull request Nov 24, 2026
The receiver adds federated export provenance to shared catalog rows. Include it in the existing exact row assertion while retaining the unchanged peer fixture and latency, coalescing, and failure checks.

Related: #204558

Validated: original focused case reproduces the scheduled CI failure; all 15 catalog Gateway tests pass with the updated expectation. Targeted lint, format, and Gateway-method test typecheck pass.

(cherry picked from commit 4c68c0b)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 25, 2026
…penclaw#204558)

* 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

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

* fix(catalog): project export policy within linted row mappings
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 25, 2026
The receiver adds federated export provenance to shared catalog rows. Include it in the existing exact row assertion while retaining the unchanged peer fixture and latency, coalescing, and failure checks.

Related: openclaw#204558

Validated: original focused case reproduces the scheduled CI failure; all 15 catalog Gateway tests pass with the updated expectation. Targeted lint, format, and Gateway-method test typecheck pass.
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 plugin: session-share 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.

2 participants