Skip to content

perf(gateway): load catalog choices without enumerating sessions - #150831

Merged
steipete merged 17 commits into
mainfrom
codex/catalog-metadata-only-2582
Sep 18, 2026
Merged

steipete merged 17 commits into
mainfrom
codex/catalog-metadata-only-2582

Conversation

@steipete

@steipete steipete commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Opening the new-session picker or loading catalog labels in Settings enumerates session hosts and history even though these views only need catalog descriptions.

User Impact

Catalog choices and labels load without waiting for session enumeration. Terminal selection continues to discover actual hosts. No configuration or migration is required.

Implementation

The existing sessions.catalog.list RPC gains metadataOnly: true. After catalog and agent validation, it returns descriptors with hosts: [] before acquiring the session projection, enumerating providers, discovering nodes, or setting up progress delivery. The picker and Settings opt in; full listings retain readiness, visibility, authorization, and registry invalidation. Both modes share one result serializer.

The branch incorporates current main's resident catalog queries and the port-fixture repairs in #151318. Superseded filesystem, planner, and UI fixture changes are absent from the final delta.

Validation

  • 196 catalog/protocol cases passed after resident-query integration. Original-code controls fail projection-acquisition, provider-enumeration, and UI metadata-request regressions.
  • Focused proof passed 114 UI unit and 34 browser cases, including pagination across 200 rows, refresh/removal, and Active/All transitions. The final main composition passed all 16 picker/stream-budget cases with unchanged thresholds.
  • Protocol/schema, Swift/Kotlin generation, selected lint/type checks, and independent reviews passed. Unsplit local lint retains an unrelated diagnostic also reproduced on unchanged main; exact striped lint and the suppression guard pass.
  • Supporting port regressions passed 25 allocator and 124 MCP cases. Exact-head hosted CI 35315385283 passed on attempt 2 at 05c9270e630e3e2e92b74f360dc4d959d3b81ad3.

The original CI run failed a chat-rail anchor assertion. All 17 relevant owner/harness files match its CI main baseline, and the local failing flow does not call the catalog endpoint. A single targeted retry passed on unchanged source and assertions. Separate deterministic regressions reproduce the 43-pixel resize jump and keyboard-focus eviction; the UI repair is tracked separately. The original failures remain retained, and the green retry does not resolve that defect. No Team deployment or controlled production latency improvement is claimed.

The inspected synthetic before/after captures show settled visual parity.

View Before After
New-session picker Before: New-session picker After: New-session picker
Settings catalog labels Before: Settings catalog labels After: Settings catalog labels

@clawsweeper

clawsweeper Bot commented Sep 17, 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 size: M maintainer Maintainer-authored PR labels Sep 17, 2026
@steipete
steipete marked this pull request as ready for review September 17, 2026 11:08
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 3:45 AM ET / 07:45 UTC (Revision 18).

ClawSweeper review

What this changes

Adds metadata-only catalog requests for the new-session picker and Settings labels, updates protocol documentation and generated Swift models, and repairs supporting test fixtures.

Merge readiness

✅ Ready for maintainer review

The central optimization remains absent from current main and the latest release. No actionable introduced defect was found; the PR remains a useful landing candidate.

Priority: P2
Reviewed head: 05c9270e630e3e2e92b74f360dc4d959d3b81ad3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused additive optimization with meaningful regression coverage, inspected visual parity, and verified successful hosted CI.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied maintainer context exempts this PR from the external-contributor proof gate. Inspected screenshots establish visual parity only; handler and browser coverage support the metadata path, without claiming measured production speedup.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied maintainer context exempts this PR from the external-contributor proof gate. Inspected screenshots establish visual parity only; handler and browser coverage support the metadata path, without claiming measured production speedup.
Evidence reviewed 10 items Pinned implementation: The introduced metadata branch validates the selected agent and catalog, returns shared serialized descriptors with empty hosts, and exits before handler-level projection acquisition, provider enumeration, and progress setup. Full listing retains its existing path.
Current-main necessity: Current main still acquires the session projection and performs provider listing for catalog discovery; its request schema has no metadataOnly property.
Latest-release comparison: The supplied latest release, v2026.9.4, also lacks metadataOnly in its catalog-list schema; the central addition is not already shipped there.
Findings None None.
Security None None.

How this fits together

The Gateway exposes plugin session catalogs to the Control UI. Catalog descriptions populate choices and labels, while full listings supply hosts and session history for browsing and terminal selection.

flowchart TD
  A[Control UI request] --> B[Gateway permission and selection checks]
  B --> C{Metadata only?}
  C -->|Yes| D[Registered catalog descriptions]
  C -->|No| E[Host and session enumeration]
  D --> F[Picker choices and Settings labels]
  E --> G[Session browsing and terminal hosts]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +41, Tests +287, Docs +1, Other +4. Total +333 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 5 77 36 +41
Tests 12 473 186 +287
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 0 +4
Total 19 555 222 +333

Review metrics

Metric Value Why it matters
RPC surface 1 optional boolean parameter; full-list default preserved Both lightweight consumers opt in without changing existing callers or stored configuration.
Production versus test growth Production net +45 lines; tests and test support net +287 lines Production growth supplies the early-return path and one shared serializer; most growth covers regression and fixture behavior.

Technical review

Best possible solution:

Keep lightweight discovery within the existing catalog RPC and shared serializer, while preserving full enumeration for consumers that need actual hosts or sessions.

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

Not applicable as a new RPC mode; source inspection confirms that current discovery requests enter full enumeration, but no production latency measurement was performed.

Is this the best way to solve the issue?

Yes. An opt-in branch in the existing RPC avoids unnecessary enumeration without duplicating plugin policy or changing terminal-host discovery.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded catalog-loading performance improvement with preserved full-list behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied maintainer context exempts this PR from the external-contributor proof gate. Inspected screenshots establish visual parity only; handler and browser coverage support the metadata path, without claiming measured production speedup.

Evidence

What I checked:

  • Pinned implementation: The introduced metadata branch validates the selected agent and catalog, returns shared serialized descriptors with empty hosts, and exits before handler-level projection acquisition, provider enumeration, and progress setup. Full listing retains its existing path. (src/gateway/server-methods/session-catalog.ts:313, 05c9270e630e)
  • Current-main necessity: Current main still acquires the session projection and performs provider listing for catalog discovery; its request schema has no metadataOnly property. (packages/gateway-protocol/src/schema/sessions-catalog.ts:117, 90f47f2e7a00)
  • Latest-release comparison: The supplied latest release, v2026.9.4, also lacks metadataOnly in its catalog-list schema; the central addition is not already shipped there. (packages/gateway-protocol/src/schema/sessions-catalog.ts:117, 3a9d69db306c)
  • Consumer and compatibility boundary: Discovery requests metadata only, while resolveCreateTarget still requests a selected catalog with limitPerHost: 1 and consumes actual terminal hosts. UI policy explicitly couples the served UI and Gateway versions. No persisted setting, migration, or plugin-provider interface changes. (ui/src/pages/new-session/catalog-target.ts:191, 05c9270e630e)
  • Authorization and implementation boundary: Gateway pre-dispatch authorization remains unchanged. Metadata contains the same catalog-level descriptions previously returned alongside filtered hosts; it grants no terminal or session authority. The existing plugin contract defines create targets as synchronous and config-derived, so this change does not depend on the Codex runtime or protocol. (src/plugins/session-catalog.ts:196, 05c9270e630e)
  • Regression coverage: Added handler coverage asserts no enumeration, projection acquisition, or progress publication in metadata mode, preserves full-list behavior, and checks registry replacement, invalid agents, retired catalogs, and config-scoped create-target caching. Browser fixtures distinguish metadata discovery from terminal-host listing. (src/gateway/server-methods/session-catalog.test.ts:22, 05c9270e630e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (17 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-18T01:22:49.554Z sha 385626f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T02:15:54.880Z sha 53d5ae0 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T03:00:45.264Z sha 435c4e0 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T04:32:58.879Z sha 6984be9 :: blocked before merge. :: none
  • reviewed 2026-09-18T04:44:10.807Z sha 367d667 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T05:12:16.031Z sha 0b90ace :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T05:39:21.662Z sha 6792dac :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T06:44:02.802Z sha 05c9270 :: needs maintainer review before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Sep 17, 2026
@steipete steipete changed the title improve: load catalog choices without enumerating sessions perf(gateway): load catalog choices without enumerating sessions Sep 17, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 18, 2026
@steipete steipete self-assigned this Sep 18, 2026
steipete added a commit that referenced this pull request Sep 18, 2026
Doctor process tests could time out without diagnostics, then release fixtures before child cleanup completed. Route built/source fixtures through the shared CLI diagnostic harness, join direct-child exit and natural output EOF, and retain reports, input/state fixtures, and resource claims when cleanup is unverified. Preserve the original failure, command deadlines, command order, flags, output limits, and successful launcher handoff.

Use getCliProcessTestTimeout to reserve enclosing diagnostic and cleanup time without extending child execution deadlines. This changes tests and test support only; the intermittent production exit hang remains unreproduced. Signal delivery to the CLI respawn wrapper rather than the command grandchild remains a report-only follow-up.

Related: #151124, #150831. Thanks to @jalehman for additional matching-main timeout evidence.

Validation: exact-head CI run 35293520168 is green; approved committed-branch review is scoped-clean through P1; exact-head ClawSweeper review has no actionable findings or remaining Rank-up moves. The integration owner also reported 28 focused cases and the selected sixteen-file gate passing on byte-identical changed files.
@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Sep 18, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
Doctor process tests could time out without diagnostics, then release fixtures before child cleanup completed. Route built/source fixtures through the shared CLI diagnostic harness, join direct-child exit and natural output EOF, and retain reports, input/state fixtures, and resource claims when cleanup is unverified. Preserve the original failure, command deadlines, command order, flags, output limits, and successful launcher handoff.

Use getCliProcessTestTimeout to reserve enclosing diagnostic and cleanup time without extending child execution deadlines. This changes tests and test support only; the intermittent production exit hang remains unreproduced. Signal delivery to the CLI respawn wrapper rather than the command grandchild remains a report-only follow-up.

Related: openclaw#151124, openclaw#150831. Thanks to @jalehman for additional matching-main timeout evidence.

Validation: exact-head CI run 35293520168 is green; approved committed-branch review is scoped-clean through P1; exact-head ClawSweeper review has no actionable findings or remaining Rank-up moves. The integration owner also reported 28 focused cases and the selected sixteen-file gate passing on byte-identical changed files.
@openclaw-barnacle openclaw-barnacle Bot added the cli CLI command changes label Sep 18, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the cli CLI command changes label Sep 18, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the agents Agent runtime and tooling label Sep 18, 2026
@steipete
steipete merged commit 9546bb4 into main Sep 18, 2026
397 of 399 checks passed
@steipete
steipete deleted the codex/catalog-metadata-only-2582 branch September 18, 2026 07:46
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…nclaw#150831)

* perf(gateway): avoid session enumeration for catalog metadata

* test(ui): recognize metadata catalog discovery requests

* test(doctor): reuse prepared runtime for refusal receipts

* test(ui): model retained session pagination windows

* fix(tests): retain worker caps in serial plan assertions

* test: retain main filesystem fixture ownership
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 commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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