Repository navigation
test(doctor,agents,gateway,sessions,cron): remove low-value tests (batch d079) - #160084
Conversation
|
Codex review: blocked before merge. Reviewed September 28, 2026, 12:07 AM ET / 04:07 UTC. ClawSweeper reviewWhat this changesThe branch consolidates and removes Doctor, agent, Gateway, session, and cron tests and shrinks a test-size baseline without changing production code. Merge readiness⛔ Blocked before merge - 6 items remain Keep open. The focused suite passed, but the branch removes three distinct regression checks that neighboring tests do not fully replace. Priority: P3 Review scores
Verification
How this fits togetherThese suites exercise OpenClaw’s Doctor recovery, agent streaming, Gateway requests, session storage, and cron scheduling. Test harnesses send requests and events through those owners, then turn observed results into CI regression signals. flowchart LR
A[Requests and events] --> B[Production owners]
B --> C[Test harnesses]
C --> D[Behavior assertions]
D --> E[CI regression signal]
Before merge
Findings
Agent review detailsSecurityNeeds attention: No production authorization code changes, but the patch removes a real-Gateway test of the documented default-deny node-pairing boundary. PR surfaceTests -7620, Other -1. Total -7621 across 79 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the smaller suites while retaining one representative check for explicit agent targeting, provider-event ordering under a stalled send, and default-deny LAN pairing. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR changes test coverage rather than reporting a product bug. The lost cases are identifiable by comparing the pinned introduced diff with retained tests. Is this the best way to solve the issue? No. Most consolidation is useful, but the three distinct boundary cases should remain because the surviving tests exercise different agents, dispatch paths, or pairing states. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e8336e8d6d43. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
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
|
…tch d079) (openclaw#160084) * test(doctor): deslop s716 tests * test(agents): deslop t0026 tests * test(agents): deslop t0033 tests * test(gateway): deslop t0006 tests * test(gateway): deslop t0011 tests * test(sessions): deslop t0017 tests * test(gateway): deslop t0014 tests * test(cron): deslop t0040 tests * test(cron): deslop t0037 tests * test(cron): deslop t0039 tests * test(agents): assert exec followup calls before inspection
What Problem This Solves
This campaign batch removes repeated and implementation-coupled test cases and repeated fixture setup from the Doctor, agent, Gateway, session, and cron suites.
User Impact
No user-visible behavior or production code changes. The batch reduces test maintenance while retaining recovery, authorization, ownership, scheduling, and delivery regressions.
Why This Change Was Made
Ten previously audited shards are replayed onto current main. All ten commits applied cleanly, with no conflicts, skipped commits, or dropped hunks. A follow-up repair asserts that two recorded exec-followup mock calls exist before inspection; the first changed-file gate caught those unchecked accesses as TS2532. Production LOC is unchanged. Test files change by +5,866/-16,074 (net -10,208); test support by +1/-4 (net -3); the max-lines baseline shrinks by one line. Static test declarations decrease by 220; parameterized declarations count once, so this is not an expanded test-case count.
The combined tree retains the staggered-slot and exact-boundary cases in
service.jobs.test.ts, and first-second/DST restart cases inservice.restart-catchup.test.ts, after removing the duplicate dedicated files. The only support deletion removes an unused post-commit worker-exit fixture mode. No current CODEOWNERS patterns match the changed paths.Evidence
git diff --check origin/mainpassed.CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <all surviving changed test files>. Testbox run, leasetbx_01m3jx7ta270mvrwp1jbqbgsgm(stopped).bash-tools.exec-host-shared.test.ts. After the explicit call-presence assertions, its focused Testbox rerun passed all 22 tests. Repair test run, leasetbx_01m3jzez88by8sec8bvsra6j7k(stopped). That run's later gate was canceled because a moving shared base ref expanded its path selection; it is not claimed as passing.ui/src/pages/chat/components/chat-attachments.ts(716 counted lines, limit 700). The file and.oxlintrc.jsonare byte-identical to the pinned base, and plain lint reproduces the same error. Changed-gate run, leasetbx_01m3k0s00t2ejw8zx5r8977fzb(stopped). This inherited failure is recorded, not claimed as green.1d7e5b0813d51b7d3e4baeb983064b2a8471e722completed in three passes: scoped-clean at its default P0 threshold, zero findings. The two-assertion repair also received a scoped-clean review with zero findings. Both ran while Testbox validation was in progress.Historical shard evidence and changed files
These are historical in-shard coverage totals, not a new aggregate coverage measurement. LOC and declaration deltas are from the source commits; the separate typecheck repair adds two net test lines to the aggregate.
The original s716 report recorded only baseline coverage (1935 statements / 1285 branches / 331 functions); t0026 recorded 3211 / 2197, t0033 recorded 5337 / 3840, and t0017 had no coverage totals. Successful later coordinator snapshots supersede those incomplete reports. The other six rows reproduce their final shard reports. Historical changed-check failures from the unchanged attachment UI line-cap violation are not represented as passing checks.
s716
src/commands/doctor-session-sqlite.manifests.test.tssrc/commands/doctor-session-sqlite.publication-recovery.test.tssrc/commands/doctor-session-sqlite.receipt-recovery.test.tssrc/commands/doctor-session-sqlite.recovery-generations.test.tssrc/commands/doctor-session-sqlite.recovery-shared-owners.test.tssrc/commands/doctor-session-sqlite.recovery.test.tssrc/commands/doctor-session-sqlite.restore-history.test.tssrc/commands/doctor-session-sqlite.restore-paths.test.tst0026
src/agents/bash-tools.exec-host-node.integration.test.tssrc/agents/bash-tools.exec-host-node.test.tssrc/agents/bash-tools.exec-host-shared.test.tssrc/agents/bash-tools.exec-runtime-output.test.tssrc/agents/bash-tools.exec-runtime.cleanup.test.tssrc/agents/bash-tools.exec-runtime.test.tst0033
src/agents/embedded-agent-subscribe.model-state.delivery.test.tssrc/agents/embedded-agent-subscribe.model-state.test.tssrc/agents/embedded-agent-subscribe.partial-reply-lifecycle.test.tssrc/agents/embedded-agent-subscribe.raw-stream.test.tssrc/agents/embedded-agent-subscribe.reply-tags.test.tst0006
src/gateway/server.models-auth-order.test.tssrc/gateway/server.models-voicewake-misc.test.tssrc/gateway/server.node-invoke-approval-bypass.test.tssrc/gateway/server.node-pairing-authz.test.tssrc/gateway/server.node-pairing-auto-approve.test.tssrc/gateway/server.node-pairing-diagnostics-authz.test.tssrc/gateway/server.node-pairing-memo.test.tssrc/gateway/server.node-pairing-ssh-verify.test.tst0011
src/gateway/server.sessions.list-store-materialization.test.tssrc/gateway/server.sessions.patch-expected-identity.test.tssrc/gateway/server.sessions.permissions-hooks.test.tssrc/gateway/server.sessions.placement-projection.test.tssrc/gateway/server.sessions.plugin-ownership.test.tssrc/gateway/server.sessions.preview-resolve.test.tssrc/gateway/server.sessions.reclamation.test.tssrc/gateway/server.sessions.recover.test.tst0017
src/config/sessions/session-accessor.sqlite-handle-lifecycle.test.tssrc/config/sessions/session-accessor.sqlite-history-events.test.tssrc/config/sessions/session-accessor.sqlite-import.test.tssrc/config/sessions/session-accessor.sqlite-lifecycle-admission.test.tssrc/config/sessions/session-accessor.sqlite-maintenance-writer.test.tssrc/config/sessions/session-accessor.sqlite-message-cut.test.tssrc/config/sessions/session-accessor.sqlite-owner.test.tssrc/config/sessions/session-accessor.sqlite-participants.test.tssrc/config/sessions/session-accessor.sqlite-reclamation-admission-race.test.tssrc/config/sessions/session-accessor.sqlite-reclamation-commit.test-support.tssrc/config/sessions/session-accessor.sqlite-reclamation-commit.test.tssrc/config/sessions/session-accessor.sqlite-reclamation.test.tst0014
src/gateway/server.tools-effective.global-agent-gateway.test.tssrc/gateway/server.worker-desktop-advertisement.test.tst0040
src/cron/service.trigger-eval.test.tssrc/cron/service.unresolved-next-run.test.tssrc/cron/service.unresolved-owner.test.tssrc/cron/service.update-recompute-drops-due-every.test.tssrc/cron/service.wake-now-real-heartbeat.test.tssrc/cron/service.webhook-empty-summary.test.tst0037
config/max-lines-baseline.txtsrc/cron/service.failure-alert.test.tssrc/cron/service.get-job.test.tssrc/cron/service.heartbeat-ok-summary-suppressed.test.tssrc/cron/service.heartbeat-payload.test.tssrc/cron/service.jobs.test.tssrc/cron/service.jobs.top-of-hour-stagger.test.tssrc/cron/service.list-page-sort-guards.test.tssrc/cron/service.list-past-due.test.tssrc/cron/service.main-job-passes-heartbeat-target-last.test.tssrc/cron/service.manual-delivery.test.tssrc/cron/service.one-shot-schedule-ownership.test.tst0039
src/cron/service.restart-catchup-subsecond.test.tssrc/cron/service.restart-catchup.test.tssrc/cron/service.runs-one-shot-main-job-disables-it.test.tssrc/cron/service.scheduler-regressions.test.tssrc/cron/service.session-reaper-in-finally.test.tssrc/cron/service.skips-main-jobs-empty-systemevent-text.test.tssrc/cron/service.startup-overflow-clobber.test.tssrc/cron/service.store-load-invalid-main-job.test.tssrc/cron/service.stream-trigger.test.tssrc/cron/service.stream-validation.test.tssrc/cron/service.test-harness.test.tssrc/cron/service.timer-maintenance.test.ts