Repository navigation
refactor(tests): consolidate repeated fixtures without dropping coverage - #192003
Conversation
Consolidate file-local setup and repeated case bodies while retaining caller, security, lifecycle, migration, and evidence-integrity assertions. Adapt reviewed portions of #185705, #185748, and #185707 with lost contracts restored. Keep the shared budget and existing allocations unchanged. Co-authored-by: galiniliev <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
|
🦞👀 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. What this changesThis PR consolidates repeated test fixtures and case bodies while removing one obsolete generated mock allowance. Example: Discord receives PXL_2024.mp4 with video/mp4 MIME and duration 11.262232780456543.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is useful maintainer-authored test maintenance, and inspection found no actionable introduced defect; current-head CI remains pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThese suites exercise channel, agent, plugin, migration, worker, and release-tool owners using synthetic inputs and assert their observable results. flowchart LR
A[Synthetic inputs] --> B[Local fixtures and case tables]
B --> C[Existing production owners]
C --> D[Results and recorded effects]
D --> E[Regression assertions]
E --> F[CI gates]
Technical reviewBest possible solution: Retain the local fixture consolidation and existing behavioral assertions, then land through the current-head CI gates. Do we have a high-confidence way to reproduce the issue? There is no reported runtime defect to reproduce; source comparison establishes repeated setup and its consolidation, and this read-only review ran no target code. Is this the best way to solve the issue? The change reuses existing test owners, keeps distinct cases in local tables or retained owner suites, and introduces no competing production machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 215c89296cb6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -1053, Other -1. Total -1054 across 21 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 3, 2026, 11:18 AM ET / 16:18 UTC (Revision 2). |
Integrate the main snapshot used by CI to repair its named About-test lint failure. Override only the clipboard descriptor and restore it on test completion. Preserve all copy assertions and the 20-file fixture consolidation; the combined delta remains 1,051 test lines smaller without budget changes. Co-authored-by: galiniliev <[email protected]>
Regenerate the shrink-only mock-export baseline after the Wiki fixture consolidation added its explicit isolation rationale. Remove exactly the retired gateway-runtime entry; test-line budgets and allocations remain unchanged. Co-authored-by: galiniliev <[email protected]>
Resolve the overlapping About clipboard test fix by retaining main's exact source from 547d5c4. The original twenty test reductions and reviewed helper contexts remain byte-identical; the PR retains only that consolidation and its generated shrink-only mock allowance update. Co-authored-by: galiniliev <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
Merge pinned main 2cf02a5 to resolve the recorded test-line ratchet failure after test-fixture reduction #192003 landed. Preserve the original six-file socket repair and exact 122-line regression allocation. Co-authored-by: galiniliev <[email protected]>
…age (openclaw#192003) * refactor(tests): consolidate repeated fixtures without dropping coverage Consolidate file-local setup and repeated case bodies while retaining caller, security, lifecycle, migration, and evidence-integrity assertions. Adapt reviewed portions of openclaw#185705, openclaw#185748, and openclaw#185707 with lost contracts restored. Keep the shared budget and existing allocations unchanged. Co-authored-by: galiniliev <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> * test: prune documented Wiki mock isolation allowance Regenerate the shrink-only mock-export baseline after the Wiki fixture consolidation added its explicit isolation rationale. Remove exactly the retired gateway-runtime entry; test-line budgets and allocations remain unchanged. Co-authored-by: galiniliev <[email protected]> --------- Co-authored-by: galiniliev <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Related: #191659, #185705, #185748, #185707
What Problem This Solves
Repeated test setup consumes the shared test budget without adding independent behavioral proof. This consolidates that setup while preserving the regression contracts needed by the ongoing integration work.
User Impact
No runtime or public API behavior changes. Maintainers get smaller fixtures and clearer case tables. The test-line baseline and all allocations stay unchanged; one obsolete mock-export allowance is removed by its maintained generator.
Why This Change Was Made
Remove 1,053 literal-LF test lines across 20 test files, plus the one-entry generated mock-baseline cleanup: 21 files total, +2,077/−3,131. This combines local release/package-lock/channel cleanups with coverage-restored selections from Peter Steinberger’s #185705, #185748 and #185707, not those PRs wholesale.
Retained contracts include caller wiring, authority checks, cleanup/error classification, transcript-to-coverage composition, trajectory-only evidence, artifact digests, registry identity and newer Memory Core shadow recovery. Two inference issues found during qualification were fixed with the actual callback/runner types, without casts or weaker assertions.
Evidence
--pruneremoves one entry (6402→6401), with no additions. The subsequent non-prune guard passes, including on the current-main composition.Peter Steinberger’s selected-work credit and Galin’s co-author credit are preserved. No shared-budget increase, production edit, weakened assertion or wholesale test deletion is included.