Repository navigation
test(gateway): remove low-value tests (batch d139) - #162964
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: needs maintainer review before merge. Reviewed October 1, 2026, 3:59 PM ET / 19:59 UTC. ClawSweeper reviewWhat this changesRemoves redundant Gateway session test cases and benchmark diagnostics, consolidates fixtures, and preserves assertions in stronger retained tests. Merge readiness✅ Ready for maintainer review Keep open: this remains useful test cleanup absent from pinned main, and no actionable patch defect was found. The retained boundary tests support the documented deletion dispositions. Priority: P3 Review scores
Verification
How this fits togetherGateway session services turn stored conversation, membership, and lifecycle facts into session lists, history, and events. These tests protect that behavior across storage workers, authorization checks, and concurrent updates. flowchart TD
A[Stored session facts] --> B[Storage workers]
B --> C[Session projection]
D[Viewer authority] --> E[Gateway session requests]
C --> E
E --> F[Lists history and events]
G[Retained boundary tests] --> E
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -1182. Total -1182 across 39 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one meaningful test owner per contract and retain the public Gateway, storage, authorization, and race coverage while removing redundant setup and reporting. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates tests rather than repairing a reported product defect; its production behavior is unchanged. Is this the best way to solve the issue? Yes: the inspected fixture consolidation and retained owner-boundary assertions support this cleanup without adding production seams or competing implementations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c0c8809be308. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
* test(gateway): deslop s810 tests * test(gateway): deslop s808 tests * test(gateway): deslop s817 tests * test(gateway): deslop s815 tests * test(gateway): deslop s816 tests * test(gateway): deslop s806 tests * test(gateway): deslop s812 tests * test(gateway): deslop s813 tests * test(gateway): deslop s814 tests
What Problem This Solves
Gateway session tests contain duplicate matrix rows, repeated setup, and an already-skipped reporting benchmark that add maintenance without independent regression protection.
User Impact
No user-visible behavior changes. This maintainer-requested batch removes low-value tests and consolidates fixtures while retaining lifecycle, authorization, storage, concurrency, and RPC boundary coverage. No production files, configuration, or schemas change.
Why This Change Was Made
Replay nine audited cleanup commits onto main at
84dc4c73ceee27d8067570fc1cdc6e2bc5dbe272. The separate profile-setter fixture-import commit465afe04631cis omitted because main already carries the correct worker-owned import ined961d55486(#162571).Conflict resolutions preserve current main: retain the new row-publication and transcript dependencies in
session-row-event-parity.test.ts; retain the static sessions-read import while consolidating cold-storage setup; retain category invalidation, membership readiness, and SQL-idleness assertions while using the shared describe helper insession-row-projection.prepared-read.test.ts. No current-main regression cases were dropped.None of the changed paths match current CODEOWNERS rules.
Evidence
session-create-collision.test.ts. Command:CI=1 pnpm install --frozen-lockfile --prefer-offline >/dev/null && CI=1 pnpm test <38 focused paths>. Source admission pinned this candidate toc14068033727bab30212032dce5db6e1a6f4d34b; run exited 0. Testbox run, leasetbx_01m3wdyh3p8bp89mjmrpp3fnsw, stopped.oxfmt --write <changed files>, plainoxlint -c .oxlintrc.json <changed TS files>, andgit diff --checkpassed for the pinned batch diff. No formatter changes remained.OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <39 changed paths>was attempted. Leasetbx_01m3wfgwvzye4294q9wsbh2cjpremained queued for more than 13 minutes with no runner or checks started, then was explicitly stopped. This gate is unrun locally; it is not a passing result. Per the campaign arming rule, hosted CI is the merge gate.Historical shard coverage below comes from each original campaign report; it is not a new coverage measurement against current main. s813 excludes its failed worker-read baseline group; its report separately records repaired full-file tests and all final shard tests passing. Other noted failing baselines were repaired before their reported complete comparisons. The original reduction targets were deliberately not forced beyond supported deletions.
Declaration counts count syntactic
it/testdeclarations, including table declarations; executed-case totals are the original per-shard reports.s810: files and historical coverage
src/gateway/session-row-changes.gateway.test.tssrc/gateway/session-row-event-ancestor-placement.test.tssrc/gateway/session-row-event-parity.test.tssrc/gateway/session-row-event-trees.test.tssrc/gateway/session-row-event.test-support.tssrc/gateway/session-row-placement-projection.lifecycle.test.tssrc/gateway/session-row-prepared-read.test.tss808: files and historical coverage
src/gateway/session-history-worker-runtime.test.tssrc/gateway/session-history-worker.integration.test.tssrc/gateway/session-history.subagent-visibility.test.tssrc/gateway/session-lifecycle-state.recovery.test.tss817: files and historical coverage
src/gateway/sessions-history-http.model-policy.test.tssrc/gateway/sessions-patch.operator-model-policy.test.tssrc/gateway/stale-install.test.tssrc/gateway/test-helpers.listener.test.tss815: files and historical coverage
src/gateway/session-subagent-resume.test.tssrc/gateway/session-utils-row.materialize.test.tss816: files and historical coverage
src/gateway/session-utils.agent-models.test.tssrc/gateway/session-utils.filters.test.tssrc/gateway/session-utils.fs.preview.test.tssrc/gateway/session-utils.metadata-perf.test.tssrc/gateway/session-utils.navigation-lineage.test.tss806: files and historical coverage
src/gateway/session-cold-storage-maintenance.test.tssrc/gateway/session-companion-runtime.test.tssrc/gateway/session-create-collision.benchmark.test.tss812: files and historical coverage
src/gateway/session-row-projection.foreground.test.tssrc/gateway/session-row-projection.incognito.test.tssrc/gateway/session-row-projection.invalidation.test.tssrc/gateway/session-row-projection.membership.test.tssrc/gateway/session-row-projection.prepared-read.test.tss813: files and historical coverage
src/gateway/session-row-projection.subagent-index.test.tssrc/gateway/session-row-projection.test.tssrc/gateway/session-row-projection.topology.test.tssrc/gateway/session-row-projection.transcript-regression.test.tssrc/gateway/session-row-projection.worker-read.test.tssrc/gateway/session-row-selection.test.tss814: files and historical coverage
src/gateway/session-runtime-selection-projection.test.tssrc/gateway/session-sharing-preparation.test.tssrc/gateway/session-startup-orphan-races.test.tsAutoreview disposition
Autoreview completed with eight P2 test-gap findings, all rejected after current-source verification:
src/gateway/session-list.test-support.ts:80), so those rows could not establish the claimed authorization interaction. Foreign-draft authorization remains insrc/gateway/session-sharing.test.ts:717.src/gateway/server.sessions-send-resume.test.ts:197uses the real tool and checks the exact error, unchanged paused record, absent successor, and no input, receipts, execution, result, or announcement.:172exercises an unrelated visible controller before binding and verifies the rejection and absence of side effects.src/agents/main-session-recovery/main-session-recovery-run-ownership.test.ts:110covers old/current generations of the same run and both admitted-delivery and foreground ownership; only the stale marker is removed.src/config/runtime-snapshot.preparation.test.ts:139retains the full same-object/value/provenance matrix, andsrc/gateway/session-row-projection.invalidation.test.ts:711proves the resulting list refresh.src/gateway/session-row-projection.worker-read.test.ts:279preserves the replacement while an older worker reply is pending, including current-identity and snapshot assertions. Recovery owner coverage also remains.src/gateway/session-row-projection.worker-read.test.ts:862proves missing ownership, both backend publications, and unlock after lifecycle replacement at:903.coalesces disk reads and rejects an observation after its lifecycle registration retirescase insrc/gateway/stale-install.test.tsretires an actual in-flight observation and suppresses both retired and current callbacks. The retained resume/rollback tests protect suspension settlement.No accepted/actionable findings remain. The automated verdict itself was not clean; these are evidence-backed maintainer rejections of its limited-diff-context findings.