Skip to content

test(sessions): avoid duplicate conformance executions - #182994

Merged
steipete merged 1 commit into
mainfrom
dbasync/testprune-core
Oct 25, 2026
Merged

steipete merged 1 commit into
mainfrom
dbasync/testprune-core

Conversation

@steipete

@steipete steipete commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

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 349369c020470a2184304c35f99ab3fc45f13726 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 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: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.

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.
@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T22:56:55.026510Z b3e1df1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR registers five shared SQLite conformance scenarios once while retaining both adapter-specific CRUD executions.

Example: Run the session-accessor conformance suite.

  • Before: The exact-key lookup scenario runs twice using identical functions and scope builders.
  • After: That scenario runs once with its assertions unchanged.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A correct, minimal test cleanup supported by source equivalence and passing relevant CI; the planned baseline/candidate execution transcript was not available for inspection.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only change alters registration counts without changing shipped behavior; source inspection verifies retained callbacks, and exact-head changed-test CI passed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Contributors execute redundant SQLite scenarios during conformance testing.
Reason: The maintainer-authored direction is supported by verified method equivalence and the earlier merged deduplication approach.

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
Reviewed head: b3e1df1e76054ab91967092305f3b809d86a5925

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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
Loading

Technical review

Best 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

  • Shared session and transcript conformance scenarios keeps the original intent (0a8e360: The SQLite storage flip established conformance coverage for canonical session metadata and transcript storage.)
  • SQLite-only test registration keeps the original intent (83fa01a: Remove repeated SQLite executions while preserving genuinely distinct adapter contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 83fa01a adds src/config/sessions/session-accessor.conformance.test.ts:206 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 83fa01a57e84; files: src/config/sessions/session-accessor.conformance.test.ts)

PR surface

Tests 0. Total 0 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 5 5 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 5 5 0

Labels

Label changes:

  • add P3: This is a focused test-registration cleanup with no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused test-registration cleanup with no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 24, 2026, 7:08 PM ET / 23:08 UTC.

@steipete
steipete merged commit 5f6dd13 into main Oct 25, 2026
123 of 126 checks passed
@steipete
steipete deleted the dbasync/testprune-core branch October 25, 2026 00:32
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant