Repository navigation
test(agents,integration,gateway): remove low-value tests (batch d243) - #175902
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. |
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
c937809 to
197d5f3
Compare
…openclaw#175902) * test(agents): deslop x7925 tests * test(agents): deslop x7925 tests * test(agents): deslop x7925 tests * test(integration): deslop x7937 tests * test(integration): deslop x7937 tests * test(gateway): deslop x7936 tests * test(gateway): further deslop x7936 tests * test(gateway): reduce x7936 fixture duplication * test(qa-lab): deslop x7941 tests * test(agents): deslop x7938 tests * test(agents): deslop x7938 tests * test(auto-reply): deslop x7940 tests * test(auto-reply): deslop x7940 tests * test(plugin-sdk): deslop x7935 tests * test(plugin-sdk): deslop x7935 tests * test(config): deslop x7943 tests * test(config): deslop x7943 tests * test(gateway): deslop x7944 tests * test(gateway): deslop x7944 tests * test(cron): deslop x7945 tests * test(cron): deslop x7945 tests * test(cron): deslop x7945 tests * test(infra): deslop x7947 tests * test(infra): deslop x7947 tests * test(infra): deslop x7947 tests * test(sessions): deslop x7946 tests * test(sessions): deslop x7946 tests * test(sessions): deslop x7946 tests * test(node-host): deslop x7949 tests * test(node-host): deslop x7949 tests * test(auto-reply): format replayed TTS imports * test: repair CI regressions in d243 replay * test: preserve reviewed d243 contracts and prune stale mock baselines
What Problem This Solves
Consolidates repeated test fixtures and assertion scaffolding across 13 campaign shards (batch d243).
User Impact
No intended user-visible or production behavior change. Distinct authorization, lifecycle, persistence, routing, and transport scenarios are retained.
Why This Change Was Made
Replays 30 campaign commits onto pinned main
00adf856e25545861a26b106ee3ddad6cdbcdbfa. Repeated setup moves to focused test helpers and duplicate assertion plumbing is reduced. The source reports retain all declared scenarios; the reduction targets were not forced at the expense of distinct behavioral coverage.All 30 commits applied; none skipped as a whole. Conflict resolution: kept current-main CLI output-record tests intact; retained the already-replayed CLI session file when later cleanup commits conflicted with newer reseed coverage. Retained current-main requester-origin, system-prompt-params and thinking-runtime files when cleanup conflicted with newer routing, prompt-safety and runtime tests. Dropped the dependent requester-origin import cleanup and conflicting tool-call-id follow-up consolidation. Kept current conversation-turn-capture, channel-alias-migration, heartbeat-wake, and the already-replayed commands/agent-session-compaction files when later cleanup conflicted with new main coverage. Preserved both TTS imports; kept both owner-contention cases and write-failure cleanup in file-lock (renamed two shadowed local paths); retained existing filesystem predicate assertions in fs-safe-compat. All other cleanly applying changes retained. No production seam removed. One additional commit formats combined TTS imports. CI repair restores the pinned-main versions of plugin-node-host.abort, memory-core-host-engine-sessions, server.sessions.create.forks, telegram-reply-conversation, agent-session-compaction and agent-session-compaction-headroom; their cleanup is dropped. Other CI repairs retain the readiness wait before reading the node-host promise, preserve absent-property assertions in cron persistence, give a callback no return value, retain tuple/literal types, remove redundant default type arguments, and explain changed host-isolating module mocks.
Evidence
Per-shard replay inventory and source reports
x7925
Replayed LOC: +812/-1141. Static direct declaration count in changed files: 48 → 40 (not an expanded-case/runtime count).
src/agents/cli-output-stream.test.ts: +341/-494src/agents/cli-session-store.test.ts: +410/-488src/agents/cli-session.test.ts: +61/-159Source shard report (coverage not run):
x7925 committed as
ad5cd1734c8331483f011930b18cf432529a5b65. Worktree clean; no push.Consolidated repeated backend defaults, fingerprints, stream-frame setup, store targets, and assertions. No cases deleted or folded; distinct behavior and authority/lifecycle checks remain. No production changes. The shared runner helper remains unchanged.
Oxlint exited 0; formatting and
git diff --checkpassed. Tests, coverage, and check-changed were not run, per CI-only instructions.The 25% per-file target was met only by
cli-session.test.ts. Coordinator review must assess the smaller reductions elsewhere; this is not a target-complete shard.x7937
Replayed LOC: +1327/-1876. Static direct declaration count in changed files: 23 → 22 (not an expanded-case/runtime count).
test/telegram-http.test-support.ts: +44/-0test/telegram-outbound-permanent-rejection-loopback.test.ts: +106/-234test/telegram-recovery-notice-send.test.ts: +314/-413test/test-env.test.ts: +141/-251test/transcripts-discord-audio.integration.test.ts: +242/-272test/transcripts-tool.discord-lifecycle.integration.test.ts: +230/-281test/transcripts-tool.discord-provider.integration.test.ts: +72/-162test/twitch-message-tool-delivery.test.ts: +178/-263Source shard report (coverage not run):
Committed shard
x7937ascefa7dd8a80. Working tree is clean; nothing pushed.Test LOC: 3,143 → 2,655, down 488 lines (15.5%).
All 27 declarations and 83 actual expanded cases remain. The counter reports 78 because it undercounts the audio
flatMap. Consolidated fixtures, setup, and repeated assertions; removed unasserted diagnostic output. No production or support files changed.Plain oxlint exited 0; formatting and diff-check passed. Tests and coverage were not run, per CI-only instructions.
The 25%-per-file target was met in two files. The other six retain distinct security, lifecycle, ordering, and transport checks rather than sacrificing behavior for the metric. Hosted CI remains the runtime gate.
x7936
Replayed LOC: +1235/-1708. Static direct declaration count in changed files: 40 → 35 (not an expanded-case/runtime count).
src/gateway/server-methods.authorization.test-support.ts: +98/-0src/gateway/server-methods.authorization.test.ts: +110/-225src/gateway/server-methods.canonical-validation.test.ts: +65/-89src/gateway/server-methods.dispatch-authorization.test.ts: +47/-100src/gateway/server-methods.session-narrow-mutations.test.ts: +322/-396src/gateway/server-methods.session-patch-orchestration.test.ts: +201/-385src/gateway/server-methods.session-turn-authority.test.ts: +183/-225src/gateway/server-methods.suspension-handoff.test-support.ts: +132/-187src/gateway/server-methods.users-merge.test.ts: +77/-101Source shard report (coverage not run):
Committed shard
x7936as48897557e59. Clean worktree; not pushed.Total LOC: 3,152 → 2,970, down 182 (5.8%). Declarations 40 → 40; statically counted expanded cases 64 → 64. No cases deleted or folded.
server-methods.*)Consolidated alias-race setup/assertions, session-entry fixtures, authorization client/context builders, and suspension response assertions. Both single/batch alias-race tests retain their original failure, ordering, and unchanged-state checks. No production changes or bug fixes.
Formatting, plain oxlint (exit 0), and diff checks passed. Tests, coverage, and check-changed were not run, per CI-only instructions.
Target shortfall: only patch orchestration reached 25%. Remaining authority, corruption, and lifecycle checks were retained rather than forced into riskier reductions. Hosted CI validation remains pending.
x7941
Replayed LOC: +353/-839. Static direct declaration count in changed files: 9 → 9 (not an expanded-case/runtime count).
test/e2e/qa-lab/runtime/active-memory-trigger-stall.product-proof.e2e.test.ts: +22/-59test/e2e/qa-lab/runtime/agent-session-dedup-reconnect.e2e.test.ts: +20/-179test/e2e/qa-lab/runtime/agent-session-scope-continuity.e2e.test.ts: +26/-150test/e2e/qa-lab/runtime/agent-session-streaming.e2e.test.ts: +21/-154test/e2e/qa-lab/runtime/agent-session.test-support.ts: +99/-0test/e2e/qa-lab/runtime/codex-account-model-route.product-proof.e2e.test.ts: +14/-64test/e2e/qa-lab/runtime/codex-auth-product-proof.e2e.test.ts: +65/-233test/e2e/qa-lab/runtime/codex-product.test-support.ts: +86/-0Source shard report (coverage not run):
Committed shard x7941 as
3f2c97f3c75. Worktree is clean; nothing pushed.Test files: 3,180 → 2,507 lines (−21.2%). Including 185 lines in new
agent-session.test-support.tsandcodex-product.test-support.ts: 3,180 → 2,692 (−15.3%).Declarations/expanded cases remain 12 → 12; zero cases deleted or folded. Consolidated repeated client acquisition, Gateway configuration, cleanup, message parsing, SSE responses, and Codex fixtures; removed verbose diagnostic-only blocks. No production changes or bug fixes.
Four files reached 25%. The others retain distinct lock/recall, credential-routing, approval, or process-loss behavior; the approval and process-loss files were already tight and remain unchanged.
Plain oxlint exited 0; formatting and
git diff --checkpassed. Tests, coverage, and check-changed were intentionally not run under CI-only mode. Coordinator decision: accept the partial reduction target, subject to hosted CI.x7938
Replayed LOC: +507/-900. Static direct declaration count in changed files: 55 → 52 (not an expanded-case/runtime count).
src/agents/subagent-test-fixtures.test-helpers.ts: +49/-81src/agents/system-prompt-config.test.ts: +143/-218src/agents/system-prompt.cache-prefix.test.ts: +111/-166src/agents/tool-call-id.test.ts: +34/-111src/agents/tool-display.test.ts: +170/-324Source shard report (coverage not run):
Committed x7938 as
d7c4d529b951df3daeb401783735a3b33fe5919a. Worktree clean; not pushed.All 65 declarations and 86 expanded cases remain. Compacted fixtures, repeated assertions, single-row tables, and shell-command setup. Removed one duplicate sanitizer invocation;
expectReplaySafeSignedTurnOwnershipretains its assertions in the same case. Routing, signed-replay ordering, and distinct shell-parser inputs remain covered.No production or shared-support changes; no bug fixes. Formatting,
git diff --check, and plain oxlint passed (exit 0). Tests, coverage, and typechecking were not run under CI-only mode.The 25% per-file target was not reached. Hosted CI validation remains for the coordinator.
x7940
Replayed LOC: +585/-1031. Static direct declaration count in changed files: 57 → 54 (not an expanded-case/runtime count).
src/auto-reply/reply/commands-system-prompt.test.ts: +78/-154src/auto-reply/reply/commands-tts.test.ts: +139/-256src/auto-reply/reply/commands-update.test.ts: +152/-225src/auto-reply/reply/conversation-label-generator.test.ts: +120/-197src/auto-reply/reply/current-turn-images.test.ts: +79/-164src/auto-reply/reply/dispatch-bash-poll.test.ts: +17/-35Source shard report (coverage not run):
Committed shard
x7940ascecf8f4ff60d1537a77d9dff4b1a41318e02f15c. Worktree clean; nothing pushed.Total LOC: 3,094 → 2,680, down 414 lines (13.4%). All 71 declarations / 96 expanded cases remain; no cases deleted or folded.
Consolidated repeated fixtures, transcript/context construction, mock inspection, and assertion plumbing. Retained distinct authorization, redaction, routing, image-boundary, and lifecycle cases. No production or external support files changed; no bug/flake fixes.
Plain oxlint exited 0; oxfmt and
git diff --checkpassed. Tests, coverage, and check-changed were not run, per CI-only instructions.The 25%-per-file target was met only for images. The remaining suites were kept below target rather than dropping distinct behavior or introducing complicated helpers. Runtime validation remains for hosted CI.
x7935
Replayed LOC: +719/-1330. Static direct declaration count in changed files: 49 → 49 (not an expanded-case/runtime count).
src/plugin-sdk/facade-loader.test.ts: +51/-154src/plugin-sdk/feature-plugin.test.ts: +60/-77src/plugin-sdk/file-lock.test.ts: +57/-137src/plugin-sdk/fs-safe-compat.test.ts: +44/-100src/plugin-sdk/memory-host-core.test.ts: +325/-554src/plugin-sdk/memory-host-event-export.test.ts: +182/-308Source shard report (coverage not run):
Committed shard x7935 as
2a86f7acb9f869b369ff166de5d6c5ddec6994c5. Worktree clean; nothing pushed.Static counts remain 63 declarations / 76 expanded cases. No cases deleted or folded. Five files remain below the 25% target; distinct SDK compatibility, error, security, and lifecycle checks were retained. The test-audit review informed that retention.
Removed repeated fixtures, marker construction, file-open interception, and redundant assertion scaffolding. Direct-DM mock-only recording/dispatch counters were removed; the contextual-reply case retains routing/delivery assertions, while
run-channel-turn.pipeline.test.tsretains recording/dispatch proof. No production or external support files changed.Plain oxlint exited 0; formatting and diff checks passed. Tests, coverage, and check-changed were not run under CI-only mode. Hosted CI remains pending.
No bugs/flakes fixed. Coordinator follow-up: the workspace-alias race test retains an unverified 250 ms wall-clock wait.
x7943
Replayed LOC: +637/-1188. Static direct declaration count in changed files: 83 → 80 (not an expanded-case/runtime count).
src/config/channel-config-metadata.test.ts: +76/-114src/config/commands.test.ts: +18/-49src/config/config-corpus.test-support.ts: +31/-100src/config/config.backup-rotation.test.ts: +68/-97src/config/config.env-vars.test.ts: +36/-36src/config/config.plugin-validation.test.ts: +358/-686src/config/config.secrets-schema.test.ts: +50/-106Source shard report (coverage not run):
Committed x7943 as
bb4dac68143f352dce990790640995b47587c572. Worktree clean; not pushed.All 91 declarations / 121 expanded cases retained; none deleted or folded. Compacted fixture construction and repeated assertions without removing distinct checks. No production changes or bug fixes.
The 25%-per-file target was not met. Migration and environment suites were left unchanged because further reduction risked obscuring distinct branch and ordering checks.
Oxlint, formatting, and
git diff --checkpassed. Tests, coverage, and check-changed were not run, per CI-only instructions; hosted CI remains pending.x7944
Replayed LOC: +265/-526. Static direct declaration count in changed files: 17 → 12 (not an expanded-case/runtime count).
src/gateway/server.node-pairing-authz.test.ts: +265/-526Source shard report (coverage not run):
Shard x7944 committed as
a25271186126f8b52e0f52c3cba039d443a790dc. Worktree clean; not pushed.server.sessions.compaction.test.tsserver.node-pairing-authz.test.tsserver.sessions.create.forks.test.tsConsolidated pairing fixtures, diagnostic types, session-create calls, transcript filtering, and repeated assertions. No cases deleted or folded: 47 declarations / 62 expanded cases unchanged. No production or shared-support files changed.
The 25% target was not met. Distinct authorization, fork-capacity, and compaction-race checks remain; compaction cleanup experiments were reverted because they added complexity for little reduction.
Oxlint exited 0; formatting and
git diff --checkpassed. Tests, coverage, and check-changed were not run under CI-only instructions. No bug fixes included. Coordinator decision: accept this bounded reduction or revisit after hosted CI evidence.x7945
Replayed LOC: +1229/-1798. Static direct declaration count in changed files: 47 → 46 (not an expanded-case/runtime count).
src/cron/service/active-run-cancellation.test.ts: +149/-259src/cron/service/admission-timeout.test.ts: +23/-37src/cron/service/failure-alerts.account-routing.test.ts: +192/-297src/cron/service/failure-alerts.persistence.test.ts: +295/-405src/cron/service/jobs.apply-patch.test.ts: +79/-193src/cron/service/manual-ack-durability.test.ts: +43/-56src/cron/service/ops.regression.test.ts: +448/-551Source shard report (coverage not run):
Committed x7945 as
90e2c8cc705. Worktree clean; not pushed.Test LOC: 3,135 → 2,731, down 404 lines (12.9%). All 56 declarations / 75 expanded cases retained.
Consolidated repeated fixtures, cleanup, finalization, and assertions. No cases deleted, bugs fixed, or production/shared-support files changed.
The 25%-per-file target was met only for cancellation. Stopped below target elsewhere to preserve distinct lifecycle, persistence, routing, and crash-recovery proof; the two already-tight files remain unchanged.
Formatting, plain oxlint, and diff checks passed. Tests, coverage, and typechecks were not run under CI-only mode; hosted CI validation remains pending.
x7947
Replayed LOC: +702/-1036. Static direct declaration count in changed files: 24 → 24 (not an expanded-case/runtime count).
src/infra/heartbeat-runner-scheduler.lazy.test.ts: +80/-124src/infra/heartbeat-runner.exact-session-busy.test.ts: +117/-177src/infra/heartbeat-runner.exec-route-authority.test.ts: +138/-252src/infra/heartbeat-runner.isolated-session-mirror.test.ts: +107/-176src/infra/heartbeat-runner.legacy-exec-binding.test.ts: +246/-287src/infra/heartbeat-runner.stale-exec.test.ts: +14/-20Source shard report (coverage not run):
Committed x7947 as
d49a561a7f669dee5bcb76f3cbee09ad03c27087. Worktree clean; not pushed.Test LOC: 2,956 → 2,753, down 203 lines (6.9%). Declarations remain 51; expanded cases remain 73. The 25% target was not met.
Consolidated repeated configuration, wake requests, timer cleanup, spacing fixtures, and observation bookkeeping. No cases were deleted or folded; distinct authority and lifecycle checks remain. No production or shared-support changes.
Formatting, plain oxlint, and
git diff --checkpassed. Tests, coverage, and check-changed were not run, per CI-only mode. Coordinator decision: accept this smaller reduction or schedule further consolidation after hosted CI.x7946
Replayed LOC: +1261/-1629. Static direct declaration count in changed files: 11 → 11 (not an expanded-case/runtime count).
src/agents/sessions/agent-session-boundary.test-support.ts: +93/-0src/agents/sessions/agent-session-code-mode-source.test.ts: +438/-595src/agents/sessions/agent-session-compaction.admission.test.ts: +112/-182src/agents/sessions/agent-session-compaction.degraded-reload.test.ts: +116/-174src/agents/sessions/agent-session-compaction.provider-boundary.test.ts: +107/-187src/agents/sessions/agent-session-handoff-adoption.integration.test.ts: +261/-312src/agents/sessions/agent-session.reclamation-admission.test.ts: +134/-179Source shard report (coverage not run):
Committed
b33900f336efor shard x7946. Worktree clean; nothing pushed.Test LOC: 3,034 → 2,795, down 239 lines (7.9%). The 25% target was not reached. All 25 declarations remain; no cases deleted or folded.
Consolidated repeated fixtures, cancellation assertions, stream setup, and deferred-promise boilerplate. Removed redundant no-compaction checks already covered by complete transcript equality. Retained all distinct lifecycle, persistence, source-preservation, and cancellation scenarios; reclamation was already tight.
Plain oxlint exited 0; formatting and diff-check passed. No production or shared-support files changed. Tests, coverage, and typechecking were not run, per CI-only instructions. Hosted CI remains the runtime proof gate.
x7949
Replayed LOC: +1394/-1625. Static direct declaration count in changed files: 47 → 47 (not an expanded-case/runtime count).
src/node-host/node-worker-workspace-processes.test.ts: +259/-297src/node-host/node-worker-workspace-quiescence.acceptance.test.ts: +113/-147src/node-host/node-worker-workspace-quiescence.test.ts: +15/-21src/node-host/node-worker-workspace-retention.test.ts: +399/-489src/node-host/plugin-node-host.test.ts: +207/-217src/node-host/portal-stream-command.test.ts: +161/-184src/node-host/pty-command.test.ts: +240/-270Source shard report (coverage not run):
Committed x7949 as
a07ae633ac18e35e154521d240aa4a2243cae77c. Working tree clean; not pushed.Consolidated repeated fixtures, deferred gates, cleanup, and assertions. All 52 declarations / 79 expanded cases remain; none deleted or folded. No production/support changes or bug fixes.
Formatting, plain oxlint, and diff-check passed. Tests, coverage, and check-changed were not run under CI-only instructions.
The 25% per-file target was not met. Distinct security and lifecycle scenarios remain intact; two already-tight files were left unchanged. Hosted CI proof remains pending.
Final review repairs: preserved the original heartbeat identity, Gateway compaction target, cron outcome finalization and direct-DM buffered dispatch tests by dropping those file refactors. Restored stale-exec environment cleanup and a fresh timestamp for dead-owner lock reclamation. Rejected the sanitizer non-mutation finding: expectReplaySafeSignedTurnOwnership already asserts that the output is not the input. Fixed PTY mock type preservation with satisfies, and removed exactly seven obsolete mock-export baseline entries identified by CI (no new exceptions). Baseline LOC: +0/-7.
Conflict-driven rebase onto 00adf85: dropped the CLI runner helper cleanup to retain main's newer retired-option contract; other reviewed changes replayed cleanly. Re-ran changed-file formatting, plain lint and diff checks; no local runtime or typecheck commands.