Skip to content

fix(beam): open uploads at canonical catalog URLs - #120927

Merged
steipete merged 5 commits into
mainfrom
steipete/suspicious-heisenberg-41a7fc
Aug 9, 2026
Merged

steipete merged 5 commits into
mainfrom
steipete/suspicious-heisenberg-41a7fc

Conversation

@steipete

@steipete steipete commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users opening a Beam upload from the returned Control UI URL would receive the stale ?session= route. That route no longer preserved the Beam catalog identity, so the UI could not reliably reopen the uploaded session, especially when the operator configured a non-main default agent or a nested Control UI base path.

Why This Change Was Made

Beam now emits the canonical catalog route, /chat/<agent>?catalog=beam&host=gateway&thread=<beamId>, using the configured default agent and Control UI base path. URL construction lives in the shared session URL contract and is exposed to Beam through the private/local session-catalog runtime facade, keeping catalog routing policy with the existing session URL owner without adding public Plugin SDK surface.

The old Beam-only session-key encoder and base-path normalizer are removed. This intentionally limits the change to canonical catalog URL emission; it does not add compatibility aliases or broaden session URL normalization elsewhere.

User Impact

Beam upload responses now link directly to the uploaded catalog session. The link works with the default main agent, a configured default agent, and nested Control UI base paths.

Release-note context: Beam upload links now open the correct catalog-backed Control UI session instead of returning the obsolete ?session= URL.

Evidence

  • Focused post-rebase proof: 22 tests passed across packages/session-url-contract/src/index.test.ts (7), extensions/beam/src/beam.test.ts (8), and ui/src/lib/sessions/route-navigation.test.ts (7).
  • Live isolated Gateway proof: an unauthenticated upload returned HTTP 401; an authenticated upload returned /admin/openclaw/chat/research?catalog=beam&host=gateway&thread=<id>; requesting that route returned HTTP 200.
  • pnpm plugin-sdk:surface:check passed with public SDK counts unchanged: 151 entrypoints, 4,844 exports, and 0 package-exported forbidden subpaths.
  • pnpm plugin-sdk:api:gen refreshed the generated API baseline against the rebased Plugin SDK generator: all 151 modules were retained, with 48 hash rotations and no module additions/removals or budget changes. pnpm plugin-sdk:api:check and pnpm plugin-sdk:surface:check both passed on that generated output.
  • git diff --check origin/main...HEAD passed.
  • Production LOC: +46/-21 (net +25). The growth centralizes the canonical catalog URL contract and carries configured agent/base-path facts at the owner boundary. Tests: +102/-13 (net +89). Docs: +1/-1.

Exact-head CI blocker repaired

This PR also repairs a current-main minimal Gateway startup regression that repeatedly blocked its exact-head CI. Commit 3bfe82180e1d made the chat metadata catch-up refresh unconditional: minimal Gateways intentionally register no listener sidecar and already refresh lazily through beforeRefresh plus refreshOnRead, but startup nevertheless awaited prepared-model publication for up to 120 seconds. The catch-up now remains awaited only when listener registration actually returns a sidecar, preserving full Gateway reconciliation while keeping minimal startup lazy.

  • Production delta for this repair: +7/-7 (net zero). Tests: +129/-0.
  • Lifecycle regression proof: 3/3 passed, covering minimal lazy attachment, full listener/catch-up attachment, and failure logging.
  • The two previously blocked Control UI E2E files passed together 3/3 in 28.69 seconds.
  • Blacksmith Testbox lease tbx_01kzjr6epgrgxwax8jk78e7kpj: build passed in 5m3.95s; the full two-file check-changed plan passed in 5m45.29s.
  • Fresh structured autoreview completed cleanly with no accepted or actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui plugin: beam Beam session sharing plugin size: S maintainer Maintainer-authored PR labels Aug 9, 2026
@steipete steipete self-assigned this Aug 9, 2026
@steipete
steipete marked this pull request as ready for review August 9, 2026 05:40
@steipete
steipete force-pushed the steipete/suspicious-heisenberg-41a7fc branch from 962d035 to 2dd8540 Compare August 9, 2026 07:12
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. labels Aug 9, 2026
@clawsweeper

clawsweeper Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 4:49 AM ET / 08:49 UTC.

ClawSweeper review

What this changes

Beam upload responses switch from a legacy session-key URL to the canonical catalog route, and minimal Gateway startup avoids an unnecessary metadata refresh.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking code findings. The PR remains necessary because current main still returns Beam’s obsolete session URL; the proposed shared URL owner is the appropriate fix. It needs normal maintainer review after the remaining exact-head check completes.

Priority: P2
Reviewed head: 7cf9c410fa07bb19dfeb7ecfa5cdacb49bf09a55

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch follows the established catalog route contract and reports focused live and regression proof, with exact-head CI still finishing.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body additionally records an authenticated upload-and-route HTTP proof.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body additionally records an authenticated upload-and-route HTTP proof.
Evidence reviewed 6 items Current-main behavior: Current main still constructs Beam’s legacy ?session= response, so the PR is not redundant.
Canonical URL owner: The PR head delegates URL path and query construction to the shared session URL contract, while Beam supplies only its catalog facts.
Control UI compatibility: The Control UI route loader already reconstructs catalog session identity from catalog, host, and thread, matching the PR’s emitted URL shape.
Findings None None.
Security None None.

How this fits together

Beam accepts uploads and returns a Control UI URL; the session URL contract turns Beam’s catalog identity plus agent and base-path settings into a route the Control UI can reopen. Separately, Gateway startup attaches metadata listeners for full Gateways while minimal test Gateways refresh lazily on their first read.

flowchart LR
  A[Beam upload] --> B[Beam request handler]
  C[Agent and Control UI settings] --> D[Canonical catalog URL builder]
  B --> D
  D --> E[Control UI catalog route]
  E --> F[Catalog session]
  G[Gateway startup] --> H[Metadata listener decision]
Loading

Before merge

  • Resolve merge risk (P1) - Beam’s documented upload response changes from ?session= to catalog query parameters; integrations parsing the legacy URL need maintainer acceptance of this intentional replacement.
  • Resolve merge risk (P1) - The remaining exact-head check is still running, and the branch is behind main, so merge should wait for the normal exact-head status and review refresh.
  • Complete next step (P2) - The maintainer label and a running exact-head check require human merge handling; there is no concrete automated repair remaining.
Agent review details

Security

None.

PR surface

Source +27, Tests +218, Docs 0, Generated 0. Total +245 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 5 55 28 +27
Tests 4 231 13 +218
Docs 1 1 1 0
Config 0 0 0 0
Generated 1 48 48 0
Other 0 0 0 0
Total 11 335 90 +245

Review metrics

Metric Value Why it matters
Production versus regression coverage production +53/-28; tests +231/-13 The production growth centralizes the URL owner and makes the Gateway lifecycle repair net-neutral while adding focused route and lifecycle coverage.

Stored data model

Persistent data-model change detected: serialized state: packages/session-url-contract/src/index.test.ts, serialized state: packages/session-url-contract/src/index.ts, serialized state: src/plugin-sdk/session-catalog-runtime.ts, serialized state: ui/src/lib/sessions/route-navigation.test.ts, unknown-data-model-change: src/gateway/server-chat-metadata-lifecycle.test.ts, vector/embedding metadata: src/gateway/server-chat-metadata-lifecycle.test.ts, and 1 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Confirm the canonical response transition (recommended)
    Merge after the remaining exact-head check is green and maintainers accept the documented catalog URL as the replacement for the legacy session-key response.

Technical review

Best possible solution:

Keep one canonical catalog URL builder, land it after exact-head validation, and explicitly accept the documented Beam response-format transition.

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

Yes. The PR body records an authenticated isolated-Gateway upload returning the canonical route and an HTTP 200 route fetch; current source independently shows main still returns the obsolete session-key URL.

Is this the best way to solve the issue?

Yes. The shared session URL contract already owns path normalization and encoding, so placing catalog URL construction there removes Beam-specific duplicated routing logic.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 29c442d48389.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: The documented Beam upload response changes its URL shape, which may affect consumers that parse the legacy session query parameter.

Label justifications:

  • P2: Beam upload links fail to reopen the intended catalog session, but the impact is bounded and not a core-runtime outage.
  • merge-risk: 🚨 compatibility: The documented Beam upload response changes its URL shape, which may affect consumers that parse the legacy session query parameter.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body additionally records an authenticated upload-and-route HTTP proof.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger authored the current Beam URL path, the gateway lifecycle commit, and the PR’s related changes. (role: feature owner and recent area contributor; confidence: high; commits: ec866d8abc, 3bfe82180e1d, 2e4d1bd5c364; files: extensions/beam/src/http.ts, packages/session-url-contract/src/index.ts, src/gateway/server-chat-metadata-lifecycle.ts)

Rank-up moves

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

  • Wait for the remaining exact-head check and refresh review after any rebase.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-09T07:44:48.540Z sha 2dd8540 :: needs maintainer review before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M and removed size: S labels Aug 9, 2026
@steipete

steipete commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The new head adds a bounded Gateway behavior repair after the prior review: minimal Gateways remain lazy and sidecar-free, while full Gateways still await listener catch-up. The PR body contains the root cause and focused exact-source/Testbox proof.

@clawsweeper

clawsweeper Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the steipete/suspicious-heisenberg-41a7fc branch from 67aa454 to 7cf9c41 Compare August 9, 2026 08:25
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Aug 9, 2026
@steipete
steipete merged commit c708b41 into main Aug 9, 2026
126 checks passed
@steipete
steipete deleted the steipete/suspicious-heisenberg-41a7fc branch August 9, 2026 09:09
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 10, 2026
* fix(beam): emit canonical catalog URLs

* fix(beam): type readonly runtime config

* fix(gateway): keep minimal metadata startup lazy

* chore(plugin-sdk): refresh API baseline
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 maintainer Maintainer-authored PR 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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