Skip to content

fix: repair account connection regression checks - #148982

Closed
steipete wants to merge 3 commits into
mainfrom
codex/fix-copilot-contract-auth-choices-20260915
Closed

steipete wants to merge 3 commits into
mainfrom
codex/fix-copilot-contract-auth-choices-20260915

Conversation

@steipete

@steipete steipete commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #149023. Additional Models assertions are tracked in #149035; duplicate Copilot metadata cleanup landed in #149016.

What Problem This Solved

This revision corrected stale setup expectations and duplicate Copilot metadata. GitHub retains head 5d7a63a41ef5a5cd176048f671e0884c06240686 for the closed PR.

User Impact

No runtime behavior changes. The fixes preserve exact metadata, explicit model activation, loading/layout checks, callback rejection, credential persistence, and chat after restart.

Final Outcome

Evidence

Focused tests, changed-file checks, and independent P2 review passed for the reviewed six-file revision. The final ClawSweeper review of the retained head found no actionable issues. Its CI run completed with two additional stale Models test failures, now addressed in #149035; the real-Gateway suite and earlier corrected tests passed.

The first cold local sign-in attempt stopped before login while UI assets rebuilt. The unchanged test passed after explicit UI prebuild using synthetic provider responses. No production deployment or resolution of runtime stalls is claimed by these test repairs.

@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 size: XS maintainer Maintainer-authored PR labels Sep 15, 2026
@steipete
steipete marked this pull request as ready for review September 15, 2026 09:47
@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
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 7:08 AM ET / 11:08 UTC (Revision 3).

ClawSweeper review

What this changes

Updates account-connection regression tests to match the existing UI and removes identical duplicate Copilot metadata properties.

Merge readiness

✅ Ready for maintainer review

Keep open: current main still needs the UI regression-check repairs, and the overlapping Copilot cleanup explicitly defers to this PR. No actionable introduced defect was found.

Priority: P3
Reviewed head: 5d7a63a41ef5a5cd176048f671e0884c06240686

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving repair with useful recorded validation and no actionable correctness findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor gate does not apply to this maintainer-authored repair, which changes no runtime behavior or authority. Recorded Linux Chromium and HTTPS Gateway qualification covers the earlier revision's corrected checks, not execution of the refreshed head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor gate does not apply to this maintainer-authored repair, which changes no runtime behavior or authority. Recorded Linux Chromium and HTTPS Gateway qualification covers the earlier revision's corrected checks, not execution of the refreshed head.
Evidence reviewed 8 items Verified introduced scope: The merge-base-to-head diff matches the supplied introduction evidence: duplicate metadata removal and four UI test corrections. Feishu changes belong to base drift and are not attributed to this PR.
Manifest behavior preserved: Read-only JSON parsing and comparison returned full parsed manifest equality. The surviving device and enterprise choices retain credentialOnly, and the device choice retains channelLogin and appGuidedSecret.
UI assertions match their owners: The setup view renders Connect before Check again; both loading and ready sections use the same translated setup title. The wizard template surrounds error text with indentation, and the login controller prefixes completion with the selected provider label. The corrected tests retain activation ordering, exact error content, callback rejection, restart persistence, and chat assertions.
Findings None None.
Security None None.

How this fits together

Model Setup and Models connect provider accounts through shared UI and Gateway owners. These regression checks verify discovery, explicit activation, sign-in feedback, and credential persistence before subsequent chat.

flowchart LR
  A[Provider metadata] --> B[Account connection UI]
  C[User setup actions] --> B
  B --> D[Gateway setup and sign-in]
  D --> E[Saved credentials and model access]
  E --> F[Chat after restart]
  G[Regression checks] --> B
  G --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -3, Tests +1. Total -2 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 1 0 3 -3
Tests 5 8 7 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 8 10 -2

Review metrics

None.

Root-cause cluster

Relationship: canonical
Canonical: #148982
Summary: This PR owns the combined regression-check repair; the recovery draft overlaps only its Copilot cleanup.

Members:

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

Technical review

Best possible solution:

Keep the existing runtime owners and strict behavioral assertions, with selectors and expected text aligned to their current contracts.

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

Yes, source establishes the stale selectors and text expectations against their current UI owners, and the discussion records corresponding failures; this read-only review did not execute them.

Is this the best way to solve the issue?

Yes, the patch repairs the existing checks without replacing production behavior, relaxing substantive assertions, or changing parsed Copilot metadata.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This repairs regression checks and duplicate metadata without changing parsed configuration or user-facing runtime behavior.
  • 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 external-contributor gate does not apply to this maintainer-authored repair, which changes no runtime behavior or authority. Recorded Linux Chromium and HTTPS Gateway qualification covers the earlier revision's corrected checks, not execution of the refreshed head.

Evidence

What I checked:

  • Verified introduced scope: The merge-base-to-head diff matches the supplied introduction evidence: duplicate metadata removal and four UI test corrections. Feishu changes belong to base drift and are not attributed to this PR. (5d7a63a41ef5)
  • Manifest behavior preserved: Read-only JSON parsing and comparison returned full parsed manifest equality. The surviving device and enterprise choices retain credentialOnly, and the device choice retains channelLogin and appGuidedSecret. (extensions/github-copilot/openclaw.plugin.json:282, 5d7a63a41ef5)
  • UI assertions match their owners: The setup view renders Connect before Check again; both loading and ready sections use the same translated setup title. The wizard template surrounds error text with indentation, and the login controller prefixes completion with the selected provider label. The corrected tests retain activation ordering, exact error content, callback rejection, restart persistence, and chat assertions. (ui/src/pages/model-setup/view.ts:606, 5d7a63a41ef5)
  • Current-main necessity: Comparison against fetched main shows all four stale UI expectations and duplicate registry properties remain there. The inspected UI production owners are unchanged between fetched main and this head. Latest release v2026.9.4 also contains the positional Check again selector; no shipped repair is established. (ui/src/pages/model-setup/model-setup-first-run.test.ts:112, 3a9d69db306c)
  • Canonical overlap checked: fix(ci): remove duplicate Copilot auth metadata #149016 remains an unmerged recovery draft whose body explicitly defers to this PR. test(plugins): align Copilot auth-choice registry expectations #148981 merged the earlier missing-field expectation repair, but does not cover the remaining UI corrections.
  • Recorded browser qualification: The supplied comment at fix: repair account connection regression checks #148982 (comment) records 18 mocked-Gateway browser cases and one real HTTPS Gateway sign-in case passing on cb64e3d918ae93b39e12663e45b58dba6e4f165a, using synthetic provider responses. It explicitly limits that receipt to the earlier revision because dependency and runtime inputs changed. The earlier commit was unavailable for local comparison, so unchanged-input claims were not independently certified. Inspected downloaded screenshots belong to related PRs and are not credited as this head's proof. (ui/src/e2e/provider-browser-login.real-gateway.e2e.test.ts:164, cb64e3d918ae)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: 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-09-15T09:59:09.068Z sha 70d8c227bbf18ee29e03e1f45cc3f1322e414d14 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-15T10:45:08.818Z sha cb64e3d918ae93b39e12663e45b58dba6e4f165a :: needs maintainer review before merge. :: none

Follow up on #148864: retain the exact Copilot auth metadata contract and select Check again by its label before proving explicit first-run activation.
@vincentkoc

vincentkoc commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Retained qualification for the earlier cb64e3d918ae93b39e12663e45b58dba6e4f165a: its complete tree 2516927c2c833c6a13dc07418a1bddde4e46eeba exactly matches the independently tested source capsule, including all test, owner, and dependency inputs.

The standard Testbox run completed with native exit 0 after one normal private-QA build:

  • Both full mocked modules passed: 18/18 cases, including the activation errors and all splash layout checks.
  • The complete HTTPS Gateway browser-login case passed: cancelled/stale callbacks, exact provider-labeled completion, saved credentials, restart, catalog discovery, and the existing-session reply. This uses synthetic provider responses.
  • No failures or skipped cases. Source identity stayed unchanged through teardown. Native lease stop, artifact readback, and owned-process cleanup were verified.

Node 24.19.0, pnpm 12.3.4, Vitest 5.0.0, Playwright 1.63.0, system Chromium 144.0.7559.0; actual Linux runner had four CPUs. Retained log SHA256: dc2876d2ea4c9c00593231c0c29191b354e3dfce7fc4d644994ce2fafbf92ea0.

No duplicate source change was pushed. Current-head CI, review, and normal landing gates still apply. The native Testbox result above is authoritative for its delegated run; the backing Actions status can reflect lease cleanup.

Revision update: Peter refreshed this PR to 5d7a63a41ef5a5cd176048f671e0884c06240686 and removed the six duplicate Copilot properties introduced on main by #148955. The resulting manifest and registry blobs exactly match the correction in #149016. The earlier CI run was superseded and cancelled; it does not qualify the new revision.

All four corrected UI test blobs, the Model Setup owner tree, and the browser-login fixture/support remain identical to the tested revision. Dependency, QA runtime, and session-owner inputs changed with the main refresh, so the 19-case receipt above remains scoped to cb64e3d9. The fresh exact-head CI and current ClawSweeper review qualify 5d7a63a4; no duplicate source push or Testbox run was made.

@steipete
steipete force-pushed the codex/fix-copilot-contract-auth-choices-20260915 branch from cb64e3d to 5d7a63a Compare September 15, 2026 10:57
@steipete steipete changed the title fix(test): align account connection fixtures with current setup fix: repair account connection regression checks Sep 15, 2026
@fuller-stack-dev

fuller-stack-dev commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Coordination from the #137828 landing lane: exact worker head e7d4d8f2a2e6f02547644fbe5671705cefaba22e is blocked only by the same duplicate-key regression in src/plugins/contracts/registry.contract.test.ts (lint job). Its file SHA256 792bd574fb1feee9730c31e993523922fb35f4f456624ff35431e7f1a9553e21 matches current main d872aaba81a769d76eabb1bec0b7ec4b8fc83354.

@vincentkoc I am treating this PR as canonical per #149016's explicit recovery relationship and will preserve your active landing ownership. No replacement PR, recovery-draft reactivation, source edit, CI retry, or competing merge has been dispatched. Worker native proof and its focused regressions are green; its dependent integration can proceed after this correction lands. I can carry ordinary remaining gates if your active execution has stopped; please identify any live writer/merge lock to preserve.

Read-only failure detail for the current prerequisite head: checks-ui-e2e (1/7) finished 447 passed / 1 failed, with the failure at ui/src/e2e/model-providers.e2e.test.ts:140, “defers live provider discovery until refresh while preserving model setup.” The provider-card text unexpectedly contains Signed in. Raw logs are retained. No retry or competing fix has been started; please preserve the substantive assertion while diagnosing current behavior.

@vincentkoc

Copy link
Copy Markdown
Member

Follow-up to the failure detail above: this is an assertion-scope mismatch, not evidence of a provider runtime regression.

The failed job executed b64ff7d0cadd7e79f2eeb5eb95bdf0dc4c56cffe (PR head 5d7a63a41ef5a5cd176048f671e0884c06240686 composed with base 0a40e770a4d811e37bc72fdbc5d6a5bad2b4ed7f). The first model-providers.e2e.test.ts case supplies an OAuth profile with status ok and an empty configured catalog. The provider header correctly says Credentials configured; the saved-account row correctly says Signed in after #148987. profiles-view.ts:124-135 owns the latter status; view.ts:372-389 renders it outside .model-providers__head. The whole-card negative at test line 140 conflates them.

For the existing owner: scope the initial positive/negative readiness assertions and post-refresh Credentials rejected assertion to openaiCard.locator(".model-providers__head"), following this file's claudeReadiness pattern. Separately assert the exact openai:chatgpt profile status is Signed in before Refresh. Keep the zero view:all requests, exact initial configured request, two-call refresh count, model-required state, and Model Setup navigation unchanged. No fixture-status change, retry, or timeout increase is needed.

Validate the failing case and the full model-providers/profile-outcomes browser modules on the repaired head. This is an owner handoff only; no competing source change or run was started.

@fuller-stack-dev

fuller-stack-dev commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

@vincentkoc Thanks for the precise handoff and confirmation that no competing source change or run was started. Under the dependent #137828 LAND assignment I will carry this narrow correction on this canonical PR at 5d7a63a41ef5a5cd176048f671e0884c06240686, preserve Peter’s ancestry and your existing assignment/evidence, and qualify the failing case plus full model-providers/profile-outcomes browser modules. No recovery-draft reactivation, replacement PR, or unrelated scope. I will recheck the live head before publishing and stop for an actual overlapping writer/merge lock.

Live reconciliation: while native read-only setup ran, #149016 independently merged at ba441dd2d14e1d02dca72dd341cff28c360acaa2 (11:17:28 UTC). That resolves #137828’s duplicate-key dependency. No source edit, browser run, push, or merge was performed on #148982. I am therefore leaving this now-independent UI correction with its existing owner and continuing #137828 on repaired main; this supersedes my prospective implementation claim above. Native setup evidence is retained.

Subsequent CI evidence (11:21 UTC): the worker’s later compact-large-7 job now confirms the separate model-setup-first-run.test.ts:113 failure already corrected here. Thus #148982 remains a real prerequisite even though its duplicate-key portion landed. I will carry the offered narrow browser-assertion handoff on the existing canonical branch, then its native gates. No replacement or unrelated scope; live-head checks remain in force. The intermediate no-edit state above is preserved as history.

@vincentkoc

Copy link
Copy Markdown
Member

One additional owner-scoped correction from the same CI attempt: UI E2E shard 2/7 fails the three fresh/populated/empty-cache partial-inventory cases at ui/src/e2e/model-providers-progressive.e2e.test.ts:139.

The preflight observed composition b64ff7d0cadd7e79f2eeb5eb95bdf0dc4c56cffe, propagated through the workflow's checkout contract; this is not a separate downstream HEAD observation. The relevant source matches current PR head 5d7a63a41ef5a5cd176048f671e0884c06240686.

#148987 changed only the unavailable branch's label from Failed to Models unavailable in view-status.ts:71-76; catalogStatus === "unavailable" and warning severity are unchanged. Update all three corresponding expectations: the broken-provider positive at line 139, healthy-provider negative at 144, and recovered-provider negative at 207. Updating only the first would leave the negative checks vacuous.

Preserve the partial-inventory warning, usable returned models, retired-choice removal, open picker, empty-inventory branch, save busy cycle, explicit Retry/recovery, and utility-model checks. Later assertions were not reached after the early failure and still need validation on the repaired head. No production change, timeout increase, or parallel repair is proposed; please include this in the existing canonical assertion-fix lane.

@RomneyDa

Copy link
Copy Markdown
Member

superceded by #149023

@RomneyDa RomneyDa closed this Sep 15, 2026
@steipete steipete changed the title fix: repair account connection regression checks fix(test): align model setup and account status assertions Sep 15, 2026
@steipete steipete changed the title fix(test): align model setup and account status assertions fix: repair account connection regression checks Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui extensions: github-copilot 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.

4 participants