Skip to content

test(core,plugins): remove low-value tests (batch d108) - #161689

Merged
steipete merged 12 commits into
mainfrom
tcr/land-d108-1790743874
Sep 30, 2026
Merged

steipete merged 12 commits into
mainfrom
tcr/land-d108-1790743874

Conversation

@steipete

@steipete steipete commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repeated test scenarios and fixture setup add maintenance and execution cost across skills, ACP dispatch, Anthropic transport, Teams, Gateway, Doctor, memory, and plugin discovery.

User Impact

No user-visible behavior changes. This maintainer-requested campaign batch changes tests only: 22 files, including four deleted split suites. Production LOC: +0 / -0. Test files: +5,548 / -19,522; 32,863 → 18,889 (net -13,974); test support: +0 / -2. Total net -13,976. Static test declarations: 756 → 412 (net -344).

Why This Change Was Made

Replay ten coverage-gated campaign commits onto main, removing duplicate variants and consolidating repeated fixtures while retaining the owner-boundary, security, lifecycle, privacy, and regression cases. Coverage repairs restored distinct routed-delivery, signed-thinking, provider-prefix, restart retry, successful usage refresh, and plugin-policy cases before these commits were accepted.

Eight supplied cleanup shards remain in the final diff. The t0281 session-patch cleanup was skipped on the final rebase to preserve main’s new Ultrafast coverage, including its follow-up fixture-fix hunks. The t0317 Doctor cleanup is withdrawn entirely after review, preserving main’s complete missing-table refusal, successful quarantined-index recovery, and schema preflight suite. Rebase resolutions against final pinned main 6e6916dcfef85bdb194837d113a3c0ee09f3b0aa: retained the current session-patch suite and dropped the entire cleanup hunk for agent-runner-memory.preflight-stale-tokens.test.ts, preserving main’s current roster/default-agent and routed-account cases byte-for-byte. The other two t0314 files remain reduced. Review retained distinct contracts covering: plugin-level Teams approval authorization; explicit Anthropic proxy/TLS policy and ordinary truncated streams; direct ACP prompt redaction; fresh reasoning-media filtering and media custody during dual storage outages; registered-database preflight; trust-service outages; and authored privileged-plugin allowlists. These intentional restorations narrow the original deletions. A further owner-aware retention audit preserves partial-delivery caption suppression and committed-side-effect replay refusal; non-default-agent usage cache isolation; ACP runtime stale-binding recovery and history-image count bounds; small-growth memory-latch and deferred-background refusal; transport endpoint precedence, fallback exclusions, and output budgets; and China schema acceptance without serviceUrl. No baseline, production, dependency, or CODEOWNERS-owned paths changed. CI repairs make the HTTP fixture own rejected requests, contextually type fixture tables, complete required verification metadata, and remove the unused search re-export from test support. During checkout, a concurrent update of the shared main ref left an older index tree; this was reconciled to pinned base a79c90c6e50fe94ca9c9464ed49b33e985c90e75 before replay. No unrelated changes are included. Formatting, plain lint, and diff checks passed again after the rebase; hosted CI evaluates the new exact head.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <changed tests> and plain oxlint -c .oxlintrc.json <changed tests> (17 test files and one support file in the final diff): passed; git diff --check passed.
  • Changed-path dry run classified only core and extension tests.
  • Fresh Testbox proof gap: warmup lease tbx_01m3rbmz6kdt3sm85hvwy3yw50 (run) expired after its 30-minute idle lifetime while source preparation was still running. No test command executed; the lease is stopped. A combined retry of CI=1 pnpm test <20 files> followed by OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <24 paths> was cancelled after a further 30 minutes in source preparation and produced no test/check result. Lease tbx_01m3rg25rdfafcn962w23kfczh was allocated while shutdown was settling and was explicitly stopped. Heavy tests were not moved onto the overloaded local host. These are unrun checks, not passing results.
  • The original ten shard candidates have successful Testbox coverage/test completions, listed below. The additive review repairs passed formatting/plain lint and received a fresh repair review; their runtime verification remains for hosted CI.
  • CI initially exposed the five fixture issues above; they were repaired without suppressions or weaker assertions. Fresh isolated autoreview of the complete six-file repair, including restoration of the original Doctor suite, returned scoped-clean at P0/P1. A subsequent CI run narrowed the remaining error to session-table typing; the entire session-patch cleanup was then withdrawn to preserve newer main behavior. Campaign Testbox staging also hit its protected-mirror capacity, so the repaired runtime/type-aware rerun remains an infrastructure gap with each pushed head gated by fresh hosted CI.
  • Auto-merge uses the exact pushed head and the required openclaw/ci-gate, under the campaign's explicit Testbox infrastructure-gap rule.

Review disposition: nine accepted findings restored. Two rejected with source evidence: the removed memory fixture only asserted initialTurnTainted and its optional event callbacks were never provided by the production caller; the retained test preserves that assertion while owner tests cover sticky taint and durable provenance. The removed skills.sh mutable-ref variant duplicates the retained mutable-GitHub-ref test: clawhub-install-core.ts invokes assertInstallResolutionAllowed unconditionally before branching on requestedReference, so both routes share the same pinned-commit guard. Repair review returned one additional finding, rejected after tracing the owner: openclaw-agent-schema-inspection.ts:73 returns immediately for a newer schema; openclaw-database-preflight.ts:578 only performs ownership admission for supported/older schemas; and openclaw-database-preflight.messages.ts:27 supplies for agent ops from the incompatible-schema record. A metadata ownership mismatch cannot satisfy this assertion. No accepted findings remain.

The original shard summaries predate recovery. The later successful Testbox completions match every changed file and deletion in the supplied commits. The LOC/declaration columns describe the final candidate including review restorations. The coverage columns are in-shard campaign measurements before those additive restorations, not a fresh aggregate coverage measurement on the rebased tree. Every final shard reported failed=0; covered statement/branch losses remain below 1% (maximum 0.8621% / 0.9662%).

Shard Test LOC before → after Static declarations before → after Covered statements Covered branches Covered functions
t0289 3,157 → 1,796 96 → 49 547 → 545 636 → 633 80 → 78
t0276 5,508 → 2,843 104 → 42 4,582 → 4,567 3,408 → 3,378 825 → 824
t0287 4,737 → 2,898 98 → 67 2,169 → 2,164 1,765 → 1,754 305 → 303
t0286 2,741 → 1,278 98 → 59 696 → 690 591 → 587 115 → 111
t0283 4,349 → 3,114 85 → 52 3,650 → 3,632 2,625 → 2,600 625 → 622
t0317 Withdrawn; main unchanged Unchanged 617 → 617 203 → 203 102 → 102
t0314 4,900 → 3,076 84 → 50 3,240 → 3,235 2,569 → 2,550 576 → 575
t0270 3,938 → 1,990 93 → 42 1,201 → 1,199 828 → 820 186 → 185
t0288 3,533 → 1,894 98 → 51 3,824 → 3,822 2,838 → 2,835 861 → 860
t0281 Skipped; main unchanged Unchanged 616 → 616 413 → 413 35 → 35

LOC includes comments and blanks; declarations are outermost it/test calls, with each parameterized table counted once rather than expanding runtime cases. Doctor and session-patch are withdrawn from the final diff; their historical campaign coverage is retained here for provenance. Test LOC excludes the two removed support-file lines. Per-shard totals overlap production files and must not be summed into an aggregate coverage claim.

Files by shard and final campaign coverage totals
  • t0289: src/skills/lifecycle/clawhub.test.ts, plus removal of an unused re-export/import in src/skills/lifecycle/clawhub.test-support.ts.
  • t0276: src/auto-reply/reply/dispatch-acp.owner.test.ts, src/auto-reply/reply/dispatch-acp.test.ts.
  • t0287: packages/ai/src/transports/anthropic-transport-stream.test.ts; deleted packages/ai/src/transports/anthropic-transport-stream.terminal-repair.integration.test.ts.
  • t0286: extensions/msteams/src/channel.actions.test.ts, extensions/msteams/src/channel.directory.test.ts, extensions/msteams/src/channel.test.ts; deleted extensions/msteams/src/channel.message-adapter.test.ts, extensions/msteams/src/channel.reaction-current-message.test.ts.
  • t0283: src/gateway/server-restart-sentinel.media-binding.test.ts, src/gateway/server-restart-sentinel.test.ts.
  • t0317: withdrawn; src/commands/doctor-maintenance.schema-preflight.test.ts is identical to pinned main.
  • t0314: src/auto-reply/reply/agent-runner-memory.private-transcript.test.ts, src/auto-reply/reply/agent-runner-memory.test.ts.
  • t0270: src/gateway/server-methods/usage.sessions-usage-cache.test.ts, src/gateway/server-methods/usage.sessions-usage-owner-attribution.integration.test.ts, src/gateway/server-methods/usage.sessions-usage.test.ts, src/gateway/server-methods/usage.status-cache.test.ts, src/gateway/server-methods/usage.test.ts; deleted src/gateway/server-methods/usage.sessions-usage-owner-attribution.test.ts.
  • t0288: src/plugins/channel-plugin-ids.test.ts.
  • t0281: skipped; src/gateway/sessions-patch.test.ts is identical to final pinned main.

Final recovered campaign totals, in the table's shard order:

{"files":1,"configs":1,"failed":0,"stmts":545,"stmtsTotal":8844,"fns":78,"branches":633,"branchesTotal":7294}
{"files":2,"configs":1,"failed":0,"stmts":4567,"stmtsTotal":34178,"fns":824,"branches":3378,"branchesTotal":28269}
{"files":1,"configs":1,"failed":0,"stmts":2164,"stmtsTotal":11414,"fns":303,"branches":1754,"branchesTotal":11584}
{"files":3,"configs":1,"failed":0,"stmts":690,"stmtsTotal":6077,"fns":111,"branches":587,"branchesTotal":5020}
{"files":2,"configs":1,"failed":0,"stmts":3632,"stmtsTotal":126501,"fns":622,"branches":2600,"branchesTotal":104344}
{"files":2,"configs":1,"failed":0,"stmts":617,"stmtsTotal":46492,"fns":102,"branches":203,"branchesTotal":40133}
{"files":3,"configs":2,"failed":0,"stmts":3235,"stmtsTotal":33895,"fns":575,"branches":2550,"branchesTotal":28071}
{"files":5,"configs":1,"failed":0,"stmts":1199,"stmtsTotal":126477,"fns":185,"branches":820,"branchesTotal":104328}
{"files":1,"configs":1,"failed":0,"stmts":3822,"stmtsTotal":39773,"fns":860,"branches":2835,"branchesTotal":34832}
{"files":1,"configs":1,"failed":0,"stmts":616,"stmtsTotal":126501,"fns":35,"branches":413,"branchesTotal":104344}

@clawsweeper

clawsweeper Bot commented Sep 30, 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: msteams Channel integration: msteams gateway Gateway runtime commands Command implementations size: XL labels Sep 30, 2026
@steipete
steipete enabled auto-merge (squash) September 30, 2026 06:37
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 30, 2026
@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 30, 2026, 4:14 AM ET / 08:14 UTC (Revision 5).

ClawSweeper review

What this changes

The branch consolidates and removes tests for Teams, Anthropic streaming, agent replies, Gateway usage and recovery, plugin discovery, and skill installation without changing production code.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this PR open. Its test cleanup remains distinct from current main, and the resolved merge preserves the Doctor and session-setting cases raised in earlier reviews. I found no definite patch defect.

Priority: P3
Reviewed head: 0c7470fe2773bd97b8e9b74e68d5bf47954ef271

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The cleanup has retained boundary tests and successful exact-head test lanes, but its broad test changes still lack the required measured cost record.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer test-cleanup PR changes no production behavior requiring a real-setup demonstration. Exact-head test lanes are supplemental validation, and no stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer test-cleanup PR changes no production behavior requiring a real-setup demonstration. Exact-head test lanes are supplemental validation, and no stored-data contract changes.
Evidence reviewed 9 items Introduced scope: The pinned merge-base-to-head change affects test files and one test-support export; it changes no production file.
Earlier concerns preserved: The verified test-merge result leaves the Doctor schema-preflight, session-patch, and memory preflight-stale-token suites identical to its main parent.
Retained boundary coverage: The revised Teams suite still checks current-message reaction fallback and rejects applying it to another conversation or a destructive action; the media-retention suite covers replaced, rotated, and deleted requesters.
Findings None None.
Security None None.

How this fits together

These suites feed fixture and loopback HTTP inputs through OpenClaw's plugins, transport, agent-reply, and Gateway code. Their assertions provide CI regression signals for those product paths.

flowchart LR
A[Test inputs] --> B[Plugins and transport]
A --> C[Agent replies and Gateway]
B --> D[Observed results]
C --> D
D --> E[Test assertions]
E --> F[CI regression signal]
Loading

Before merge

  • Resolve merge risk (P1) - The PR body omits measured per-file wall time and CI seconds for materially changed test files, leaving the repository's test-cost budget unaudited.
  • Complete next step (P2) - Record measured test wall times and available CI seconds for the materially changed test files in the PR body before merge.
  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
Agent review details

Security

None.

PR surface

Tests -13976. Total -13976 across 22 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 22 5945 19921 -13976
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 22 5945 19921 -13976

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the condensed suites where they protect distinct routing, recovery, privacy, and transport contracts, with their measured execution cost recorded.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the condensed suites where they protect distinct routing, recovery, privacy, and transport contracts, with their measured execution cost recorded.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR does not report a user-facing defect. The introduced test changes and retained assertions were inspected; this read-only review did not execute tests.

Is this the best way to solve the issue?

Yes: consolidating repeated fixtures in owner-level suites is a maintainable path, and the sampled deleted boundary cases retain equivalent or stronger coverage.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 22dda5a60d26.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is test-maintenance cleanup with no production behavior change or reported user regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer test-cleanup PR changes no production behavior requiring a real-setup demonstration. Exact-head test lanes are supplemental validation, and no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add measured per-file test wall times and available CI seconds to the PR body.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-09-30T06:41:22.147Z sha d9a485b7176066bb099092f7c3d4bbf9f554e3de :: blocked before merge. :: [P2] Retain unscoped preflight compaction routing coverage
  • reviewed 2026-09-30T06:54:10.653Z sha a8a45c0 :: blocked before merge. :: [P2] Restore the missing-table Doctor refusal case | [P2] Retain successful quarantined-index recovery coverage
  • reviewed 2026-09-30T07:26:00.790Z sha 77eef16 :: blocked before merge. :: [P2] Retain the partial-delivery caption suppression assertion | [P2] Retain committed-side-effect replay refusal coverage
  • reviewed 2026-09-30T08:01:26.285Z sha ecd970d01c88e75a968187fa56fe90b96529453b :: blocked before merge. :: none

@steipete
steipete force-pushed the tcr/land-d108-1790743874 branch from d9a485b to a8a45c0 Compare September 30, 2026 06:46
@steipete
steipete disabled auto-merge September 30, 2026 06:57
@openclaw-barnacle openclaw-barnacle Bot removed the commands Command implementations label Sep 30, 2026
@steipete
steipete enabled auto-merge (squash) September 30, 2026 07:18
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. label Sep 30, 2026
@steipete
steipete disabled auto-merge September 30, 2026 07:32
@steipete
steipete enabled auto-merge (squash) September 30, 2026 07:54
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Sep 30, 2026
@clawsweeper clawsweeper Bot removed the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Sep 30, 2026
@steipete
steipete force-pushed the tcr/land-d108-1790743874 branch from ecd970d to 0c7470f Compare September 30, 2026 08:05
@steipete
steipete merged commit 0a0a2e0 into main Sep 30, 2026
123 checks passed
@steipete
steipete deleted the tcr/land-d108-1790743874 branch September 30, 2026 08:15
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
)

* test(skills): deslop t0289 tests

* test(auto-reply): deslop t0276 tests

* test(ai): deslop t0287 tests

* test(msteams): deslop t0286 tests

* test(gateway): deslop t0283 tests

* test(commands): deslop t0317 tests

* test(auto-reply): deslop t0314 tests

* test(gateway): deslop t0270 tests

* test(plugins): deslop t0288 tests

* test: retain distinct security and lifecycle coverage

* test: repair reduced fixtures and retain Doctor contracts

* test: preserve remaining behavior contracts in cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: msteams Channel integration: msteams gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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