Skip to content

test: refresh model setup fixtures and guard read-only auth reads - #149023

Merged
RomneyDa merged 1 commit into
mainfrom
codex/model-ci-fixtures-20260915
Sep 15, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
codex/model-ci-fixtures-20260915

Conversation

@steipete

@steipete steipete commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Related: #148864, #149004

What Problem This Solves

Fixes setup CI assertions that retained outdated controls and copy, and strengthens the model fixtures updated by #149004.

User Impact

This is a test-only correction that restores coverage of the current model and setup flows. No runtime, configuration, or migration behavior changes.

Why This Change Was Made

The runtime-auth mock migration landed in #149004 while this correction was being prepared. This PR retains only the additional explicit read-only check in the shared fixture guard and removes one obsolete mock export. The image fixture change is already on main.

Setup tests select the intended Check again button and assert the current section title, provider-specific success message, and exact error copy after removing incidental outer template whitespace. Existing activation, visibility, layout, cancellation, replay, credential persistence, and request-order assertions remain intact.

Evidence

The original missing-export, old-spy, image-policy, wrong-button, heading, success-copy, and whitespace failures were reproduced before their respective repairs.

  • 361 model/image tests passed, including the complete 112-case image-tool suite and all consumers of the shared auth guard.
  • 121 related setup unit tests and seven targeted browser cases passed. The isolated real HTTPS Gateway flow preserved cancelled/stale callback rejection, no token exchange before acceptance, saved credentials after restart, and access to an existing session.
  • Selected typegraphs and changed-file checks passed; final four-file UI lint and formatting passed. All seven originally reviewed file bodies and six supporting source files remain byte-identical after the rebase; the remaining six-file diff excludes the migration already landed in test(agents): align auth fixtures with runtime store reads #149004.
  • Independent P2 review of the combined correction found no actionable issues.

No timeouts, retries, skips, snapshots, or production behavior were changed. Separate intermittent profiler-help shutdown and catalog-drain failures remain documented; this PR does not claim to resolve those unproven causes.

@clawsweeper

clawsweeper Bot commented Sep 15, 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 app: web-ui App: web-ui agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Sep 15, 2026
@steipete
steipete force-pushed the codex/model-ci-fixtures-20260915 branch from 4b58bd2 to c63142c Compare September 15, 2026 11:13
@steipete steipete self-assigned this Sep 15, 2026
@steipete steipete changed the title test: align model auth and setup fixtures test: refresh model setup fixtures and guard read-only auth reads Sep 15, 2026
@steipete
steipete marked this pull request as ready for review September 15, 2026 11:14
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 15, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member

Coordination from #137828 LAND: #148982 was explicitly closed as superseded here while our task-owned local browser proof was running. We will not publish or reopen #148982; no branch push or merge has occurred there.

Current worker head e7d4d8f2a2e6f02547644fbe5671705cefaba22e has two additional failing workloads beyond the now-landed duplicate-key fix:

  • compact-large-7: model-setup-first-run.test.ts:113 stale Check again selector, already corrected by this canonical PR.
  • compact-large-8: all six cases in runtime-preparation.thinking.test.ts reject openai:platform/openai:subscription. The partial ../../auth-profiles.js mock at lines 47–50 still supplies only ensureAuthProfileStore; the real dynamic resolver now calls loadAuthProfileStoreForRuntime. This is another fixture omitted by test(agents): align auth fixtures with runtime store reads #149004. The existing fixture store and strict route/thinking assertions should remain intact; supply the same store at the actual runtime-reader seam.

The earlier UI readiness and unavailable-label failures have precise handoffs from @vincentkoc: #148982 (comment) and #148982 (comment). Our already-running local proof covers the first readiness correction only on task-owned old-head source; it will not be claimed as this head's green proof. No competing source push, CI retry, or merge is started here. @steipete please preserve any active writer/merge lock; I can carry the ordinary remaining fixture/browser corrections and qualification if your active writer has stopped.

@RomneyDa

Copy link
Copy Markdown
Member

lint failure is unrelated, fixed on #149016

@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 7:21 AM ET / 11:21 UTC.

ClawSweeper review

What this changes

Updates model setup tests to match current controls and messages, removes an obsolete auth mock export, and requires fixture auth reads to be explicitly read-only.

Merge readiness

✅ Ready for maintainer review

Keep open: the remaining test corrections are still absent from pinned main and complement the merged fixture migration. No actionable correctness or security defect was found; the maintainer-owned PR is not a cleanup candidate.

Priority: P3
Reviewed head: c63142c42579d5ff2abdc4820cd2d98fb23ef165

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported test correction that preserves substantive coverage and introduces no identified blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-owned patch changes only assertions and fixture guards, so the external-contributor proof gate does not apply; the reported HTTPS Gateway run supplements the source review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-owned patch changes only assertions and fixture guards, so the external-contributor proof gate does not apply; the reported HTTPS Gateway run supplements the source review.
Evidence reviewed 7 items Introduced scope and continuing necessity: The verified merge-base-to-head patch changes only tests and test support. Comparing all six affected paths with pinned main ba441dd preserves the complete introduced delta; the remaining corrections have not landed there.
Auth guard matches the production caller: resolveDynamicModelAuthProfile already passes readOnly: true to the runtime store reader. The added fixture guard records violations before throwing, and all five guard-consuming suites invoke verify during cleanup. This checks OpenClaw's reader contract without changing or depending on a Codex protocol contract.
Setup selector and heading match current presentation: The setup view renders Connect before Check again, explaining the old first-button selector failure. The English catalog already defines 'Set up and verify a model'. The updated test still asserts detection occurs before explicit activation.
Findings None None.
Security None None.

How this fits together

Model resolution reads authentication profiles to select usable models, while Control UI setup discovers and connects model access. These tests check those flows without changing production behavior.

flowchart LR
  A[Model fixture inputs] --> B[Read-only auth guard]
  B --> C[Model resolution]
  D[Setup page interactions] --> E[Gateway responses]
  E --> F[Controls and feedback]
  C --> G[Test assertions]
  F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +7. Total +7 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 12 5 +7
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 12 5 +7

Review metrics

None.

Technical review

Best possible solution:

Retain the existing runtime owners and align their tests with current behavior while preserving failure, ordering, and fixture-isolation assertions.

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

Yes, source establishes the stale heading, wrong first-button selection, and incomplete success-message expectations. Tests were not executed under this read-only review.

Is this the best way to solve the issue?

Yes, updating the existing tests and strengthening their shared guard is a narrow correction that preserves meaningful assertions without altering production behavior.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is focused test maintenance with no production behavior, configuration, or migration change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-owned patch changes only assertions and fixture guards, so the external-contributor proof gate does not apply; the reported HTTPS Gateway run supplements the source review.

Label justifications:

  • P3: This is focused test maintenance with no production behavior, configuration, or migration change.
  • 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 maintainer-owned patch changes only assertions and fixture guards, so the external-contributor proof gate does not apply; the reported HTTPS Gateway run supplements the source review.

Evidence

What I checked:

  • Introduced scope and continuing necessity: The verified merge-base-to-head patch changes only tests and test support. Comparing all six affected paths with pinned main ba441dd preserves the complete introduced delta; the remaining corrections have not landed there. (c63142c42579)
  • Auth guard matches the production caller: resolveDynamicModelAuthProfile already passes readOnly: true to the runtime store reader. The added fixture guard records violations before throwing, and all five guard-consuming suites invoke verify during cleanup. This checks OpenClaw's reader contract without changing or depending on a Codex protocol contract. (src/agents/embedded-agent-runner/model.registry-resolution.ts:222, c63142c42579)
  • Setup selector and heading match current presentation: The setup view renders Connect before Check again, explaining the old first-button selector failure. The English catalog already defines 'Set up and verify a model'. The updated test still asserts detection occurs before explicit activation. (ui/src/pages/model-setup/view.ts:606, c63142c42579)
  • Provider-specific completion message: The existing login controller joins the selected auth label and completion text with ': ', matching the revised browser assertion. The surrounding test retains cancelled/stale callback rejection, no premature token exchange, persistence after restart, and an existing-session reply. (ui/src/pages/model-providers/login-controller.ts:305, c63142c42579)
  • Failure coverage remains substantive: The activation test removes only outer whitespace before exact error comparison. Visibility, single-alert count, retry eligibility, route retention, request counts, and absence of config writes remain asserted. (ui/src/e2e/model-setup-activation-feedback.e2e.test.ts:391, c63142c42579)
  • Merged context and routing history: Provided GitHub metadata verifies test(agents): align auth fixtures with runtime store reads #149004 merged the runtime-reader fixture migration and fix(models): share account connection across setup pages #148864 merged the shared connection UI. Local path history identifies Vincent Koc and Ayaan Zaidi as relevant recent contributors. Exact line-introduction attribution was not established because historical blob inspection could not complete. (d872aaba81a7)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: 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.

vincentkoc added a commit that referenced this pull request Sep 15, 2026
* commit '1226eecf4ff909de172a6837422cfa64723fade8': (39 commits)
  test: align model auth and setup fixtures with current behavior (#149023)
  refactor: reuse web search request context (#148949)
  fix(ci): remove duplicate Copilot auth metadata (#149016)
  test(agents): align auth fixtures with runtime store reads (#149004)
  improve: reduce data fetched during reminder maintenance (#148996)
  fix(cron): skip availability checks when session pruning is idle (#148920)
  fix(auth): guard GitHub Copilot device flow authority (#148999)
  fix(agents): prevent early recovery aborts of foreground exec (#148959)
  fix(github-copilot): remove retired Raptor mini (#116505)
  improve(feishu): reduce preparation work for documents with tables (#148997)
  improve: reduce database work when recording participants (#148841)
  test: accept Bun error labels in plugin assertions (#148955)
  fix(models): clarify saved account health and catalog status (#148987)
  test(plugins): align Copilot auth-choice registry expectations (#148981)
  fix(channels): reject blank integer channel add options (#145534)
  fix(ui): preserve archive undo after chat navigation (#148831)
  feat: show cited source previews in macOS and iOS chat (#148906)
  fix: avoid redundant tab updates while chats stream (#148865)
  test(qa): run Discord through Crabline (#116446)
  perf(crabbox): prepare project runtimes during worker download (#148952)
  ...
roboclaw-bot added a commit that referenced this pull request Sep 15, 2026
Include upstream UI setup and thinking auth fixture fixes from #149023 and #149049 without additional production auth changes. Preserve the reviewed Android palette repair and source-only locale boundary.

Co-authored-by: IWhatsskill <[email protected]>
vincentkoc added a commit that referenced this pull request Sep 15, 2026
* commit '84114b5a2711764e2ca333e327e808fd88316063': (40 commits)
  improve(sessions): reuse compiled transcript metadata queries (#148773)
  fix(ci): repair Copilot contracts and config failure diagnostics (#149001)
  test: align model auth and setup fixtures with current behavior (#149023)
  refactor: reuse web search request context (#148949)
  fix(ci): remove duplicate Copilot auth metadata (#149016)
  test(agents): align auth fixtures with runtime store reads (#149004)
  improve: reduce data fetched during reminder maintenance (#148996)
  fix(cron): skip availability checks when session pruning is idle (#148920)
  fix(auth): guard GitHub Copilot device flow authority (#148999)
  fix(agents): prevent early recovery aborts of foreground exec (#148959)
  fix(github-copilot): remove retired Raptor mini (#116505)
  improve(feishu): reduce preparation work for documents with tables (#148997)
  improve: reduce database work when recording participants (#148841)
  test: accept Bun error labels in plugin assertions (#148955)
  fix(models): clarify saved account health and catalog status (#148987)
  test(plugins): align Copilot auth-choice registry expectations (#148981)
  fix(channels): reject blank integer channel add options (#145534)
  fix(ui): preserve archive undo after chat navigation (#148831)
  feat: show cited source previews in macOS and iOS chat (#148906)
  fix: avoid redundant tab updates while chats stream (#148865)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* refactor(agents): centralize tool description exclusions

* Merge main into refactor/tool-description-exclusions-20260915

* commit '84114b5a2711764e2ca333e327e808fd88316063': (40 commits)
  improve(sessions): reuse compiled transcript metadata queries (#148773)
  fix(ci): repair Copilot contracts and config failure diagnostics (#149001)
  test: align model auth and setup fixtures with current behavior (#149023)
  refactor: reuse web search request context (#148949)
  fix(ci): remove duplicate Copilot auth metadata (#149016)
  test(agents): align auth fixtures with runtime store reads (#149004)
  improve: reduce data fetched during reminder maintenance (#148996)
  fix(cron): skip availability checks when session pruning is idle (#148920)
  fix(auth): guard GitHub Copilot device flow authority (#148999)
  fix(agents): prevent early recovery aborts of foreground exec (#148959)
  fix(github-copilot): remove retired Raptor mini (#116505)
  improve(feishu): reduce preparation work for documents with tables (#148997)
  improve: reduce database work when recording participants (#148841)
  test: accept Bun error labels in plugin assertions (#148955)
  fix(models): clarify saved account health and catalog status (#148987)
  test(plugins): align Copilot auth-choice registry expectations (#148981)
  fix(channels): reject blank integer channel add options (#145534)
  fix(ui): preserve archive undo after chat navigation (#148831)
  feat: show cited source previews in macOS and iOS chat (#148906)
  fix: avoid redundant tab updates while chats stream (#148865)
  ...

* refactor(agents): consolidate tool description exclusions

* chore: merge main for tool summary validation

* commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (1903 commits)
  refactor(matrix): reuse startup verification account key (#157310)
  perf(config): avoid repeated environment scans during publication (#156457)
  chore(i18n): refresh native locales (#157495)
  fix(update): show quiet step progress and date recorded outcomes (#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (#157454)
  test(scripts): await CLI admission fixture lifetimes (#157424)
  fix(ci): preserve consumer selection across core type stripes (#157373)
  fix(wizard): preserve typed plugin enum values (#127577) (#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (#157458)
  test: prebuild run-node signal fixture (#157478)
  refactor(exec): reuse approval policy rule keys (#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (#157365)
  fix(config): apply Gateway writes without waiting for file events (#157372)
  fix: count recorded nested tool operations once (#157438)
  fix(telegram): stop leaking raw file:// markdown links in messages (#137810)
  refactor(claws): share resource capability changes (#154680)
  improve(channels): reduce redundant preparation for button messages (#157050)
  fix(build): package preparation fails on unrelated test types (#157318)
  refactor(claws): share bounded document reading (#157436)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…8966)

* refactor(agents): centralize tool description exclusions

* Merge main into refactor/tool-description-exclusions-20260915

* commit '4a994031abb1b54d51b76755a55ac8f6e918162d': (40 commits)
  improve(sessions): reuse compiled transcript metadata queries (openclaw#148773)
  fix(ci): repair Copilot contracts and config failure diagnostics (openclaw#149001)
  test: align model auth and setup fixtures with current behavior (openclaw#149023)
  refactor: reuse web search request context (openclaw#148949)
  fix(ci): remove duplicate Copilot auth metadata (openclaw#149016)
  test(agents): align auth fixtures with runtime store reads (openclaw#149004)
  improve: reduce data fetched during reminder maintenance (openclaw#148996)
  fix(cron): skip availability checks when session pruning is idle (openclaw#148920)
  fix(auth): guard GitHub Copilot device flow authority (openclaw#148999)
  fix(agents): prevent early recovery aborts of foreground exec (openclaw#148959)
  fix(github-copilot): remove retired Raptor mini (openclaw#116505)
  improve(feishu): reduce preparation work for documents with tables (openclaw#148997)
  improve: reduce database work when recording participants (openclaw#148841)
  test: accept Bun error labels in plugin assertions (openclaw#148955)
  fix(models): clarify saved account health and catalog status (openclaw#148987)
  test(plugins): align Copilot auth-choice registry expectations (openclaw#148981)
  fix(channels): reject blank integer channel add options (openclaw#145534)
  fix(ui): preserve archive undo after chat navigation (openclaw#148831)
  feat: show cited source previews in macOS and iOS chat (openclaw#148906)
  fix: avoid redundant tab updates while chats stream (openclaw#148865)
  ...

* refactor(agents): consolidate tool description exclusions

* chore: merge main for tool summary validation

* commit 'e0f58a77476acbe382bff5e55cd520e9d228d478': (1903 commits)
  refactor(matrix): reuse startup verification account key (openclaw#157310)
  perf(config): avoid repeated environment scans during publication (openclaw#156457)
  chore(i18n): refresh native locales (openclaw#157495)
  fix(update): show quiet step progress and date recorded outcomes (openclaw#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454)
  test(scripts): await CLI admission fixture lifetimes (openclaw#157424)
  fix(ci): preserve consumer selection across core type stripes (openclaw#157373)
  fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458)
  test: prebuild run-node signal fixture (openclaw#157478)
  refactor(exec): reuse approval policy rule keys (openclaw#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365)
  fix(config): apply Gateway writes without waiting for file events (openclaw#157372)
  fix: count recorded nested tool operations once (openclaw#157438)
  fix(telegram): stop leaking raw file:// markdown links in messages (openclaw#137810)
  refactor(claws): share resource capability changes (openclaw#154680)
  improve(channels): reduce redundant preparation for button messages (openclaw#157050)
  fix(build): package preparation fails on unrelated test types (openclaw#157318)
  refactor(claws): share bounded document reading (openclaw#157436)
  ...

Co-authored-by: Vincent Koc <[email protected]>
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

3 participants