Repository navigation
fix(tests): restore session race coverage on Node 26 - #148182
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check could not safely complete for this revision. ClawSweeper will not retry this unchanged revision. Next step: No contributor action is requested. Maintainers should inspect the linked workflow run. |
|
Codex review: blocked before merge. Reviewed September 14, 2026, 6:55 AM ET / 10:55 UTC. ClawSweeper reviewWhat this changesUpdates two SQLite test fixtures to inject concurrent writes after native all() reads, restoring session race coverage on newer Node versions without changing production behavior or assertions. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this is a focused, still-needed repair to existing race coverage, with no introduced correctness findings. Current main lacks the hooks, and the protected maintainer context rules out automatic closure. Priority: P2 Review scores
Verification
How this fits togetherSession readers retrieve identities and transcripts from SQLite while other connections can update or archive them. These fixtures inject concurrent writes at the read boundary to verify snapshot consistency and fallback validation. flowchart TD
A[Session read request] --> B[SQLite query adapter]
B --> C[Native all or iterate read]
C --> D[Test fixture callback]
D --> E[Concurrent connection commits]
E --> F[Snapshot and fallback assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +21. Total +21 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep concurrent-write injection at the native statement boundary for both read paths while preserving the existing snapshot, fallback-validation, and event-order assertions. Do we have a high-confidence way to reproduce the issue? Yes, from source: Node 26.6+ selects all(), bypassing the original fixture hooks and their required concurrent commits. No tests were executed during this read-only review. Is this the best way to solve the issue? Yes. Extending the existing private hooks preserves real SQLite execution and existing assertions without introducing production seams or duplicating the shared counter's responsibility. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b25459bc3044. LabelsLabel changes:
Label justifications:
EvidenceWhat 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
|
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Session SQLite race fixtures miss concurrent writes when the reader uses native
all(), leaving existing assertions failing on Node 26.User Impact
No user-visible change. This restores archive, cold-read, and transcript fallback coverage without changing production code or assertions.
Why This Change Was Made
The existing fixture hooks now invoke their peer-write callback after a successful native
all()read, preserving native results, exceptions, snapshot lifetime, and callback ordering.Evidence
37f2b34992ffplus this exact patch: 41/41 on Node 24.19.0 and 41/41 on Node 26.8.2, with no filtering. The shared counter from merged improve(gateway): reduce publication receipt fetches #148144 is committed in that base. This satisfies the requested integration proof.Exact published-head CI passed. These hosted results and the current-main integration runs are separate evidence; native maintainer validation and landing gates still apply.