Repository navigation
refactor(tests): reuse named OAuth credential fixtures - #142272
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 11:29 AM ET / 15:29 UTC. ClawSweeper reviewWhat this changesMoves the existing OAuth test-credential constructor into a lightweight shared fixture module and replaces repeated credential inputs while preserving test scenarios and expectations. Merge readiness✅ Ready for maintainer review Keep open as a useful, focused contribution to the maintainer-requested test-audit campaign. The consolidation is absent from fetched main, and the complete introduced diff shows no actionable correctness defect. Priority: P3 Review scores
Verification
How this fits togetherAuth-profile tests exercise how OpenClaw selects, refreshes, and stores provider credentials. The shared fixture constructor turns explicit synthetic credential fields into fresh test inputs for those existing checks. flowchart LR
A[Explicit synthetic credential fields] --> B[Shared fixture constructor]
B --> C[Fresh OAuth test credentials]
C --> D[Auth profile operations]
D --> E[Selection and stored state]
E --> F[Independent test assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -51. Total -51 across 7 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one lightweight credential-fixture owner with explicit call-site values and independent assertions, preserving existing coverage without claiming a runtime speedup. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates test inputs and does not report a runtime defect. Is this the best way to solve the issue? Yes: moving the existing constructor unchanged avoids a competing helper, preserves explicit input semantics, and removes unnecessary utility-module coupling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a8ac0975148f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit '04869ae4899ad0524c3287759798362b0d62fef8': (677 commits) fix(release): pin Kova census refresh (#142104) fix: doctor read-only database inspections time out on large agent databases (#142179) docs: align v2026.9.3 framing with release announcement (#142307) fix(ui): discover models when default-model pickers open (#142105) fix(ci): keep Docker upgrade seed baseline older than target (#142273) refactor(tests): reuse named OAuth credential fixtures (#142272) fix(ci): keep mobile release helpers out of source checks (#142115) chore(ui): refresh control ui locales (#142147) fix(active-memory): explain why recall was skipped (#138658) fix(media): preserve converted images with HEIC filenames (#142263) docs: add v2026.9.3 release notes (#142277) fix(ui): retire picker focus listeners together (#142258) fix(ui): keep menu hover colors consistent across themes (#142243) fix(release): keep changelog credits within verified history (#142261) fix: keep tool-finalizer placeholders private in message-only groups (#138645) perf(tui): carry prepared URL membership through rendering (#142262) test(ui): await activity cache imports before teardown (#142282) fix(qa): align auth and Workshop proofs with runtime contracts (#142280) feat(xai): use one curated catalog and concrete setup default (#142136) refactor(outbound): reuse prepared sendability facts (#142252) ...
Related: #139428
What Problem This Solves
Auth-profile tests repeat the same five-field OAuth credential setup, while the existing named-parameter constructor lives in a broader utility module with filesystem and auth-store dependencies.
Why This Change Was Made
Moves the existing
oauthCredimplementation unchanged into the lightweight credential-fixture owner and migrates its two existing callers. Fifty additional input fixtures reuse it while keeping provider, access, refresh, and expiry labels visible. The old export is removed without a compatibility alias or competing constructor.User Impact
No production behavior changes or test cases removed. Explicit expiry expressions, field absence and order, fresh objects, optional account/email semantics, and independent expected values remain intact. The change removes 51 net test/support lines, including three consequential formatter lines from the real import migration.
Evidence
No runtime speedup or aggregate coverage percentage is claimed.