Repository navigation
refactor: share current auth store test envelopes - #146808
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: blocked before merge. Reviewed September 13, 2026, 4:07 AM ET / 08:07 UTC (Revision 2). ClawSweeper reviewWhat this changesConsolidates repeated authentication-store wrappers into a shared test fixture helper while preserving explicit credentials and expectations. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this remains a useful, maintainer-requested cleanup that current main does not contain. No actionable patch defect was found. Priority: P3 Review scores
Verification
How this fits togetherAuthentication tests supply profile maps to OpenClaw’s model selection, credential storage, commands, and secret-resolution paths. The shared helper constructs their current-store input without changing production behavior. flowchart LR
A[Explicit test profiles] --> B[Shared fixture helper]
B --> C[Current auth store input]
C --> D[Auth and secret operations]
D --> E[Independent test expectations]
F[Historical migration fixtures] --> D
Before merge
Agent review detailsSecurityNone. PR surfaceTests -467. Total -467 across 46 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared factory limited to current-store inputs, with historical migration payloads and expected-value oracles remaining explicit. Do we have a high-confidence way to reproduce the issue? Not applicable: this is fixture cleanup, not a reported product defect. Runtime tests were not rerun in the read-only review. Is this the best way to solve the issue? Yes: extending the existing pure fixture module preserves profile identity and evaluation timing while leaving independent expectations intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d7111df63696. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
da733a9 to
58a042e
Compare
Reuse the existing pure auth fixture owner at 245 current-store construction sites. Preserve profile maps, historical inputs and independent assertions while removing 466 net test/support code lines.
58a042e to
e5597ec
Compare
|
Merged via squash.
|
Reuse the existing pure auth fixture owner at 245 current-store construction sites. Preserve profile maps, historical inputs and independent assertions while removing 466 net test/support code lines.
Related: #146699
What Problem This Solves
Auth tests repeat the same current-store envelope around explicit profile maps, adding unnecessary fixture maintenance.
User Impact
No user-visible change. This maintainer-requested cleanup removes 466 net test/support code lines while preserving production behavior and test assertions.
Why This Change Was Made
Use the existing pure auth fixture module for the common envelope at 245 call sites. The factory preserves profile-map identity, key order, omitted fields, and callback evaluation. Historical migration payloads, marker-sensitive fixtures, expected-value oracles, and hoisted setup remain literal.
Evidence
Retained source-bound proof includes 1,991 passing tests across 45 files, followed by 218 passing tests when two files changed upstream. Native TypeScript and AST/comment comparisons preserve every changed fixture, and independent review found no actionable findings. All 46 files and the complete refactor patch remain byte-identical to that verified source.
A fresh complete changed-code gate passes on corrected main, including core test types, lint, ownership guards, and all three dead-export scans. Shared focused proof passes all four corrected sidebar cases and all 24 compiler-shard owner tests. These new results supplement the retained tests; unchanged suites were not rerun.
The branch now includes the existing main repairs from #146702 (CI routing fixture), #146862 (sidebar deferred imports), and #146803 (compiler-shard headroom). The previous CI failures were traced to shared main state; no assertions, compiler limits, or concurrency controls were weakened. Fresh required CI is verified separately before landing.
Final CI qualification
The exact published-head required CI workflow passed, and native preparation completed without changing the head. Seven separate CodeQL Security High/Critical Quality jobs completed query execution and SARIF export but failed during result upload. The Actions security job explicitly reports a server error; the other six logs do not expose the HTTP cause. Their SARIF results are unavailable, so this is not a claim of a clean CodeQL scan. Original failures are retained; no scanner suppression, CI override, or source change was introduced. Live branch rules require the passing
openclaw/ci-gate.