Repository navigation
refactor(tests): prune duplicate state-read capture cases - #182936
Conversation
The read transport now snapshots and charges commands through generic structural owners. Keep representative nested, array, prepared and queued captures while removing 17 command-name variants. All lifecycle and authority cases remain; production code is unchanged.
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR removes redundant command-specific capture tests while retaining representative structural capture and byte-accounting cases. Example: An ACP metadata batch contains keys ["principal-根🦞", "second-principal"] that change after submission.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed test cleanup preserves distinct capture and lifecycle coverage, with no introduced defect found; the required CI gate remains red. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherState-read callers pass commands into a transport that captures their inputs, accounts for queued bytes, and dispatches reads through the worker pool. flowchart LR
A[State read caller] --> B[Read operation owner]
B --> C[Transport deep capture]
C --> D[Structural byte accounting]
D --> E[Worker pool]
E --> F[Read result and cleanup]
Technical reviewBest possible solution: Retain this focused consolidation and settle the required CI failure before landing. Do we have a high-confidence way to reproduce the issue? No product bug is claimed; source inspection confirms that the removed command variants exercise generic capture and accounting owners. Is this the best way to solve the issue? The patch is a small, coherent cleanup: retain distinct structural and lifecycle failures in the existing suites and remove duplicate command-name variants. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8c6ad0edc3c9. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
PR surfaceTests -215. Total -215 across 2 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 24, 2026, 6:16 PM ET / 22:16 UTC. |
Consolidate command-name variants after state-read snapshotting and byte accounting moved to generic owners. Retain nested Unicode, arrays, numeric/boolean fields, prepared and queued mutation, and ACP batch coverage. Remove 17 redundant cases and 215 net test lines across two suites. No production behavior changes. Focused baseline and candidate suites pass; static diagnostics add no findings. The unrelated PostgreSQL interactive-setup fixture failure in CI run 40135535259 is inherited from openclaw#182856 and attributed by the campaign coordinator; the separate repair owner is handling it.
What Problem This Solves
The state-read transport tests repeat command-by-command snapshot and byte-accounting scenarios after those operations moved to generic structural owners in #169379 and #169754.
User Impact
No production behavior changes. This removes 17 redundant cases from two test files (41 → 24, −41.5%) and 215 net test lines (1,104 → 889).
Why This Change Was Made
Keep four representative capture cases for nested Unicode fields, arrays, booleans/numbers, prepared/queued mutation, and ACP batches. Remove command-name variants that exercise the same generic structured clone and byte walker. All lifecycle, authority, storage, migration, and PostgreSQL proof remains. There are no production changes or new seams.
The owner audit covered 36 test files and 340 expanded cases, including a final bounded session/transcript pass. This batch is smaller than the 30–150 target: the remaining worker tests protect distinct failures and were retained rather than used to fill a quota.
Removed rows and surviving proof
All removed rows exercise the same generic command snapshot and byte-charge owner; their mocked replies do not test domain reads.
Evidence
Acceptance rule recorded before the first run: run the two changed suites on pinned base
a31e54a90d6and candidate; count 41 → 24 expanded cases with zero lost distinct contracts and all retained tests passing. No new static findings. Warm timing requires the campaign lock, load <24, at least five interleaved samples per revision; cold runs stay separate. Report median/p95/range; a >20% regression stops acceptance. If the host stays busy for 60 minutes, report counts and test outcomes with no wall-time claim.Codex review found no accepted/actionable P0–P2 findings. Formatting, type-aware core lint and diff whitespace checks pass. The initial default lint command attempted plugin declarations and refused the external virtual store; the supported core configuration passed without that unrelated preparation. Focused baseline: 41/41 cases pass; candidate: 24/24 pass. Exact-head CI run 40135535259 passed changed tests, types, lint, source contracts, architecture and baseline ratchets. PostgreSQL shards 1 and 3 passed; shard 2 failed seven unrelated interactive-setup cases because its synthetic runtime omitted standalone-runtime-profile.mjs. The maintainer has attributed this to the main-branch fixture regression introduced by #182856 (4a38dbd): createSourceRuntime omits the newly required root file. The failing test and fixture helper are untouched by this PR; their blobs match the CI main parent. The coordinator has authorized inherited-failure landing while the separate repair is in progress. Exact failure: run 40135535259, job 120996441483; the aggregate ci-gate is red for the same failure. Every other executed CI job passed. This lane does not claim a separate main execution. Local baseline/candidate dead-code comparisons are identical: 48 dependency, 63 unused-file, and 1,233 export finding lines, zero new findings. Refreshed census covers 2,691 other open main-target PRs with zero overlapping files, so no merge-tree comparison is applicable. No SQL harness is needed for this test-only change.
Timing fallback: after more than 60 minutes waiting (21:41:48–22:41:52 UTC on 2026-10-24), host load remained above the required <24 threshold and no qualified samples were collected. Correctness-only Vitest durations were 101.41 seconds baseline and 24.96 seconds candidate, but these runs had different cache state and heavy host contention; they are not an A/B result. Acceptance uses counts and passing retained contracts. No speedup, median/p95, or CPU saving is claimed.