Skip to content

fix: show exact fallback models in notices and status - #134496

Merged
steipete merged 1 commit into
mainfrom
codex/130706-fallback-notice-owner
Sep 10, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/130706-fallback-notice-owner

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Related: #130706. This is a focused display repair; it does not establish the CPU/stall cause in #130324.

What Problem This Solves

Fixes an issue where /model and /status could omit the model that answered after fallback, or show its context usage against the selected model's larger window. Fallback notices could also collapse distinct references such as custom/model and custom/custom/model into the same label.

Why This Change Was Made

Share the existing bounded terminal-transcript reader across Gateway rows and both commands. It accepts an answering model only when the settled run, visible successful assistant message, selected model, and recorded fallback notice agree. The status renderer consumes the prepared model pair and retains the original session entry for auth and context provenance.

Duplicate selection and prefix-stripping helpers are removed. Production code is 30 lines smaller; the obsolete assertion baseline shrinks by two lines. No new configuration, persisted fields, schema, or migration is introduced.

User Impact

Users can distinguish the selected model from the fallback that answered and see the fallback's correct context limit. Repeated fallback notices stay suppressed, recovery clears the notice, and querying status does not change selection or issue a provider request. Previously persisted lossy labels cannot reveal their original identity and are not guessed or reconstructed.

Evidence

Validated commit 666dddf10b6ff4b5a496edbf948551258c1a60b1 on main 96b5a339f3d9a165bf5c2931b4259a50bf9dafbb, including the separate config repair #144275.

  • 808 focused/parser tests passed. The affected status and directive suites also passed after final fixture typing and equivalent catalog-guard cleanup.
  • The complete changed-file gate, fresh independent P2 review, one normal full build including SDK declarations and UI, and built status-module smoke passed.
  • A real isolated compiled Gateway and its public reply dispatcher passed seven stages: fallback activation, /model, /status, repeat fallback, recovery, and both recovered commands. Five HTTP requests exercised primary 404/fallback 200 and primary recovery; command queries made zero provider requests.
  • Actual persisted terminal run IDs matched the successful assistant messages. /model showed selected custom/model and active custom/custom/model; /status used the fallback's 128k context window instead of the primary's 1M. Recovery returned status to the primary window. Selection and config stayed unchanged.
  • Normal Gateway shutdown, worker retirement, and process exit completed. All 14,637 build outputs stayed unchanged, and 5,456 executed files were hash-verified.

The earlier standalone dispatcher probe remains failed: it omitted the normal Gateway lifecycle subscriber, so no terminal status or final run ID was persisted, and the process reached its timeout. The successful proof used the real Gateway owner with the same frozen source/build; it did not synthesize lifecycle fields or weaken the reader checks.

Runtime proof uses a synthetic loopback provider and built checkout artifacts, not hosted-provider credentials or an installed npm tarball. Authenticated Telegram callback proof remains waived and is not claimed as passed.

@steipete steipete self-assigned this Aug 31, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 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.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. 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 Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 4:50 PM ET / 20:50 UTC (Revision 3).

ClawSweeper review

What this changes

Preserves exact fallback model names and shares terminal-transcript evidence across session diagnostics, /model, and /status so status uses the answering model’s context limit.

Merge readiness

✅ Ready for maintainer review

This remains a useful display repair: current main still collapses literal model prefixes. The earlier producer prerequisite is integrated, the recorded Gateway replay addresses the previous proof request, and no blocking introduced defect was found.

Priority: P2
Reviewed head: 666dddf10b6ff4b5a496edbf948551258c1a60b1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful regression coverage, relevant recorded runtime proof, and no blocking finding.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The pinned-head body records an actual compiled Gateway replay through the reply dispatcher, showing exact fallback labels, the answering model’s 128k context window, repeat suppression, recovery, and unchanged selection. This covers the shared display owner; authenticated Telegram callbacks remain explicitly waived and unclaimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The pinned-head body records an actual compiled Gateway replay through the reply dispatcher, showing exact fallback labels, the answering model’s 128k context window, repeat suppression, recovery, and unchanged selection. This covers the shared display owner; authenticated Telegram callbacks remain explicitly waived and unclaimed.
Evidence reviewed 11 items Introduced change identity: The checkout is the pinned original head; its raw parent is 96b5a33. Review used that parent-to-head delta rather than endpoint drift. The supplied verified test merge contains the same changed paths.
Still necessary on main: Fetched main retains formatProviderModelRef and normalizeModelWithinProvider, which strip a provider-looking prefix from a provider-local model ID.
Latest release comparison: The supplied latest release, v2026.9.3, also contains the prefix-stripping implementation; the central identity-display repair is not already shipped there.
Findings None None.
Security None None.

How this fits together

OpenClaw’s status layer combines configured model selection, session state, and recorded assistant responses. It produces fallback notices, command replies, and Gateway session diagnostics.

flowchart TD
  A[Selected model] --> D[Fallback display resolver]
  B[Session and fallback notice] --> D
  C[Bounded terminal transcript] --> D
  D --> E{Run and model facts agree?}
  E -->|Yes| F[Answering model and context limit]
  E -->|No| G[Existing session projection]
  F --> H[Status and model displays]
  G --> H
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -30, Tests +873, Other -2. Total +841 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 10 169 199 -30
Tests 9 1137 264 +873
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 2 4 -2
Total 21 1308 467 +841

Review metrics

Metric Value Why it matters
Production versus regression coverage Production −30 lines; tests and test support +873 lines The shared-reader cutover reduces production code while adding command-boundary and context-provenance coverage.

Root-cause cluster

Relationship: canonical
Canonical: #134496
Summary: This is the focused fallback-display cut; broader decomposition references and merged identity prerequisites do not replace it.

Members:

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

Technical review

Best possible solution:

Keep one bounded fallback projection shared by diagnostics and commands while preserving literal model identities and original session provenance.

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

Yes, from source: current main collapses distinct provider-local IDs such as model and custom/model under provider custom. No current-main runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the existing bounded transcript reader and passing prepared model facts removes duplicate interpretation without changing stored selection or introducing a parallel API.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The pinned-head body records an actual compiled Gateway replay through the reply dispatcher, showing exact fallback labels, the answering model’s 128k context window, repeat suppression, recovery, and unchanged selection. This covers the shared display owner; authenticated Telegram callbacks remain explicitly waived and unclaimed.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: Repairs misleading fallback identity and context-limit diagnostics without changing model execution policy.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The pinned-head body records an actual compiled Gateway replay through the reply dispatcher, showing exact fallback labels, the answering model’s 128k context window, repeat suppression, recovery, and unchanged selection. This covers the shared display owner; authenticated Telegram callbacks remain explicitly waived and unclaimed.
  • proof: sufficient: Contributor real behavior proof is sufficient. The pinned-head body records an actual compiled Gateway replay through the reply dispatcher, showing exact fallback labels, the answering model’s 128k context window, repeat suppression, recovery, and unchanged selection. This covers the shared display owner; authenticated Telegram callbacks remain explicitly waived and unclaimed.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. Fallback notices and /model and /status output are Telegram-visible; the recorded authenticated-callback waiver remains separate from this surface classification.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: 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 (2 earlier review cycles)
  • reviewed 2026-08-31T22:28:50.597Z sha 280d390 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-31T23:01:21.698Z sha 280d390 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 31, 2026
steipete added a commit that referenced this pull request Sep 9, 2026
Keep source-authored model overrides while filling omitted capabilities
from the same prepared catalog identity. Clear inherited capabilities when
the configured API or endpoint changes, and reuse the prepared policy
instead of rebuilding its configured catalog.

Compose admitted-runtime checks with the public SDK host lifetime and keep
internal configuration and authority fields out of prepared results.
Retain acquired models through HTTP completion in the affected test flows.

Related: #130706, #134496, #143270
steipete added a commit that referenced this pull request Sep 10, 2026
Compose admitted model selection with main's retained run resources and
preserve configured-default notification in the captured runtime context.
Reuse the completion cleanup owner for temporary setup auth and verification
files so logical results retain their existing timing while physical cleanup
waits for owned work. Keep cleanup assertions and await their test owners.

Completes the remaining exact model identity work from #130706 and #134496
through #142100. Model selection, credentials, catalog capabilities, and saved
configuration remain tied to the same admitted owner across execution.
Share the bounded, run-verified terminal model projection between Gateway
rows, /model and /status without changing stored selection or telemetry.
Render the prepared selected and active model facts, preserving literal
provider-local prefixes and the original entry's context provenance.

Remove duplicate selection and prefix-stripping helpers. Keep unmatched
fallback notices on the legacy usage projection path, and validate active
context budgets against the original session and final model identity.

Refs: #134496, #130706
@steipete
steipete force-pushed the codex/130706-fallback-notice-owner branch from 280d390 to 666dddf Compare September 10, 2026 20:43
@steipete steipete changed the title fix: preserve exact model identities in fallback notices fix: show exact fallback models in notices and status Sep 10, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling size: XL and removed size: M labels Sep 10, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed 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 Sep 10, 2026
@steipete
steipete merged commit dc6018d into main Sep 10, 2026
189 of 191 checks passed
@steipete
steipete deleted the codex/130706-fallback-notice-owner branch September 10, 2026 21:22
@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 11, 2026
…34496)

Share the bounded, run-verified terminal model projection between Gateway
rows, /model and /status without changing stored selection or telemetry.
Render the prepared selected and active model facts, preserving literal
provider-local prefixes and the original entry's context provenance.

Remove duplicate selection and prefix-stripping helpers. Keep unmatched
fallback notices on the legacy usage projection path, and validate active
context budgets against the original session and final model identity.

Refs: openclaw#134496, openclaw#130706
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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