Repository navigation
test(sessions): avoid duplicate conformance executions - #182994
Conversation
Register five inherited-adapter scenarios once through the existing SQLite registrar. Preserve every assertion and both CRUD paths; reduce the suite from 42 to 37 cases without changing production behavior.
|
🦞👀 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 registers five shared SQLite conformance scenarios once while retaining both adapter-specific CRUD executions. Example: Run the session-accessor conformance suite.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it removes redundant executions without weakening distinct adapter coverage, and no actionable defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe conformance suite supplies isolated session and transcript fixtures to public and direct SQLite accessor adapters, then checks persisted results and emitted updates. flowchart TD
A[Conformance suite] --> B[Public adapter]
A --> C[SQLite adapter]
B --> D[Shared accessor methods]
C --> D
C --> E[Distinct list and update methods]
D --> F[SQLite fixtures and transcript events]
E --> F
Technical reviewBest possible solution: Use the existing SQLite-only registrar for identical scenarios and retain both executions wherever the adapters differ. Do we have a high-confidence way to reproduce the issue? Source inspection establishes duplicate execution through identical inherited functions and scope builders; no target code was executed. Is this the best way to solve the issue? The five registration substitutions are the smallest complete change and preserve the distinct CRUD paths without adding machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6c33f5ff5ee0. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests 0. Total 0 across 1 file. Added test files: 0. View PR surface stats
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 24, 2026, 7:08 PM ET / 23:08 UTC. |
## What Problem This Solves The session-accessor conformance matrix executes five SQLite scenarios twice through identical functions and fixture scopes. ## User Impact No production behavior changes. The suite executes 37 cases instead of 42 (-11.9%), preserving every assertion. Five registration lines change; no test declarations, source lines, production seams, SQL, schemas, or PostgreSQL conformance cases are deleted. ## Why This Change Was Made The direct SQLite adapter inherits every method from the public adapter except entry listing and entry updating. Keep the CRUD scenario on both adapters because it exercises those two distinct entry points. Register the five scenarios that use only inherited methods once through the existing SQLite-only registrar, as the rest of the suite already does. The bounded audit covered 24 complete test files and 201 expanded cases. It retained the other 196 cases, including worker settlement, cancellation, authority, cache invalidation and upgrade regressions. Five duplicate executions are below the requested batch target; there is no safe reason to delete distinct contracts to fill a quota. | Duplicate scenario | Retained proof | | --- | --- | | Exact persisted-key lookup | Same callback once: canonical lookup, exact miss and exact hit | | Lifecycle cleanup | Same callback once: age/segment filtering, retained history and archive content | | Raw event append/read | Same callback once, including sync and async reads | | Raw message rejection | Same callback once, retaining the message-write integrity boundary | | Message append/idempotency/publication | Same callback once: durable message, idempotency conflict and emitted update | ## Evidence Acceptance recorded before the first test or benchmark execution: run the complete conformance suite on baseline `bf7154cc71ebd502913559ca791c49405e4a580e` and candidate with the default pinned Bun runner and one worker. Primary result must be 42 passing baseline cases and 37 passing candidate cases; the five removed executions must retain their unchanged callbacks, and production must remain untouched. Require no new static findings. Timing is secondary: acquire the campaign timing lock, require host load below 24, keep cold and warm cohorts separate, alternate baseline/candidate with at least five samples per arm, and report wall-clock median/p95/range. Any >20% adverse cell stops a performance claim. If no qualified window appears after 60 minutes, report counts and unqualified observed durations without a speedup claim. Correctness runs do not require the timing lock. No application SQL saving is claimed or SQL harness pair needed for this test-registration change. Formatting, basic lint, type-aware core lint and diff whitespace checks pass. One isolated Codex preservation review found no accepted/actionable P0–P2 findings. The complete affected suite passed on both revisions: baseline 42/42 and candidate 37/37. Observed command durations were 310.026 s and 197.963 s, respectively. These are unqualified high-load observations: the baseline built worker bundles, and the candidate reused them; no wall-clock speedup, median/p95, or application SQL saving is claimed. Exact-head CI [40140586585](https://github.com/openclaw/openclaw/actions/runs/40140586585) completed with 20 successful jobs, 30 skipped jobs, and two failures: [PostgreSQL shard 2](https://github.com/openclaw/openclaw/actions/runs/40140586585/job/121011570679) and its aggregate gate. The seven setup failures are the independently reproduced missing synthetic runtime profile, fixed on main by openclaw#182990 (`36066dd233a4`). The equivalent repair in openclaw#182996 passed all eight PTY cases and all three PostgreSQL shards in CI 40140628966. This older-head, test-only patch does not touch that fixture; the scoped pre-existing-failure exception applies. Changed tests, selected types/lint, source contracts, architecture checks, baseline ratchets, and PostgreSQL shards 1 and 3 passed. Canonical Knip baseline/candidate comparisons completed with identical findings in all three graphs: production 70/70, full tree 84/84, scripts 1,136/1,136; zero new or resolved entries, no resolution errors or timeouts. Madge passed. Local `check:changed` passed its non-type guards, including worker/T1, dialect, mock-export, timeout, formatting, boundary, and deprecation checks. Its graph/type subchecks refused the required external virtual-store layout; no guard was changed, and the exact-head CI type/lint checks passed. The aggregate command's redundant second candidate export scan was stopped after the completed comparison. An earlier extra unused-file scan exceeded its unchanged 600-second limit and is not counted as a pass. The timing qualification window exceeded 60 minutes with no eligible samples (host load remained above 24). The counts-only fallback applies; the observed correctness-run durations above remain unqualified. No timeouts, resource budgets, snapshots, or expectations were relaxed. Open-PR conflict check at 2026-10-25T00:31:34.745541+00:00: 2,680 other open PRs targeting main, zero overlap with the edited file, zero new merge conflicts. No production, SQL, schema, SDK, or PostgreSQL identity change.
What Problem This Solves
The session-accessor conformance matrix executes five SQLite scenarios twice through identical functions and fixture scopes.
User Impact
No production behavior changes. The suite executes 37 cases instead of 42 (-11.9%), preserving every assertion. Five registration lines change; no test declarations, source lines, production seams, SQL, schemas, or PostgreSQL conformance cases are deleted.
Why This Change Was Made
The direct SQLite adapter inherits every method from the public adapter except entry listing and entry updating. Keep the CRUD scenario on both adapters because it exercises those two distinct entry points. Register the five scenarios that use only inherited methods once through the existing SQLite-only registrar, as the rest of the suite already does.
The bounded audit covered 24 complete test files and 201 expanded cases. It retained the other 196 cases, including worker settlement, cancellation, authority, cache invalidation and upgrade regressions. Five duplicate executions are below the requested batch target; there is no safe reason to delete distinct contracts to fill a quota.
Evidence
Acceptance recorded before the first test or benchmark execution: run the complete conformance suite on baseline
349369c020470a2184304c35f99ab3fc45f13726and candidate with the default pinned Bun runner and one worker. Primary result must be 42 passing baseline cases and 37 passing candidate cases; the five removed executions must retain their unchanged callbacks, and production must remain untouched. Require no new static findings.Timing is secondary: acquire the campaign timing lock, require host load below 24, keep cold and warm cohorts separate, alternate baseline/candidate with at least five samples per arm, and report wall-clock median/p95/range. Any >20% adverse cell stops a performance claim. If no qualified window appears after 60 minutes, report counts and unqualified observed durations without a speedup claim. Correctness runs do not require the timing lock. No application SQL saving is claimed or SQL harness pair needed for this test-registration change.
Formatting, basic lint, type-aware core lint and diff whitespace checks pass. One isolated Codex preservation review found no accepted/actionable P0–P2 findings. The complete affected suite passed on both revisions: baseline 42/42 and candidate 37/37. Observed command durations were 310.026 s and 197.963 s, respectively. These are unqualified high-load observations: the baseline built worker bundles, and the candidate reused them; no wall-clock speedup, median/p95, or application SQL saving is claimed.
Exact-head CI 40140586585 completed with 20 successful jobs, 30 skipped jobs, and two failures: PostgreSQL shard 2 and its aggregate gate. The seven setup failures are the independently reproduced missing synthetic runtime profile, fixed on main by #182990 (
27e87016a5e4). The equivalent repair in #182996 passed all eight PTY cases and all three PostgreSQL shards in CI 40140628966. This older-head, test-only patch does not touch that fixture; the scoped pre-existing-failure exception applies. Changed tests, selected types/lint, source contracts, architecture checks, baseline ratchets, and PostgreSQL shards 1 and 3 passed.Canonical Knip baseline/candidate comparisons completed with identical findings in all three graphs: production 70/70, full tree 84/84, scripts 1,136/1,136; zero new or resolved entries, no resolution errors or timeouts. Madge passed. Local
check:changedpassed its non-type guards, including worker/T1, dialect, mock-export, timeout, formatting, boundary, and deprecation checks. Its graph/type subchecks refused the required external virtual-store layout; no guard was changed, and the exact-head CI type/lint checks passed. The aggregate command's redundant second candidate export scan was stopped after the completed comparison. An earlier extra unused-file scan exceeded its unchanged 600-second limit and is not counted as a pass.The timing qualification window exceeded 60 minutes with no eligible samples (host load remained above 24). The counts-only fallback applies; the observed correctness-run durations above remain unqualified. No timeouts, resource budgets, snapshots, or expectations were relaxed.
Open-PR conflict check at 2026-10-25T00:31:34.745541+00:00: 2,680 other open PRs targeting main, zero overlap with the edited file, zero new merge conflicts. No production, SQL, schema, SDK, or PostgreSQL identity change.