Repository navigation
perf(gateway): load catalog choices without enumerating sessions - #150831
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 3:45 AM ET / 07:45 UTC (Revision 18). ClawSweeper reviewWhat this changesAdds 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +41, Tests +287, Docs +1, Other +4. Total +333 across 19 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (17 earlier review cycles; latest 8 shown)
|
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.
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.
|
Merged via squash.
|
…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
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.listRPC gainsmetadataOnly: true. After catalog and agent validation, it returns descriptors withhosts: []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
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.