Skip to content

fix(ui): New Session misses dynamically discovered models - #126013

Closed
ekinnee wants to merge 2 commits into
openclaw:mainfrom
ekinnee:codex/new-session-configured-model-catalog
Closed

ekinnee wants to merge 2 commits into
openclaw:mainfrom
ekinnee:codex/new-session-configured-model-catalog

Conversation

@ekinnee

@ekinnee ekinnee commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #124008

Depends on #128863, which owns the generic provider-outcome and agent-scoped discovery contract. This PR owns the lifecycle, Gateway, protocol, session, and Control UI consumer behavior.

What Problem This Solves

New Session could receive and cache a successful but incomplete static model catalog before post-ready runtime discovery published configured provider models. The first New Session then omitted the dynamic model, or metadata remained on the pre-publication projection.

Why This Change Was Made

  • Startup preparation remains static and prepared-only.
  • A Gateway post-ready lifecycle worker exclusively owns runtime discovery, publication, retry, and bounded recovery.
  • Publication invalidates metadata before refresh, so a pre-publication projection cannot remain current.
  • Ordinary prepared-only consumers keep receiving static rows.
  • Only New Session opts into additive waitForRuntimeDiscovery readiness and retries while publication is pending.
  • Prepared auth state is inherited when the immutable catalog snapshot is projected for readiness.
  • Dynamic model, thinking level, and context-window choices flow through canonical sessions.create and session projections.

There is no request-time provider discovery, UI fallback catalog, or provider-specific core policy.

User Impact

The first New Session can retain immediately available static choices while a configured dynamic provider warms up, then expose and select the discovered model without reopening the picker or reloading the page. The created session keeps the selected model and thinking level.

Evidence

Exact-head Gateway and Control UI proof

Head a6b8ff13c5b376c955e512e6368d3728d9828a48; prerequisite 5c295afd71ff4a19abb4790be3772acefe66dd70; frozen main 998128abd85b76ee2ac57211a87df1ae3ff592f6.

The redacted exact-head proof comment includes four directly inspectable captures. Machine-readable summary, timeline, Gateway log, and hashes are in the existing private evidence bundle.

The disposable loopback-only run used exact-head production dist/entry.js, its production Control UI, and the actual built @ekinnee/[email protected] plugin. Its proof copy maps the plugin's known legacy null failure to the new explicit unavailable outcome; OpenClaw production code was not adapted.

  • Authenticated /v1/models: 503, 503, then 200.
  • Across both unavailable responses, New Session received retryable UNAVAILABLE (startup-sidecars) while OmniRoute Auto remained present.
  • The same document recovered without navigation/reopen and exposed omniroute/deepseekv4flash with off,low,medium,high,xhigh.
  • sessions.create retained the dynamic model and xhigh.
  • A globally configured but unreferenced OpenRouter provider was resolved as a candidate but received zero runtime requests.
  • Browser page errors and console errors were empty.

Regression and local validation

  • All 31 consumer-changed test files passed in the broad pre-push sweep: 1,487 tests.
  • GitHub's exact failed checks-ui-e2e (4/12) command was reproduced locally before repair, then passed at the final head: 25 files, 89 tests.
  • Focused final model-catalog E2E passed: 5/5. It now distinguishes ordinary prepared reads from New Session readiness reads and covers static-read → startup-unavailable → publication/recovery ordering.
  • Exact changed-file type-aware lint, formatting, and git diff --check passed.
  • Core, core-test, UI, script, and root-test typechecks passed before the test-only amend; the amended file passed type-aware lint and its exact CI shard.
  • Protocol registry/generation/Swift/Kotlin consistency passed with no generated drift.
  • Exact-head production Gateway and Control UI build, startup performance budget, 147 public SDK subpaths, package inventory, tar import graph, and package integrity passed.
  • Whole consumer branch-mode autoreview against fix(plugins): scope runtime catalog discovery by provider #128863 at P0–P2 found no accepted/actionable finding (overall: patch is correct, confidence 0.83).
  • fix(plugins): scope runtime catalog discovery by provider #128863 independently passed 285 focused tests, exact lint/format, unused-export scans, public SDK verification, relevant typechecks, and standalone branch-mode autoreview.

Codex dependency contract

Direct sibling Codex source was checked at d1d51f6315f84a1737c655cb4d78104d030d5102: model listing is handled by the catalog processor and populated from ThreadManager.list_models, while the protocol model preserves supported_reasoning_efforts and default effort. See catalog_processor.rs, models.rs, and protocol Model.

Scope and LOC

Against #128863:

  • production: +1086/-319, net +767 before discounting the detected shared-store move;
  • tests: +2089/-372, net +1717;
  • tooling: +22/-0;
  • raw total: +3197/-691 across 72 paths.

The production growth implements one user-visible lifecycle/readiness path and consolidates New Session, Chat, account refresh, and session-start consumers onto the shared model-catalog store. The generic provider contract and official-provider migrations are no longer part of this PR's architectural decision surface; they are isolated in #128863.

ClawSweeper Items Addressed

  • The changed New Session E2E asserts the readiness flag on readiness requests without treating ordinary prepared reads as readiness consumers.
  • Persistent-unavailable behavior is exact-head proven across two 503 responses with the prepared static row retained.
  • Recovery is exact-head proven on the third 200 response without navigation/reopen.
  • Runtime publication invalidates metadata before refresh.
  • Global-only providers are excluded by the prerequisite owner-scoping contract and received zero I/O in real behavior proof.
  • No manual @clawsweeper re-review command is posted; the pushed head should be detected automatically.

Stack Landing Note

Because both heads originate from a contributor fork, GitHub cannot use the fork's prerequisite branch as #126013's base. The branch nevertheless contains two clean commits, and #128863 exposes the prerequisite as its own review surface. Please land #128863 without squashing its exact commit away—merge commit, or rebase merge while up to date—so #126013 keeps its current exact reviewed/proven head and automatically reduces to the consumer commit. The repository-native flow supports OPENCLAW_PR_MERGE_METHOD=merge|rebase.

@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@ekinnee

ekinnee commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(ui): New Session misses dynamically discovered models This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 18, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 25, 2026, 3:45 PM ET / 19:45 UTC.

ClawSweeper review

What this changes

This PR publishes dynamically discovered provider models after Gateway startup and makes the Control UI’s New Session picker wait for the published catalog while preserving static choices.

Merge readiness

⛔ Blocked by patch quality or review findings - 8 items remain

Needs changes before merge: the branch’s embedded provider-scope logic can run authenticated discovery for an unreferenced global provider, contradicting its stated isolation goal and the linked prerequisite’s intended contract.

Priority: P1
Reviewed head: a6b8ff13c5b376c955e512e6368d3728d9828a48
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The reported real-flow evidence is strong, but the provider-scope P1 makes the current stack unsafe to merge.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The exact-head PR evidence describes a production Gateway and Control UI recovery flow with attached screenshots; locally prepared older stills confirm picker state but not the full exact-head sequence.
Patch quality 🦪 silver shellfish (2/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The exact-head PR evidence describes a production Gateway and Control UI recovery flow with attached screenshots; locally prepared older stills confirm picker state but not the full exact-head sequence.
Evidence reviewed 6 items Current-main bug boundary: Current main’s New Session control refreshes chat metadata, while that metadata path deliberately projects only preloaded facts; this explains why dynamically discovered rows are absent before this PR.
Unselected provider enters runtime scope: For an agent without model-policy entries, the branch adds every global models.providers key to runtime discovery even when the agent has no reference to it.
Regression locks the conflicting policy: The added test expects an allow-any OpenAI agent to discover an unassigned OmniRoute provider, so the behavior is intentional in this branch rather than an untested edge case.
Findings 1 actionable finding [P1] Do not discover unreferenced global providers
Security Needs attention Unselected provider can receive authenticated discovery: An allow-any agent includes every global provider in runtime discovery, and selected providers reach catalog hooks that use resolved credentials and network requests.

Live Verification

Command: pnpm test ui/src/e2e/new-session-page.model-catalog.e2e.test.ts

Result: FAIL (failed) — step 1 run pnpm test ui/src/e2e/new-session-page.model-catalog.e2e.test.ts: previous terminal command was still running after 30 seconds: "pnpm test ui/src/e2e/new-session-page.model-catalog.e2e.test.ts"

$ node --import tsx scripts/test-projects.mts ui/src/e2e/new-session-page.model-catalog.e2e.test.ts
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-126013-EhprN0/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126013-EhprN0/target

Assertions:

  • FAIL expect_output: Tests

How this fits together

Gateway startup prepares static model facts, then a post-ready worker can discover provider-specific models and publish them. New Session reads the prepared catalog first, waits for runtime publication, and sends its selected model and thinking level to session creation.

flowchart LR
  A[Agent model references] --> B[Prepared static catalog]
  B --> C[Post-ready provider discovery]
  C --> D[Published runtime catalog]
  B --> E[New Session initial choices]
  D --> F[Readiness-confirmed model list]
  F --> G[Session creation]
  G --> H[Model and thinking level]
Loading

Decision needed

Question Recommendation
Should a globally configured provider with no effective model reference for an allow-any agent activate runtime discovery? Require an effective agent reference: Make config-only provider entries passive and rebase this PR onto the final scoped-discovery prerequisite.

Why: The checked-out branch preserves that activation, while the linked prerequisite describes configuration-only providers as inactive; this compatibility and privacy boundary requires maintainer intent.

Before merge

  • Do not discover unreferenced global providers (P1) - This allow-any path adds every global provider before discovery. A configured OpenRouter entry can therefore resolve credentials and issue /models even though this agent has no reference to it, contradicting the branch’s scoped-discovery claim. This was visible at the prior reviewed head; please align it with the final prerequisite contract and replace the test that expects this I/O.
  • Resolve security concern: Unselected provider can receive authenticated discovery - An allow-any agent includes every global provider in runtime discovery, and selected providers reach catalog hooks that use resolved credentials and network requests.
  • Resolve merge risk (P1) - The branch carries an older prerequisite policy that can contact a configured provider outside the agent’s effective references; rebasing only the UI consumer would not repair that scope.
  • Resolve merge risk (P1) - The PR explicitly relies on Codex catalog behavior, but the required sibling ../codex checkout is absent and DNS prevented retrieval, so the repository’s direct Codex-contract gate remains incomplete.
  • Complete next step (P2) - A maintainer must settle the configuration-only provider activation policy before a mechanical rebase and scope repair can be safely attempted.
  • Improve patch quality - Make unreferenced config-only providers ineligible for runtime discovery and add a zero-I/O regression.
  • Improve patch quality - Rebase the consumer change onto the final reviewed provider-scope prerequisite after maintainers settle the activation contract.

Findings

  • [P1] Do not discover unreferenced global providers — src/agents/prepared-model-runtime.configured.ts:110-113
  • [medium] Unselected provider can receive authenticated discovery — src/agents/prepared-model-runtime.configured.ts:110
Agent review details

Security

Needs attention: The provider-selection defect can initiate authenticated catalog I/O outside the selected agent scope.

Review metrics

Metric Value Why it matters
Production versus test delta production +1,086/-319; tests +2,089/-372 against the declared prerequisite This bug-fix stack adds substantial lifecycle, protocol, provider, and UI behavior, increasing the value of a single settled provider-scope contract.

Stored data model

Persistent data-model change detected: persistent cache schema: ui/src/lib/chat/model-catalog-store.ts, persistent cache schema: ui/src/pages/chat/models.test.ts, persistent cache schema: ui/src/pages/chat/models.ts, serialized state: packages/gateway-protocol/src/schema/sessions-create.test.ts, serialized state: packages/gateway-protocol/src/schema/sessions-row.ts, serialized state: packages/gateway-protocol/src/schema/sessions.ts, and 20 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #124008
Summary: This PR is a candidate fix for the canonical New Session dynamic-catalog issue, but its prerequisite overlaps an unresolved provider-scope contract.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Rebase on scoped provider discovery (recommended)
    Replace the global-provider fallback with effective agent-reference selection and prove an unreferenced provider receives no auth or network call before merge.
  2. Pause for the activation-policy decision
    Do not merge the stacked branch until maintainers choose whether configuration-only providers are discovery activation.

Technical review

Best possible solution:

Adopt one provider-scope rule across the prerequisite and this consumer: only effective agent references or explicit authenticated selection may trigger runtime discovery, with a regression proving an unreferenced configured provider receives zero I/O.

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

Yes, from source: an allow-any agent with an unreferenced runtime provider under models.providers selects that provider at src/agents/prepared-model-runtime.configured.ts:110, then reaches its catalog hook.

Is this the best way to solve the issue?

No; the New Session readiness flow is plausible, but the embedded prerequisite’s global-provider selection contradicts the stated agent-scoped discovery contract and must be resolved first.

Full review comments:

  • [P1] Do not discover unreferenced global providers — src/agents/prepared-model-runtime.configured.ts:110-113
    This allow-any path adds every global provider before discovery. A configured OpenRouter entry can therefore resolve credentials and issue /models even though this agent has no reference to it, contradicting the branch’s scoped-discovery claim. This was visible at the prior reviewed head; please align it with the final prerequisite contract and replace the test that expects this I/O.
    Confidence: 0.97
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add merge-risk: 🚨 security-boundary: An agent can initiate provider I/O outside its effective model references.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The exact-head PR evidence describes a production Gateway and Control UI recovery flow with attached screenshots; locally prepared older stills confirm picker state but not the full exact-head sequence.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.
  • remove merge-risk: 🚨 availability: Current PR review merge-risk labels are merge-risk: 🚨 compatibility, merge-risk: 🚨 auth-provider, merge-risk: 🚨 security-boundary.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P1: The branch can send authenticated runtime discovery to an unselected provider for ordinary allow-any agent configurations.
  • merge-risk: 🚨 compatibility: The unresolved choice changes whether existing config-only provider entries trigger background discovery.
  • merge-risk: 🚨 auth-provider: The selected-scope error reaches provider hooks after credential resolution.
  • merge-risk: 🚨 security-boundary: An agent can initiate provider I/O outside its effective model references.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The exact-head PR evidence describes a production Gateway and Control UI recovery flow with attached screenshots; locally prepared older stills confirm picker state but not the full exact-head sequence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The exact-head PR evidence describes a production Gateway and Control UI recovery flow with attached screenshots; locally prepared older stills confirm picker state but not the full exact-head sequence.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The exact-head PR evidence describes a production Gateway and Control UI recovery flow with attached screenshots; locally prepared older stills confirm picker state but not the full exact-head sequence.

Evidence

Security concerns:

  • [medium] Unselected provider can receive authenticated discovery — src/agents/prepared-model-runtime.configured.ts:110
    An allow-any agent includes every global provider in runtime discovery, and selected providers reach catalog hooks that use resolved credentials and network requests.
    Confidence: 0.94

What I checked:

Likely related people:

  • Erick Kinnee: Authored the current branch and the related merged catalog/session-scope repair. (role: recent catalog and session-scope contributor; confidence: medium; commits: a6b8ff13c5b3, 6ac998eba8c6; files: src/agents/prepared-model-runtime.configured.ts, ui/src/pages/new-session/model-control.ts)
  • Peter Steinberger: Available history shows repeated maintenance of prepared model-runtime and New Session catalog behavior. (role: recent adjacent core catalog contributor; confidence: medium; commits: af4ffb2e8ed0, 25e54ef25590; files: src/agents/prepared-model-runtime.ts, ui/src/pages/new-session/model-control.ts)
  • Martin Cleary: Merged the related session catalog scope repair that informs the affected owner boundary. (role: merger of related catalog/session work; confidence: low; commits: 6ac998eba8c6; files: src/gateway/session-utils-search.ts)

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 (32 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-23T00:36:00.697Z sha 70c7bc7c5ed0161feba4a3766f9fd7999aba1f87 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-23T02:38:33.668Z sha 70c7bc7c5ed0161feba4a3766f9fd7999aba1f87 :: found issues before merge. :: [P1] Keep missing provider outcomes pending
  • reviewed 2026-08-23T05:44:46.704Z sha ff9efddb9a3b34f5dd9c205a150b98270c95daeb :: needs changes before merge. :: [P1] Scope pending responses to New Session
  • reviewed 2026-08-23T05:55:29.991Z sha ff9efddb9a3b34f5dd9c205a150b98270c95daeb :: needs changes before merge. :: [P1] Scope pending responses to New Session
  • reviewed 2026-08-23T15:41:46.292Z sha da72d1d74c08928fab5bf2106683adde1e7526ad :: needs changes before merge. :: [P1] Update the E2E to expect the readiness flag
  • reviewed August 24, 2026, 4:31 PM ET / 20:31 UTC sha unknown :: needs changes before merge. :: [P1] Expect the runtime-readiness flag in the browser scenario
  • reviewed 2026-08-24T21:19:20.339Z sha 1fdd98b4a9af91c04714296bf40ff07d4a9c5294 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-24T22:10:33.835Z sha a6b8ff1 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Aug 18, 2026
@ekinnee

ekinnee commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Real behavior evidence

Validated in an isolated local-container using a disposable Gateway, source Control UI, the actual built OmniRoute plugin, and an authenticated loopback /v1/models catalog.

  • Agent-scoped models.list for both configured and all returned omniroute/deepseekv4flash-equivalent, a 262,144-token context window, and exactly off/low/medium/high/xhigh.
  • New Session selected DeepSeek V4 Flash and exposed all five reasoning levels.
  • A hard refresh restored the selected model and the same reasoning levels.
  • Focused unit coverage: 55 passed across model-control.catalog-targets, model-control, model-catalog-store, and chat-metadata-store.
  • New Session E2E: 4 passed.
  • Full changed gate and fresh autoreview passed.

The head also repairs the stale retry assertions called out in the review: reopening the picker now proves two configured models.list requests and two CLI-target catalog requests.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@ekinnee
ekinnee marked this pull request as draft August 19, 2026 01:16
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: L and removed size: M labels Aug 19, 2026
@ekinnee

ekinnee commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor Author

After-fix Gateway + New Session evidence

The earlier exact-level mismatch is fixed in a795322bcb3.

An isolated packaged Gateway and source Control UI ran against a disposable loopback state directory. The model configuration was derived from the OmniRoute production catalog normalizer's output for omniroute/deepseekv4flash-equivalent:

models.list (configured, refresh=true)
name: DeepSeek V4 Flash
contextWindow: 262144
reasoning: true
thinkingLevels: off,low,medium,high,xhigh

The actual browser New Session path then selected that model, asserted off,low,medium,high,xhigh, performed a browser hard refresh, and asserted the same five levels again. The run produced redacted screenshots for both states, a Playwright video, and a JSON assertion summary.

Public artifacts

Evidence bundle and SHA-256 hashes

New Session model picker before hard refresh

New Session model picker after hard refresh

https://gist.githubusercontent.com/ekinnee/29a195857fde35b26890dd2423628144/raw/c53f6ee9202064753f3e4d634792ce8ec82aea30/new-session-hard-refresh.webm

Assertion summary · sanitized producer input

Producer scope is precise: the OmniRoute production normalizer was invoked directly to establish the input map; this comment does not claim that the complete externally installed plugin entry ran inside the Gateway scenario.

Validation on the new commit:

  • 223 focused assertions passed.
  • Core typecheck and git diff --check passed.
  • Fresh autoreview reported no accepted/actionable findings.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 19, 2026
@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. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. 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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 21, 2026
@ekinnee

ekinnee commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addresses the August 21 fresh-start P1 at 3b31368cdc7c3903cb3acb6a814e7b93e9b02dbd.

  • A lifecycle-owned post-ready publisher discovers only configured manifest-runtime providers, then refreshes Chat metadata after publication (src/agents/prepared-model-runtime.ts:82-116; src/gateway/server-startup-post-attach.ts:972-990). Refreshable catalogs, including Ollama, are excluded.
  • Chat metadata remains prepared-only and reads that published runtime catalog with its matching auth material (src/gateway/server-methods/chat-metadata-runtime.ts:226-260).
  • Exact-head regression coverage proves runtime OmniRoute is sent to the worker while refreshable Ollama is not, then verifies fresh post-ready metadata refresh (src/agents/prepared-model-runtime.startup-static.test.ts:315-343; src/gateway/server-startup-post-attach.test.ts:2827-2858).
  • The PR body now contains the fresh isolated Gateway plus Control UI proof: zero initial provider calls, one post-ready runtime-only call, and 701 ms convergence with the full thinking-level map; it also includes the focused suite, changed-file gate, build, and P0/P1 autoreview results.

@clawsweeper

clawsweeper Bot commented Aug 21, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@ekinnee

ekinnee commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up evidence — exact head 37a303856df

The rebased repair is now pushed to the PR branch.

  • Post-ready runtime discovery is scoped to each owning agent's configured references.
  • Exact two-agent regression passed: keeps post-ready runtime discovery scoped to each configured agent; worker inputs were exactly [["alpha"], ["beta"]].
  • Control UI model-catalog E2E passed 4/4, covering prepared-only requests, no chat.metadata discovery, dynamic thinking metadata, truthful retry state, and recovery.
  • Focused post-rebase suites passed 109 tests: 45 core and 64 UI.
  • pnpm format:check, core/UI tsgo, changed-file guards, and committed-diff autoreview passed; autoreview reported no P0/P1 findings.
  • Fresh screenshot/video proof was captured under .artifacts/control-ui-e2e/new-session-dynamic-catalog/ and .artifacts/control-ui-e2e/new-session-catalog-retry/; screenshots were inspected directly.

The latest review rank-up moves are addressed: owner scoping and the two-agent regression are now in the exact head. The remaining known validation exceptions are documented in the PR body: startup-JS gzip is 345160 B versus the 345043 B ceiling, and the changed-file sweep has only the unrelated Linux/macOS packaging-host mismatch.

Public packaged Gateway + Control UI evidence remains available in the existing bundle: https://gist.github.com/ekinnee/29a195857fde35b26890dd2423628144

@ekinnee

ekinnee commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Exact-head repair evidence — da72d1d74c0

This replaces the prior ff9efdd evidence with the New Session-scoped readiness repair.

Readiness scope repaired

  • Ordinary prepared-only reads retain their static catalog: Config, cron suggestions, Model Providers, and Gateway diagnostics now return test/static-model while runtime discovery is pending.
  • Only New Session sends additive waitForRuntimeDiscovery: true with preparedOnly; it receives retryable UNAVAILABLE until the lifecycle publishes runtime rows. The protocol schema rejects the wait flag without preparedOnly.
  • A selected runtime provider with no outcome remains pending, just like an explicit unavailable outcome. Only ready and auth-rejected are terminal.
  • Discovery, publication, and recovery remain lifecycle-owned. There is no request-time discovery or UI fallback.

Focused Gateway scope coverage (86), protocol/store/New Session coverage (92), and existing Config/cron/Model-Providers/diagnostics suites (167) passed. Existing prepared-runtime/discovery-scope/provider-outcome/New-Session coverage (166), pnpm protocol:check, node scripts/check-changed.mjs, production build, Control UI E2E (4/4), branch-mode autoreview, and the requested whole-branch review-agent pass also passed. A final pnpm test:changed run completed but its detached launcher lost the exit line, so it is not claimed as green.

Fresh first-New-Session recovery

A disposable loopback-only run used exact-head production dist/entry.js, the production Control UI served by that Gateway, and the actual extracted @ekinnee/[email protected] plugin.

  • Authenticated /v1/models: 503, 503, then 200 to lifecycle recovery.
  • At 21.831s, Config received static OmniRoute Auto from an ordinary prepared read.
  • At 22.140s, the first New Session received retryable pending status; Loading models… was captured at 22.556s.
  • At 29.559s, the same document exposed and selected DeepSeek V4 Flash with off,low,medium,high,xhigh; navigation remained 2 and browser page/console errors were empty.

Redacted exact-head bundle: evidence

  • exact-head-da72d1d-summary.json: ea930112aa2c0ce7ef30a45ebedf0263381ede478c7f728cb0de058422a71c25
  • fresh-start-pending-discovery-da72d1d.png: e3dba6ffec6cde9f20da60238ba7673c2cc71f0ae4ae818ed5fed467b8453ca2
  • fresh-start-background-recovered-da72d1d.png: 398d0653f82d6805f6bbbdce40ce2288ad86c51579082dc1e0c08b05e881dd4f
  • gateway-da72d1d.log: c57668537e367f9b9b3910a0015343ea5dccf1cf5a306e6b82d69a2ecf3bc47c
  • timeline-da72d1d.json: 8373a9c0e7a3d6a297a3c076b02739750a5d04d2ff62045c7cb5971aff57c408

Artifacts contain no credentials, bearer headers, host ports, or tokens. No additional re-review command is being posted.

@ekinnee

ekinnee commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 23, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@ekinnee

ekinnee commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Exact-head split-stack evidence — a6b8ff13c5b

This supersedes the prior 1fdd98b4a9a evidence and includes the exact CI-shard test repair. The amended delta is test-only; production behavior proof was nevertheless regenerated at the new head.

  • PR head: a6b8ff13c5b376c955e512e6368d3728d9828a48
  • prerequisite: fix(plugins): scope runtime catalog discovery by provider #128863 at 5c295afd71ff4a19abb4790be3772acefe66dd70
  • frozen main: 998128abd85b76ee2ac57211a87df1ae3ff592f6
  • exact production build: Gateway, Control UI, package inventory, 147 public SDK subpaths, tar import graph, and package integrity passed

The disposable loopback-only run used exact-head dist/entry.js, its production Control UI, and the actual built @ekinnee/[email protected] plugin. The proof copy maps that plugin's known legacy null failure to the new explicit unavailable outcome; no OpenClaw production code was adapted.

  • Authenticated /v1/models returned 503, 503, then 200.
  • Across both unavailable responses, New Session received retryable UNAVAILABLE (startup-sidecars) while the prepared OmniRoute Auto row remained present.
  • The same document recovered without navigation/reopen and exposed omniroute/deepseekv4flash with off,low,medium,high,xhigh.
  • sessions.create retained the dynamic model and xhigh selection.
  • The globally configured but unreferenced OpenRouter provider was resolved as a candidate but received zero runtime requests.
  • Browser page errors and console errors were empty.

Redacted JSON timeline, Gateway log, hashes, and earlier evidence are in the existing evidence bundle. The attached captures show pending prepared state, background recovery, retained session selection, and the exact build SHA.

Final local validation added after reproducing GitHub's failed shard exactly:

  • focused model-catalog E2E: 5/5 passed;
  • exact checks-ui-e2e (4/12) shard command: 25 files, 89 tests passed;
  • exact changed-file type-aware lint, formatting, and git diff --check passed;
  • whole consumer branch autoreview against fix(plugins): scope runtime catalog discovery by provider #128863 at P0–P2: no accepted/actionable findings (overall: patch is correct, confidence 0.83).

No @clawsweeper re-review command is being posted; the branch update should be detected automatically.

Pending prepared state:

New Session retains OmniRoute Auto while runtime discovery is retryably pending

Background recovery:

New Session exposes DeepSeek V4 Flash and Extra high after background recovery

Session creation retention:

Created session retains DeepSeek V4 Flash and Extra high

Exact build identity:

Control UI build details show exact commit a6b8ff13c5b

@ekinnee

ekinnee commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 25, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@ekinnee

ekinnee commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Recovery note: GitHub closed this PR when its source fork was deleted. The useful work is now continued by #129307 for New Session and catalog convergence, and #129623 for provider-defined reasoning-level preservation. The exact original head a6b8ff1 has been restored to ekinnee/openclaw for preservation; no duplicate continuation PR is planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation extensions: arcee extensions: google extensions: minimax extensions: openai extensions: opencode extensions: opencode-go extensions: openrouter extensions: qwen gateway Gateway runtime merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: New Session model picker omits dynamically discovered providers from chat.metadata

2 participants