Repository navigation
test(core): remove low-value tests (batch d171) - #174237
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1340d0f0c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -690,12 +530,12 @@ describe("MediaStreamHandler security hardening", () => { | |||
|
|
|||
| expect(Buffer.concat(receivedAudio).toString()).toBe("early"); | |||
| expect(onConnectCalls).toBe(1); | |||
There was a problem hiding this comment.
Assert the replacement connection spy
When this test reaches the successful early-media path, both remaining references to onConnectCalls throw a ReferenceError because the refactor removed that counter and replaced it with the onConnect mock. Consequently, the voice-call test file fails instead of verifying the behavior; assert the new spy at both locations.
AGENTS.md reference: AGENTS.md:L85-L87
Useful? React with 👍 / 👎.
Retain the early-media and metadata-scope assertions after fixture renames. Preserve mocked export contracts, declare isolated runtime boundaries, and shrink the timeout baseline to the remaining reference. Correct async cancellation and dynamic loader fixture types.
|
Codex review: needs changes before merge. What this changesThis PR consolidates repeated test fixtures and assertions across core and voice-call suites and shrinks one timeout baseline. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-directed cleanup provides useful test consolidation, and source inspection found no definite new defect. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe test infrastructure supplies synthetic inputs to core and plugin owners, checks their observable results, and reports failures through CI. flowchart LR
A[Synthetic fixtures] --> B[Shared test support]
B --> C[Core and plugin owners]
C --> D[Contract assertions]
D --> E[CI gate]
Technical reviewBest possible solution: Land the consolidation with distinct regression contracts preserved and required CI checks satisfied. Do we have a high-confidence way to reproduce the issue? This is test cleanup rather than a product bug report; no target code or tests were executed during this read-only review. Is this the best way to solve the issue? Shared fixtures and parameterized cases are appropriate here; inspected authority, cancellation, transport, and recovery cases retain their distinct assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 88ef99e66fc9. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests -3311, Other 0. Total -3311 across 68 files. Added test files: 4. View PR surface stats
Review metrics
LabelsLabel 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 Reviewed October 16, 2026, 9:43 AM ET / 13:43 UTC. |
Restore the terminal-outcome, Windows install audit, and installed candidate-check tests after independent review found lost safety coverage. Preserve mocked call signatures and literal identity fields, forward the complete injection authority contract, and remove four obsolete mock-baseline entries.
* test(voice-call): deslop x7138 tests * test(voice-call): deslop x7138 tests * test(plugins): deslop x7135 tests * test(plugins): deslop x7135 tests * test(plugins): deslop x7135 tests * test(update-cli): deslop x7132 tests * test(update-cli): deslop x7132 tests * test(update-cli): deslop x7132 tests * test(harness): deslop x7139 tests * test(harness): further deslop x7139 tests * test(harness): preserve independent x7139 expectations * test(harness): further compact x7139 fixtures * test(tui): deslop x7134 tests * test(tui): deslop x7134 tests * test(tui): deslop x7134 tests * test(daemon): deslop x7140 tests * test(daemon): deslop x7140 tests * test(daemon): deslop x7140 tests * test(logging): deslop x7133 tests * test(logging): deslop x7133 tests * test(logging): deslop x7133 tests * test(gateway): deslop x7144 tests * test(gateway): deslop x7144 tests * test(gateway): deslop x7144 tests * test(gateway): deslop x7141 tests * test(gateway): deslop x7141 tests * test(gateway): deslop x7141 tests * test(infra): deslop x7142 tests * test(infra): deslop x7142 tests * test(infra): deslop x7142 tests * test: reconcile d171 fixtures with current main * test: repair d171 fixture references and CI ratchets Retain the early-media and metadata-scope assertions after fixture renames. Preserve mocked export contracts, declare isolated runtime boundaries, and shrink the timeout baseline to the remaining reference. Correct async cancellation and dynamic loader fixture types. * test: retain d171 failure boundaries and precise fixture types Restore the terminal-outcome, Windows install audit, and installed candidate-check tests after independent review found lost safety coverage. Preserve mocked call signatures and literal identity fields, forward the complete injection authority contract, and remove four obsolete mock-baseline entries. * test(gateway): preserve lazy cron mock contracts
What Problem This Solves
Reduces repetitive test fixtures and duplicate assertion scaffolding in campaign batch d171.
User Impact
No intended production behavior change. Security, authority, recovery, and lifecycle contracts remain covered by the retained tests. This batch changes tests and test support only.
Why This Change Was Made
Consolidates repeated setup, request builders, cleanup, and expectations across voice-call, plugins, update-cli, harness, TUI, daemon, logging, Gateway, and infrastructure tests. The campaign's conservative reductions are not a claim of reaching its 25% target.
Replay base:
163e18fa89e8551718531d2289e78aabb05e6fb3. All 30 requested commits were replayed in order; no whole commits skipped. Conflicting edits tosrc/plugins/memory-runtime.test.tsin a89d40b008d and 5e5acd680f1 were dropped, preserving current-main lifecycle regressions and the first clean cleanup. All three service-plan edits were dropped to retain current-main runtime/recovery cases. Harness conflicts retained new allowlist regressions and all four unsafe-control cases while applying compatible consolidation. Logging conflicts retained console-capture, CPU/heap profile, and diagnostic tests unchanged; backend-liveness retained only its initial clean cleanup. Infra conflicts retained agent-events.routing and approval-gateway-resolver unchanged, and retained the first clean changes in approval-native-route-coordinator and the first two clean changes in approval-handler-runtime. The orphaned logging profile helper was removed; two references in preserved harness tests were updated to the imported alias. Production files are unchanged. The mock-export baseline also drops four obsolete entries after real-export preservation or explicit isolation annotations. CI required shrinking the timeout-race baseline for approval-handler-runtime.test.ts from 3 references to its single remaining reference.Evidence
pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write, plainnode_modules/.bin/oxlint -c .oxlintrc.json, andgit diff --check: passed before publication.openclaw/ci-gateis the behavioral proof and merge gate.queryingis read twice in the restored schtasks.install file, and plain oxlint passes. A focused review of the final mock-type correction runs during fresh CI.Shard inventory and replay deltas
Counts below compare the replay base to this PR, not the older source-shard reports. Declarations are static
it/testdeclarations (not runtime-expanded cases). Test support is counted separately; source coverage was explicitly not run under CI-only mode in every supplied shard report. No coverage totals exist to quote.Files by shard:
src/cli/update-cli/update-command-fixtures.test-support.ts,src/cli/update-cli/update-command-service-publication.test.ts,src/cli/update-cli/update-command-service-transition.test-support.ts,src/cli/update-cli/update-command-service-unavailable.test.ts,src/cli/update-cli/update-command-target.n1-prefix.test.ts,src/cli/update-cli/update-command-task-delivery.test.ts,src/cli/update-cli/update-command-terminal-record.test.ts. Coverage: not run (CI-only source report).src/logging/config.test.ts,src/logging/diagnostic-backend-liveness.test.ts,src/logging/diagnostic-heartbeat-context.test.ts. Coverage: not run (CI-only source report).src/tui/tui-attachment-failures.test.ts,src/tui/tui-command-handlers.test.ts,src/tui/tui-event-handlers.test.ts,src/tui/tui-handler-test-support.ts,src/tui/tui-submit-test-helpers.ts,src/tui/tui.submit-handler.test.ts. Coverage: not run (CI-only source report).src/plugins/marketplace.download.test.ts,src/plugins/marketplace.test.ts,src/plugins/memory-audience.test.ts,src/plugins/memory-background-reload.test.ts,src/plugins/memory-embedding-provider-runtime.test.ts,src/plugins/memory-provider-runtime.test.ts,src/plugins/memory-runtime.test.ts. Coverage: not run (CI-only source report).extensions/voice-call/src/cli.test.ts,extensions/voice-call/src/media-stream.playback-marks.test.ts,extensions/voice-call/src/media-stream.test-support.ts,extensions/voice-call/src/media-stream.test.ts,extensions/voice-call/src/runtime.realtime-routing.test.ts,extensions/voice-call/src/runtime.test.ts,extensions/voice-call/src/tunnel.process.test.ts,extensions/voice-call/src/tunnel.test.ts. Coverage: not run (CI-only source report).src/agents/harness/policy.test.ts,src/agents/harness/prompt-compaction-hook-helpers.test.ts,src/agents/harness/provider-route-selection.test.ts,src/agents/harness/registry.test.ts,src/agents/harness/runtime-plugin.test.ts,src/agents/harness/structured-input-execution.test.ts,src/agents/harness/structured-input.test.ts,src/agents/harness/tool-authority.runtime.test.ts. Coverage: not run (CI-only source report).src/daemon/schtasks.installed-diagnostics.test-support.ts,src/daemon/schtasks.installed-package.test-support.ts,src/daemon/schtasks.stop.test.ts,src/daemon/schtasks.test.ts. Coverage: not run (CI-only source report).src/gateway/server-cron-lazy.test.ts,src/gateway/server-database-engine.postgres.test.ts,src/gateway/server-discovery-runtime.test.ts,src/gateway/server-http.authority-outcomes.test.ts,src/gateway/server-http.hooks-delivery.test.ts,src/gateway/server-http.probe.test.ts,src/gateway/server-http.rejection-transport.test.ts. Coverage: not run (CI-only source report).src/infra/agent-activity-events.test.ts,src/infra/agent-events.test.ts,src/infra/agent-run-delegated-authority.test.ts,src/infra/approval-handler-bootstrap.test.ts,src/infra/approval-handler-runtime.test.ts,src/infra/approval-native-route-coordinator.test.ts. Coverage: not run (CI-only source report).src/gateway/conversation-list.admission.test.ts,src/gateway/conversation-route-ownership.worker.test.ts,src/gateway/conversation-send-turn.test-support.ts,src/gateway/conversation-send.test.ts,src/gateway/conversation-turn.test.ts,src/gateway/credentials-secret-inputs.test.ts,src/gateway/credentials.test.ts,src/gateway/cron-creator-authority-grant.test.ts,src/gateway/cron-exit-watchers.test.ts. Coverage: not run (CI-only source report).Production: +0/−0. Tests: +9160/−14583 (net -5423). Test support: +403/−311 (net 92). Shrink-only baseline: +1/−5.