Skip to content

test(core,plugins): remove low-value tests (batch d029) - #158964

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d029-1790430570
Sep 26, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d029-1790430570

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The test suite contains repeated assertions, redundant table rows, and verbose fixture setup that add maintenance cost without distinct regression coverage.

User Impact

No user-visible behavior change. Batch d029 reduces test maintenance while preserving current main's newer lifecycle, authorization, storage, and transport contracts. Production code is unchanged.

Why This Change Was Made

Replay ten campaign commits onto current main, consolidating fixtures and removing low-value duplicate coverage. The final replay changes 77 test files: +1,152/-4,151 test LOC (net -2,999) and 890→800 syntactic test declarations (-90). Production LOC: +0/-0. The max-lines baseline shrinks by two entries. Parameterized declarations count once here; these are not executed case counts.

All ten commits were applied in order; no whole commit was skipped. Conflicting cleanup was narrowed to preserve current main:

  • Video: retain main's current generated-video timeout assertion; regenerate the baseline and retain the newer web-search entry.
  • Tool-call repair: retain main's split suites and shared helper imports, including required matcher/event-factory options. Drop obsolete inline-helper and moved-suite hunks.
  • Helpers: drop cleanup of the rewritten Gateway startup suite and retain current asynchronous auth staging and missing-schema rejection.
  • Shared: retain exact operator grants/session ceilings, owner revocation, error-misalignment and parser regressions. Drop the rewritten session-method-scope file and the retired downgraded-tool-call suite hunk.
  • Transcripts: retain newer pagination/date regressions. Drop cleanup of rewritten status-producer, store, and summary suites, including settled-startup and snapshot/reader ownership coverage.
  • Plugin state: drop cleanup of the rewritten runtime/store suites; retain worker-backed and synchronous-owner contracts.
  • Teams meetings: retain main's shared runtime, probe, and Chrome cleanup suites instead of resurrecting inline fixtures.
  • QA channel: retain main's separate target/thread routing and inbound ownership; drop channel-actions/inbound rewrites and retired explicit-thread cases. Preserve typed Gateway contexts and lifecycle assertions.
  • Nextcloud Talk: retain current runtime spies and raw webhook API; consolidate fixtures without restoring the removed webhook adapter.

No changed path matches the current CODEOWNERS rules.

Evidence

  • Local pnpm install --frozen-lockfile --prefer-offline, formatting of all 77 changed test files, git diff --check origin/main, and the changed-check dry run passed. The max-lines baseline was recomputed with the repository ratchet tool.
  • Type-aware local lint passed for core/package tests (config/tsconfig/oxlint.core.json) and helper tests (test/tsconfig/tsconfig.test.root.json). Plugin type-aware lint stopped before lint execution because SDK declaration generation timed out after 300,000 ms. The repository wrapper's syntax-only mode then passed for every changed plugin test, including unused-import/variable checks.
  • Fresh remote test and changed-gate proof is incomplete due to infrastructure. Testbox lease tbx_01m3f0gtwmzh3ka15g8xjzbeq8 verified and synced the candidate. The first command rejected an obsolete extra sibling path (plugin-state-store.e2e.test.ts) before running any tests. That target was corrected to the current plugin-state-worker.test.ts; all 79 requested targets were checked to exist. The corrected command combined CI=1 pnpm test for all 77 changed tests plus the tool-payload and plugin-state-worker siblings, followed by OPENCLAW_TESTBOX=1 OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 node scripts/check-changed.mjs -- <78 changed paths>. It was rejected before dispatch because the lease expired during cold source preparation (Blacksmith Testbox has finished; create a new lease, provider error, command time 0). A preliminary attempt also corrected the wrapper's base-ref argument requirement before dispatch. No corrected-run test failure is being suppressed, and no fresh remote pass is claimed.
  • Testbox lease run; the expired task-owned lease was stopped. Historical shard proof is listed below. Campaign authorization permits arming on this infrastructure gap; required hosted openclaw/ci-gate remains the merge gate.
  • Independent autoreview completed with no P0 findings at its configured threshold. Additional static inspection of conflict resolutions and Nextcloud Talk fixture/owner contracts found no actionable replay errors. No review finding was accepted or rejected.

The following are historical in-shard coverage results, not a fresh coverage measurement of this replay. The narrower replay above retains additional current-main cases. Each totals cell reproduces its shard report's covered-count line.

Shard Replayed test LOC Declarations In-shard coverage totals
s205 -827 73→60 (-13) covered statements 393 -> 391 (-2); branches 388 -> 386 (-2); functions 64 -> 62 (-2)
s214 -108 104→97 (-7) covered statements 1266 -> 1265 (-1); branches 1085 -> 1083 (-2); functions 121 -> 121 (0)
s208 -81 58→53 (-5) covered statements 11602 -> 11601 (-1); branches 2441 -> 2440 (-1); functions 1317 -> 1317 (0)
s217 -858 345→304 (-41) covered statements 3045 -> 3045 (0); branches 2446 -> 2447 (1); functions 496 -> 496 (0)
s219 -15 42→42 (0) covered statements 0 -> 0 (0); branches 0 -> 0 (0); functions 0 -> 0 (0)
s222 -40 9→9 (0) covered statements 783 -> 782 (-1); branches 445 -> 443 (-2); functions 248 -> 248 (0)
s218 -137 109→105 (-4) covered statements 253 -> 253 (0); branches 243 -> 243 (0); functions 83 -> 83 (0)
s216 -237 43→37 (-6) covered statements 444 -> 444 (0); branches 384 -> 384 (0); functions 89 -> 89 (0)
s220 -696 107→93 (-14) covered statements 801 -> 801 (0); branches 519 -> 518 (-1); functions 159 -> 159 (0)

Coverage limitations: s219's formal comparison excluded every file after a baseline timeout, so its 0→0 row is not meaningful coverage proof. That report separately recorded raw covered statements 1,303→1,304 and branches 976→977, without raw function totals. Its separate flake fix is not included in this batch. The first s208 comparison exceeded 1% amid slow-SQLite diagnostics; an unchanged rerun produced the quoted counts. No replay coverage percentage is claimed.

Per-shard changed files

All names below end in .test.ts.

  • s205 — src/video-generation/: capabilities, capability-overlays, dashscope-compatible, live-test-helpers, runtime.
  • s214 — packages/tool-call-repair/src/: grammar, payload, protection-fast-path, stream-normalizer.
  • s208 — test/helpers/: bounded-child-output, gateway-e2e-harness, gateway-multi-acquisition, live-image-probe, openai-long-context-live, openclaw-test-instance.acquisition, process-wait, qa-gateway-cleanup, temp-dir.
  • s217 — src/shared/: account-enabled, agent-liveness, agent-run-status, assistant-error-format.html, assistant-error-format, bounded-buffer, chat-message-content, chat-send-ack-status, config-eval, device-bootstrap-profile, entry-status, frontmatter, global-singleton, human-list, ignore-rules, json-schema-defaults, levenshtein-distance, model-key, node-match, node-resolve, one-time-ticket-store, operator-scope-compat, path-array-index, pid-alive, requirements, resume-handoff, string-sample; under text/: assistant-visible-text, final-tags, formatted-reasoning-message, reasoning-tags.
  • s219 — src/transcripts/: capture-stop, config, library, status, summary-model.
  • s222 — src/plugin-state/: plugin-state-store.fresh-store, plugin-state-store.import, plugin-state-store.schema.
  • s218 — extensions/teams-meetings/src/: cli; under transports/: teams-meetings-audio-routing, teams-meetings-caption-capture, teams-meetings-platform-adapter, teams-meetings-urls.
  • s216 — extensions/qa-channel/src/: bus-client, channel, channel.threading, gateway.
  • s220 — extensions/nextcloud-talk/src/: inbound.authz, inbound.behavior, inbound.room-info-retry, message-actions, monitor-runtime.abort, monitor.limiter-lifecycle, monitor.replay, room-info, send.cfg-threading, setup, webhook-spool.

config/max-lines-baseline.txt removes only extensions/openrouter/index.test.ts and src/video-generation/runtime.test.ts.

@clawsweeper

clawsweeper Bot commented Sep 26, 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: nextcloud-talk Channel integration: nextcloud-talk channel: qa-channel Channel integration: qa-channel plugin: teams-meetings Teams Meetings plugin size: XL labels Sep 26, 2026
@steipete
steipete enabled auto-merge (squash) September 26, 2026 15:18
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 26, 2026, 11:25 AM ET / 15:25 UTC.

ClawSweeper review

What this changes

The branch consolidates and removes tests across OpenClaw core and bundled plugins and shrinks the max-lines suppression baseline, without changing production code.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this active test-cleanup PR open. Its changes are not on current main, and the review found one narrow baseline error to fix before merge.

Priority: P3
Reviewed head: b2d1d2f905e827fabf1baf633c179490c7c3c4d5

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The test reductions have useful supporting evidence, but one incorrect baseline removal needs a focused repair.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored PR changes tests and a lint baseline rather than production behavior; the PR body reports historical shard evidence and discloses that its fresh remote run did not dispatch. No stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored PR changes tests and a lint baseline rather than production behavior; the PR body reports historical shard evidence and discloses that its fresh remote run did not dispatch. No stored-data contract changes.
Evidence reviewed 8 items Introduced baseline change: The introduced diff removes the OpenRouter test from the max-lines baseline alongside the shortened video test.
Suppression remains: The unchanged OpenRouter test still has an explicit max-lines suppression at line 1272 in the verified test merge.
Merge-result baseline: The test merge has the pinned base and PR head as its two parents. GitHub's content read found the neighboring OpenShell entry but neither removed baseline entry.
Findings 1 actionable finding [P2] Restore the OpenRouter max-lines baseline entry
Security None None.

How this fits together

Core and plugin tests check behavior before changes pass OpenClaw's CI gate. A separate ratchet compares source-file lint suppressions with a tracked baseline and reports entries that no longer match.

flowchart LR
  A[Core and plugin tests] --> B[Changed-file CI]
  B --> C[Test results]
  D[Source suppressions] --> F[Baseline comparison]
  E[Baseline list] --> F
  F --> G[Local result or hosted warning]
Loading

Before merge

  • Restore the OpenRouter max-lines baseline entry (P2) - The PR removes this entry, but extensions/openrouter/index.test.ts still has an explicit max-lines suppression in the verified merge result. The ratchet therefore treats it as a new suppression: local checks fail, while GitHub Actions reports a warning. Keep this entry until that file's suppression is removed.
  • Resolve merge risk (P1) - The baseline omits a suppression still present in OpenRouter's unchanged test file, causing local max-lines ratchet checks to fail and hosted checks to warn.
  • Complete next step (P2) - Restore the OpenRouter baseline entry and validate the max-lines ratchet against the exact merged tree before merge.

Findings

  • [P2] Restore the OpenRouter max-lines baseline entry — config/max-lines-baseline.txt:151
Agent review details

Security

None.

PR surface

Tests -2999, Other -2. Total -3001 across 78 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 77 1153 4152 -2999
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 78 1153 4154 -3001

Review metrics

Metric Value Why it matters
Baseline inventory drift 1 retained suppression omitted The omitted entry changes the local ratchet result even though the hosted job reports the violation as a warning.

Merge-risk options

Maintainer options:

  1. Correct the ratchet baseline (recommended)
    Restore the OpenRouter entry while leaving the shortened video test's entry removed, then check the merged tree's ratchet result.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Restore extensions/openrouter/index.test.ts in config/max-lines-baseline.txt; keep the src/video-generation/runtime.test.ts removal. Validate the max-lines ratchet against the merged tree and run git diff --check.

Technical review

Best possible solution:

Keep the baseline synchronized with the actual suppression inventory, and retain tests that protect distinct behavior at their owning boundaries.

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

Yes, from source: the test merge retains OpenRouter's suppression while dropping its baseline entry, and the ratchet marks unlisted suppressions as violations. I did not execute the check.

Is this the best way to solve the issue?

No, not yet: the sampled test consolidations retain useful boundary coverage, but the baseline must keep the OpenRouter entry while that suppression remains.

Full review comments:

  • [P2] Restore the OpenRouter max-lines baseline entry — config/max-lines-baseline.txt:151
    The PR removes this entry, but extensions/openrouter/index.test.ts still has an explicit max-lines suppression in the verified merge result. The ratchet therefore treats it as a new suppression: local checks fail, while GitHub Actions reports a warning. Keep this entry until that file's suppression is removed.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.92

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is test maintenance with no production behavior change and one narrow baseline repair.
  • add merge-risk: 🚨 automation: The introduced baseline deletion makes local max-lines validation reject an unchanged, still-suppressed test file.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This member-authored PR changes tests and a lint baseline rather than production behavior; the PR body reports historical shard evidence and discloses that its fresh remote run did not dispatch. No stored-data contract changes.

Label justifications:

  • P3: This is test maintenance with no production behavior change and one narrow baseline repair.
  • merge-risk: 🚨 automation: The introduced baseline deletion makes local max-lines validation reject an unchanged, still-suppressed test file.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This member-authored PR changes tests and a lint baseline rather than production behavior; the PR body reports historical shard evidence and discloses that its fresh remote run did not dispatch. No stored-data contract changes.

Evidence

Acceptance criteria:

  • [P1] pnpm check:max-lines-ratchet --base origin/main.
  • [P1] git diff --check.

What I checked:

  • Introduced baseline change: The introduced diff removes the OpenRouter test from the max-lines baseline alongside the shortened video test. (config/max-lines-baseline.txt:151, b2d1d2f905e8)
  • Suppression remains: The unchanged OpenRouter test still has an explicit max-lines suppression at line 1272 in the verified test merge. (extensions/openrouter/index.test.ts:1272, 9d6b8a9926e2)
  • Merge-result baseline: The test merge has the pinned base and PR head as its two parents. GitHub's content read found the neighboring OpenShell entry but neither removed baseline entry. (config/max-lines-baseline.txt:150, 9d6b8a9926e2)
  • Ratchet behavior: The ratchet treats an explicit suppression absent from its baseline as a new entry. Its limit reporter fails local checks but makes violations advisory under GitHub Actions. (scripts/check-max-lines-ratchet.mts:212, b2d1d2f905e8)
  • Hosted check result: The exact-head baseline-ratchets job completed successfully. Its success does not resolve the local ratchet mismatch because limit violations are advisory in GitHub Actions. (b2d1d2f905e8)
  • Current-main distinction: Fetched current main still lists the OpenRouter suppression, so the mismatch is introduced by this branch. (config/max-lines-baseline.txt:150, d0a658d9dcec)

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)
  • Agustin Rivera: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: 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.

  • Restore the retained OpenRouter suppression to the baseline and verify the ratchet against the merged tree.

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.

@steipete
steipete merged commit a4498e9 into main Sep 26, 2026
134 of 136 checks passed
@steipete
steipete deleted the tcr/land-d029-1790430570 branch September 26, 2026 15:32
MarMarLabs added a commit to MarMarLabs/openclaw that referenced this pull request Sep 26, 2026
45 upstream commits, including the Feishu webhook move to Gateway routes
(openclaw#158861), which replaces webhookHost and webhookPort with legacyWebhook
in the Feishu schema. channel.ts and config-schema.ts changed on both
sides and auto-merged, and each equals this branch plus upstream's own
lines. Nothing this branch changes reads webhookHost or webhookPort, and
the modules it imports from upstream's change (accounts, types, gateway,
doctor, config-schema) keep every export it uses.

Two conflicts, both generated: docs/.generated/config-baseline.sha256 and
src/config/bundled-channel-config-metadata.generated.ts. Both came from
upstream and were regenerated. config-baseline.counts.json auto-merged to
3744 because each side independently took the channel count from 3742 to
3744, and the real count with both is 3746.

build:docker ran in a separate detached checkout of this commit outside the
nested node_modules install. Regenerating there changed those three files
and nothing else, giving core 2463, channel 3746, plugin 4349 as
predicted, a channel hash neither side had, and upstream's core and plugin
lines. The three generated-file checks pass there. The lockfile did not
move. No test this branch moved was deleted upstream in this range.

Feishu: 106 files and 1935 tests in the extension project, 16 files and
301 tests in the database-workers project, all 122 Feishu test files on
disk. The forwarder test and the routing guards pass, 1908 tests.
tsgo:core, tsgo:extensions, tsgo:extensions:test, tsgo:test:root, the
line-cap and assertion-safety ratchets against upstream/main, oxlint and
oxfmt on the 42 changed code files all pass. The max-lines ratchet flags
extensions/openrouter/index.test.ts, whose baseline entry upstream's
openclaw#158964 removed while the file keeps its suppression. This branch touches
neither file.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
)

* test(video): deslop s205 tests

* chore: prune stale max-lines baseline entry

* test(tool-call-repair): deslop s214 tests

* test(helpers): deslop s208 tests

* test(shared): deslop s217 tests

* test(transcripts): deslop s219 tests

* test(plugin-state): deslop s222 tests

* test(teams-meetings): deslop s218 tests

* test(qa-channel): deslop s216 tests

* test(nextcloud-talk): deslop s220 tests

* chore: prune replayed video test baseline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: nextcloud-talk Channel integration: nextcloud-talk channel: qa-channel Channel integration: qa-channel merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: teams-meetings Teams Meetings plugin rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant