Skip to content

refactor(tests): consolidate repeated fixtures without dropping coverage - #192003

Merged
roboclaw-bot merged 4 commits into
mainfrom
roboclaw/test-fixture-reduction-20261103
Nov 3, 2026
Merged

roboclaw-bot merged 4 commits into
mainfrom
roboclaw/test-fixture-reduction-20261103

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • 500 unique cases passed across all 18 affected runtime suites. The first bounded command completed 14 suites / 400 cases before its 15-minute controller deadline (exit 143 retained); the continuation ran only unfinished suites plus the repaired registry suite: 128 passes including 28 rechecks. The interrupted invocation is not presented as a complete pass.
  • Earlier release-watcher 28/28 and package-lock-generator 94/94 before/after passes are reused on unchanged bytes. All 20 final files, their before-blobs and 15 original fixture/helper contexts remain unchanged through the current-main integration. Historical proof is not fresh-head CI.
  • Focused core/extension/tooling types, all 20 type-aware lint checks, formatting and whitespace checks pass. No production, dependency-version, test-line-budget or allocation changes relative to main.
  • Original CI41662001446 passed the test-line guard with 992 spare on merge68d8a6dd/basebb7f5dd7:6,434,576 lines; ceiling6,435,568. Other ratchets passed except the stale mock allowance below. This is original-run evidence, not a green result for the final head.
  • Generated baseline: the Wiki CLI fixture’s explicit mock-isolation rationale retires exactly its existing gateway-runtime allowance. Maintained --prune removes one entry (6402→6401), with no additions. The subsequent non-prune guard passes, including on the current-main composition.
  • Inherited lint repair and conflict: the original CI also failed on a Navigator spread in the About test. We reproduced and qualified a local repair, but main independently landed 547d5c496b94f3a472d9b0a7ea9fb6975ff4a66c. The final branch integrates f13464d and retains main’s exact About file; this PR no longer changes it. Its4 tests, typed lint and canonical ui-pages typecheck pass after resolution. No visual change is introduced by this PR.
  • Canonical local autoreview of complete bb7f5dd→ed03e6e5 assessed all22 then-changed files with21 intact contexts: P0–P2 scoped-clean, complete. An independent final resolution review verified unchanged retained deltas, before-blobs and all21 supplied contexts, with no actionable source findings. The only subtraction is the redundant About edit. Final committed range f13464d→7fc5f546ac6eb91d680ece2a0d80f77e2be5dc42 matches that independently reviewed21-file delta exactly.
  • Prior hosted review of b3da203 reached overallPlatinum/patchPlatinum with no findings. Current-head hosted review and green CI remain required; the prior rating is not presented as a new-head result.
  • Local execution used Linux, Node26.12.1 wrappers and repository-pinned Bun workers. Other-platform local proof is not claimed. Earlier broad cleanup failures concerned old-base learn exports fixed by merged#191706/204ed834, now included in main; those failures remain retained, without claiming a fresh broad-local run.

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.

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]>
@clawsweeper

clawsweeper Bot commented Nov 3, 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 channel: discord Channel integration: discord channel: nostr Channel integration: nostr channel: voice-call Channel integration: voice-call extensions: memory-core Extension: memory-core agents Agent runtime and tooling extensions: qa-lab extensions: memory-wiki extensions: openrouter channel: x size: XL labels Nov 3, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 3, 2026 15:15
@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 Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: A standalone test verifies that the attachment remains video.
  • After: A shared case table verifies the same input and expected result.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Proportional test-only validation supports a useful, coherent refactor with no actionable findings; current-head CI has not completed.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored test refactor changes no shipped behavior; the body reports focused suite execution, and the inspected Dreams screenshots concern a separate linked UI change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated setup increases test-maintenance cost and consumes the shared test-line budget.
Reason: The maintainer-authored direction reduces duplication without changing runtime contracts or increasing the shared budget.

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
Reviewed head: 7fc5f546ac6eb91d680ece2a0d80f77e2be5dc42

Before merge

None.

Findings

None.

Agent review details

How this fits together

These 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]
Loading

Technical review

Best 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

  • Channel and authorization case tables keeps the original intent (feat(x): add guest mode for repository questions #165354: Existing X tests protect guest isolation and administrator authority; the consolidated cases retain queued-write retirement, account isolation, and paid-lookup checks.)
  • Memory Core migration fixtures keeps the original intent (414c250: The migration tests protect legacy-index import, canonical-row precedence, retryable failures, and search results; newer archived-shadow recovery cases remain intact.)
  • Agent and plugin lifecycle fixtures keeps the original intent (f7fa650: Earlier consolidation retained owning-boundary SQLite and lifecycle proof; this change retains generation selection, live overlays, frozen snapshots, scope retirement, and resource cleanup.)
  • Release watcher fixtures keeps the original intent (3c67c5c: The watcher tests distinguish pending approvals, successful publication, and failed detached children; the shared fixture preserves those inputs and exit assertions.)
  • Wiki body preservation and special-file rejection keeps the original intent (690241f: FIFO rejection prevents blocking reads, while the unchanged mutation-owner suite independently protects human-note preservation during metadata updates.)
  • Mock-export baseline keeps the original intent (unknown: Older baseline blobs are outside the prefetched history; the current checker and isolation annotation establish that this is a shrink-only allowance removal.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit f7fa650 adds src/agents/subagents/registry/subagent-registry-state.test.ts:89 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f7fa6508cce4; files: src/agents/subagents/registry/subagent-registry-state.test.ts)
  • Dallin Romney: Raw commit 3c67c5c adds test/scripts/release-stable.test.ts:249 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3c67c5c3e491; files: test/scripts/release-stable.test.ts)
  • RoboClaw: Raw commit 4a95b4e adds extensions/memory-core/doctor-contract-api.test.ts:800 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 4a95b4eed497; files: extensions/memory-core/doctor-contract-api.test.ts)

PR surface

Tests -1053, Other -1. Total -1054 across 21 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 20 2077 3130 -1053
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 21 2077 3131 -1054

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is test-maintenance cleanup with no intended production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-03T15:36:01.126Z sha b3da203 :: needs maintainer review before merge. :: none

Reviewed November 3, 2026, 11:18 AM ET / 16:18 UTC (Revision 2).

roboclaw-bot and others added 2 commits November 3, 2026 15:39
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]>
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Nov 3, 2026
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]>
@openclaw-barnacle openclaw-barnacle Bot removed the app: web-ui App: web-ui label Nov 3, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@roboclaw-bot
roboclaw-bot merged commit 2453d5b into main Nov 3, 2026
125 checks passed
@roboclaw-bot
roboclaw-bot deleted the roboclaw/test-fixture-reduction-20261103 branch November 3, 2026 16:33
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

roboclaw-bot added a commit that referenced this pull request Nov 3, 2026
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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: discord Channel integration: discord channel: nostr Channel integration: nostr channel: voice-call Channel integration: voice-call channel: x extensions: memory-core Extension: memory-core extensions: memory-wiki extensions: openrouter extensions: qa-lab P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

1 participant