Repository navigation
refactor(test): reuse explicit fallback config fixtures - #146948
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 13, 2026, 6:56 AM ET / 10:56 UTC. ClawSweeper reviewWhat this changesReuses the existing model-fallback configuration fixture in twelve test inputs while preserving their scenarios and assertions. Merge readiness✅ Ready for maintainer review Keep open: this is a useful, behavior-preserving cleanup within the maintainer-requested test audit. Current main still contains the repeated configurations, and no actionable defect was found. Priority: P3 Review scores
Verification
How this fits togetherModel fallback chooses alternate models when an agent request cannot complete. These tests supply primary and fallback configurations to verify selection order, cooldown recovery, and generation-specific model selection. flowchart LR
A[Test primary and fallback inputs] --> B[Shared configuration fixture]
B --> C[Model fallback tests]
D[Simulated failures and provider generations] --> C
C --> E[Fallback selection and retry owners]
E --> F[Existing result and ordering assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -97. Total -97 across 3 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep explicit test inputs with the shared fixture owner while preserving every existing fallback scenario and assertion. Do we have a high-confidence way to reproduce the issue? Not applicable: this is test-fixture cleanup, not a reported runtime defect; equivalence is supported by the inspected constructors and introduced hunks. Is this the best way to solve the issue? Yes: reusing the existing pure fixture removes repetition without introducing another owner or weakening assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4d48e9c1e026. 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.
|
* temp/pr-146799: (70 commits) test: reuse explicit fallback config fixtures (openclaw#146948) fix(computer): return fresh window observations after actions (openclaw#146822) refactor(feishu): remove unreachable requester topic selection (openclaw#146904) improve(gateway): reduce CPU spent listing agent-owned sessions (openclaw#137745) fix(ui): avoid recapturing chat drafts during UI updates (openclaw#146884) fix(ui): show system uptime in the debug overlay (openclaw#146960) fix(retry): honor waits beyond the native timer limit (openclaw#145718) fix(ui): keep chat history idle when run status changes (openclaw#146802) fix(ui): reuse persisted text during chat streaming (openclaw#146831) refactor(qa): share harness drift result construction (openclaw#146903) test(agents): coordinate settings lock contention (openclaw#146949) fix(worker): avoid repeatedly serializing screenshot history (openclaw#146907) fix(secrets): stop buffered upload writes after cancellation (openclaw#146840) perf(doctor): avoid unnecessary state runtime imports (openclaw#146926) improve: reduce compaction request estimation work (openclaw#146961) fix(ci): wait for forwarded avatar imports before assertions (openclaw#146729) perf(workers): skip configured Git author lookups (openclaw#146833) fix: admit borrowed memory writes through the agent database owner (openclaw#146760) fix(discord): prevent voice playback gaps and stale turn controls (openclaw#146798) improve: reduce worktree filesystem stalls and archive syncs (openclaw#146906) ...
Related: #139428
What Problem This Solves
Model-fallback tests still repeat complete primary/fallback configuration objects already provided by their shared fixture owner.
User Impact
No user-visible behavior changes. All fallback, cooldown, session override, and generation-scoping scenarios remain covered.
Why This Change Was Made
Twelve remaining inputs now use the existing
createModelFallbackConfigfactory, removing 97 test lines without changing the helper. It creates fresh nested objects while preserving the supplied fallback array, its order, and omitted fields. The generation suite adds one runtime fixture-module import; that module has only a type-only dependency.Evidence
All three complete suites passed before and after: 210 cases with identical per-file order and outcomes. The full-source inverse, 36 actual constructor controls, changed-file gate, and fresh independent review passed. The controls checked values, property descriptors, ordered keys, absent fields, fresh objects, and fallback-array identity.
No runtime-speed improvement is claimed; the local runs reused a warm cache and shared host capacity.