Repository navigation
refactor(webui): drop gateway-version fallbacks per version-lock decision - #124971
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 2:00 AM ET / 06:00 UTC. ClawSweeper reviewWhat this changesThe PR removes Control UI fallbacks to older Gateway chat methods and stops retrying a rejected browser build identity without its build ID. Merge readinessThe cleanup is coherent under the newly documented one-install policy, but it deliberately changes behavior for admission-exempt version-skew deployments. Keep this maintainer-owned PR open for an explicit product decision rather than treating the fallback removal as routine cleanup. Priority: P1 Review scores
Verification
How this fits togetherThe Control UI browser connects to a Gateway, then loads startup history and metadata for the chat pane. This change makes incompatible Gateway behavior surface through the connection or chat error states instead of using older RPC paths. flowchart LR
A[Control UI browser] --> B[Gateway connection]
B --> C[Build admission]
C --> D[Chat startup]
D --> E[Chat metadata]
E --> F[Model picker and chat errors]
Decision needed
Why: Current Gateway admission intentionally exempts those paths, while this PR deletes their last client compatibility behavior; choosing connect-time enforcement would expand the product contract beyond this UI refactor. Before merge
Agent review detailsSecurityNone. PR surfaceSource -112, Tests -199, Docs +6. Total -305 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Confirm the documented unsupported-skew policy, then retain one fallback-free Control UI path and keep any broader server-side admission expansion as a separately scoped product change. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect report: this is a policy-driven refactor, while the branch's focused request-count tests make the removed fallback behavior and replacement error states observable. Is this the best way to solve the issue? Unclear pending product confirmation: the implementation is the cleanest path if exempt version skew is intentionally unsupported, but connect-time enforcement is a separate valid product direction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e84a45e28ecf. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
Addressed the ClawSweeper P2 in
The regression failed before the fix because the unknown-method case issued two requests; it now proves one Proof: 9,368 tests passed across the requested UI/chat/composer targets; |
6011708 to
85a81a1
Compare
|
Stating the skip on the branch-list finding, with reasoning rather than a patch: The proposed fix — routing an unsupported-method rejection through the chat-error path — would reintroduce exactly the version-conditional handling this PR removes under the On a supported same-version Gateway, If the concern is observability on the unsupported path, the connect-time protocol/build handshake is the designated gate for skew, not per-method error routing. |
|
Addressed the ClawSweeper build-identity P2 in The browser-only The inverted regression failed before the fix on Proof: |
|
Stating the skip on the P1 with owner authority, plus one guidance fix it earned: The finding reads "unsupported" as "must be enforced away at connect", but that is not the product decision this PR implements. The owner's explicit call (2026-08-16, this session's direction: "this is a product decision and simplifies everything") is the third option the finding's either/or omits: the exempted pairings (dev builds, configured The finding did catch an over-claim in the new guidance wording — "the connect handshake is the only gate" implied the handshake catches every pairing. Fixed in this PR: |
|
Merged via squash.
|
…sion (openclaw#124971) * refactor(webui): drop gateway-version fallbacks per version-lock decision * refactor(webui): drop chat.startup history fallbacks * test(webui): advertise full method catalog in terminal e2e scenarios * refactor(webui): enforce the build-identity handshake at connect * docs(webui): state exempted skew paths fail visibly by design
What Problem This Solves
The chat pane carried a fallback stack for gateways that predate
chat.metadata: when the method was un-advertised or failed, it silently substitutedmodels.list {preparedOnly}andcommands.listround-trips. That machinery dated from before the Control UI's deployment model was settled and imposed a permanent tax: every metadata-path change had to reason about a second execution path, and failures were masked by silent substitution instead of surfacing.Why This Change Was Made
Product decision (owner, 2026-08-16), now recorded in
ui/AGENTS.md("Gateway Coupling", included in this PR): the Control UI ships from and with its Gateway — one install, one version. UI code never carries gateway-version compatibility; method-advertisement checks remain only as feature gates for config/plugin-dependent surfaces. Skew paths (ui:devagainst a different install, customgateway.controlUi.root, dialing another gateway via connection settings) are unsupported for version mismatch.For the record, the fallback did protect a formerly-reachable window — v2026.5.12 gateways speak protocol 4 but lack
chat.metadata— and that topology is what this decision declares unsupported.Deleted: the
chat.metadata/chat.startupadvertisement branches inrefreshChatMetadata/refreshPageChat,refreshMissingChatMetadata,refreshCompatibilityModelCatalog,refreshCompatibilityCommands, and their fallback-only test coverage. Failure semantics are now visible instead of silent: achat.metadatarejection setschatModelCatalogError(rendering the picker's existing error/retry affordance) while retaining any seeded catalog. A metadata result without commands keeps the built-in slash commands —commands.listruns the same server-side builder, so retrying it against the same failure is futile (inline-commented).Verified live, not guessed: the
commands.listlane inchat-commands.tsstays because it has a real non-compat caller (palette refresh viachat-pane-render.ts:514→refreshChatCommands);models.tsstays untouched (live-discovery callers in chat picker-open, model-providers, config).User Impact
None on the supported path — same-install UI/gateway pairs never entered the fallback. On the now-unsupported skew path, a missing method surfaces as a visible catalog error instead of silently degrading. Silent-failure elimination is the doctrine-preferred direction.
Evidence
Two regressions, each verified failing pre-change:
chat.metadatarejection →chatModelCatalogErrorset, seeded catalog retained, and nomodels.listrequest issued; metadata without commands → nocommands.listrequest, built-in slash commands active. Suites: focused 349 passed, broad UI 4,023 passed, composer e2e 24 passed;tsgo:ui+check:test-typesclean (run on AWS Crabbox — Blacksmith CLI unavailable on the host); format/oxlint/assertion-ratchet/diff-check clean. Autoreview (Codexgpt-5.6-sol, high): clean, no actionable findings.Production LOC +17/−90 (net −73); tests +28/−245; guidance +6.
No screenshots: the change deletes an invisible substitution path; the observable contract (no fallback requests, visible error state) is pinned by the request-count regressions.