Repository navigation
test(core,plugins,ui): remove low-value tests (batch d116) - #162019
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: blocked before merge. Reviewed September 30, 2026, 1:55 PM ET / 17:55 UTC. ClawSweeper reviewWhat this changesThe branch consolidates tests across core, plugins, channels, and the Control UI, updates test inventories, and makes one internal media helper private. Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open. The cleanup remains useful, but deleting a hook security test leaves an active compatibility record pointing to a file that no longer exists; the registry's test checks that path. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw plugin hooks can block tool calls and change outgoing messages. Hook tests guard those contracts, while a compatibility registry names their test files and a registry test checks that the files exist. flowchart LR
A[Test cleanup] --> B[Retained hook tests]
C[Plugin hook behavior] --> B
B --> D[Compatibility record]
D --> E{Named file exists?}
E --> F[Registry test result]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource 0, Tests -9308, Other -3. Total -9311 across 53 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Point the compatibility record at the retained hook suite so its test inventory stays accurate after consolidation. Do we have a high-confidence way to reproduce the issue? Yes. On this PR head, the registry names a deleted file and its test checks file existence; I did not execute the suite in the read-only checkout. Is this the best way to solve the issue? No, not yet. Consolidating the hook tests is reasonable, but the active compatibility record needs the same cutover. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bf7429ce730b. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
The only failing CI test job on head
Landing the exact head under the campaign's explicitly authorized pre-existing-main-failure exception. The main failure is recorded for the coordinator's separate repair. The earlier local final-assertion validation gap is closed by hosted proof: |
…gistry record Test-removal batch d116 (#162019) deleted src/plugins/hooks.security.test.ts but the hook.before_tool_call.terminal-block-approval compatibility record still listed it, so the registry's "keeps every record actionable" check failed on main for every PR merge ref. The record keeps its remaining before_tool_call e2e proof.
…162019) * test(custodian): deslop t0394 tests * test(media): deslop t0397 tests * test(imessage): deslop t0396 tests * test(agents): deslop t0392 tests * test(plugins): deslop t0383 tests * test(cli-runner): deslop t0388 tests * test(config): deslop t0405 tests * test(ui): deslop t0403 tests * test(channels): deslop t0400 tests * test(voice-call): deslop t0398 tests * test: preserve independent contracts in d116 cleanup
…gistry record Test-removal batch d116 (openclaw#162019) deleted src/plugins/hooks.security.test.ts but the hook.before_tool_call.terminal-block-approval compatibility record still listed it, so the registry's "keeps every record actionable" check failed on main for every PR merge ref. The record keeps its remaining before_tool_call e2e proof.
What Problem This Solves
This maintainer-requested campaign batch removes overlapping test cases and repeated fixtures across custodian, media, iMessage, agent execution, plugin hooks, configuration, chat history, channel turns, and voice calls.
User Impact
No user-visible behavior change. Retained tests continue to cover authorization and lifecycle fencing, cancellation, privacy, media validation, delivery accounting, and recovery. No configuration, schema, dependency, or release changes.
Why This Change Was Made
Consolidate duplicate matrices and helper-level assertions at their existing behavior boundaries. The sole production edit makes
resolveImageCompressionGridprivate tosrc/media/web-media.ts; all current callers are in that module. Remove two stale max-lines entries and two references to a deleted test suite.All ten supplied commits replayed without conflicts onto main at
3d0f45ee9cf4517a8e6f3b9bf048bafd2c508760. None were skipped and no replay hunks were dropped. The supplied CLI-runner commit already preserves the newer fast-mode case in the installation-target suite. Named parser and causal-stream sibling regressions remain unchanged and are included in fresh focused validation.Diff accounting against the landing base: production +1/-1 (net 0); tests +7805/-21249 (net -13444); test routing +0/-1; tooling/baselines +0/-3. No touched path matches the current CODEOWNERS rules.
Per-shard campaign evidence and files
Coverage figures below are the original in-shard before/after measurements, not a new aggregate coverage run. Statements and branches decreased by less than 1% per shard. Declaration counts count source
it/testdeclarations, with each table counted once; executed tests include table expansion. Final LOC and declaration deltas include the review restorations described below; the original executed-test and coverage figures remain campaign evidence. The CLI-runner and voice-call shards retain documented regressions despite missing their original 50% LOC reduction targets; voice-call also retained more than half its executed tests.Files, using brace notation for related paths:
ui/src/pages/custodian/custodian-page{,.channel-onboarding,.history,.nudges,.session-lifecycle}.test.ts.src/media/web-media.test.ts,src/media/web-media.ts,config/max-lines-baseline.txt.extensions/imessage/src/actions{,.runtime}.test.ts,config/max-lines-baseline.txt.src/agents/tools/gateway{,.hosted-routing,.operator-scopes,.runtime-identity}.test.ts,scripts/lib/ci-proof-test-inventory.mts,test/vitest/vitest.database-worker-core-paths.mjs.src/plugins/hooks.{before-agent-finalize,before-agent-reply,before-install,before-tool-call,compaction-timeout,correlation,model-override-wiring,phase-hooks,security,skill-lifecycle}.test.ts.src/agents/cli-runner/execute.{background-work,fast-mode,installation-target,pending-cancellation,supervisor-capture}.test.ts.src/config/validation.{allowed-values,channel-metadata,cold-imports,legacy-rules-fast-path,policy,sandbox-container-env}.test.ts.ui/src/pages/chat/chat-history{,.inflight,.media,.run-error,.startup}.test.ts.src/channels/turn/run-channel-turn.{custody,delivery,finalize,pipeline,prepared-lifecycle}.test.ts.extensions/voice-call/src/webhook{,.auto-response.lifecycle,.hangup-once.lifecycle,.provider-discovery,.shutdown.lifecycle,.upgrade}.test.ts.The original CLI-runner report predates its lane replay, which retained a newly added fast-mode case and therefore changes the LOC delta. The plugin shard's old max-lines failure is historical evidence only; current validation is reported below.
Evidence
oxfmt --write, plainoxlint -c .oxlintrc.json(exit 0), andgit diff --check origin/mainpassed.Independent review identified nine retained-contract gaps and these were restored before publication: ambiguous SSH edit rejection; mismatched CLI source routes; delayed webhook persistence acknowledgment; inbound HTTP auto-response without conversation mode; durable route/requester metadata; visible-but-identityless pending completion; assembled-dispatch adoption forwarding; typed wizard cancellation; and ordinary-send/session-reconnect behavior.
Three review findings were rejected with existing canonical-owner proof:
src/gateway/agent-runtime-identity-token.test.tsindependently rejects execution identity from another run, andextensions/imessage/src/send.test.tsindependently tests each hidden-content marker across poll/text actions. Those suites passed correction validation, alongside the custodian store tests. A later secret-deletion finding is covered bysecrets-tool.test.ts(explicit required identity), retained hosted-routing required-token coverage, andserver-methods/secrets.lifecycle.test.ts(retired delegated authority cannot delete). The reconnect case also retains explicit original-send and rejoin session-ID assertions. A mixed index/working-tree review was incomplete; the final review selects the staged candidate.