Repository navigation
fix(memory): preserve publication restart integrity coverage - #189449
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. What this changesThis PR updates memory restart tests to observe completed integrity verification across child processes and exercise malformed seals. Example: Reopen agent.sqlite after publishing memory/reindexed.md with an invalid clean-close seal.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this is a focused repair of restart coverage after the integrity-owner change, with no concrete introduced defect found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherMemory publication replaces search tables in the agent database; restart admission consumes clean-close seals or completed integrity receipts before reusing the published schema. flowchart LR
A[Memory publication] --> B[Agent SQLite database]
B --> C[Clean close seal]
C --> D[Fresh process admission]
D --> E[Integrity child when required]
E --> F[Completed verification receipt]
D --> G[Memory schema and FTS reuse]
Technical reviewBest possible solution: Retain the existing restart test and use the integrity owner's completed receipt to distinguish seal reuse from required FULL verification. Do we have a high-confidence way to reproduce the issue? Source establishes both mismatches: missing seals may defer verification, and required scans execute outside the process observed by the old test; no tests were run during this read-only review. Is this the best way to solve the issue? The patch is a small complete repair using existing owners: change the fixture to require verification, consume its completed receipt, and retain connection-local observation of both DDL execution paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a1fc294abb0e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests 0. Total 0 across 2 files. 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 31, 2026, 10:36 AM ET / 14:36 UTC. |
|
Merged via squash.
|
Related: #189247
What Problem This Solves
Fixes: memory publication restart checks fail after seal-less admission began deferring verification and required integrity scans moved to a child process.
User Impact
No runtime behavior changes. The restart test continues to require completed FULL verification when policy demands it, retained schema admission, and working FTS.
Why This Change Was Made
A malformed seal exercises the required foreground FULL gate; a missing seal intentionally permits bounded admission under #189247. The child compares the owner's completed FULL-verification receipt with the previous seal's timestamp, so verification performed outside the reopening process is observable. It continues to observe both
prepareandexecfor DDL, and explicitly requires a SQLite connection.The change removes the global SQLite constructor replacement. Production delta: zero. Test delta: +33/-33 lines, with no baseline or allocation changes.
Evidence
Reproduced on unchanged main
2d5703f93ee06f45320039323eb6c5ab8733bf15. Both original failing CI heads include #189247; #188294 does not touch this test or its admission owner. Changing only the seal fixture still fails with the old parent-process SQL observer.Proof ran serially in an isolated Linux Podman container capped at 4 CPUs and 8 GiB, using Node 24.22.1 and the repository-pinned Bun fork. The shard used
vitest.extension-database-workers.config.tsand CI groupchanged-extensions-config-88from run 41200856654. Each fixed replay passed all 59 runnable shard tests; its 18 existing opt-in PostgreSQL cases remained skipped.pnpm test <file> --maxWorkers=1: 41.87 s cold wall time, including compiled subprocess preparation. CI execution seconds are pending.git diff --checkpass. The typecheck also exposed and verified an inherited SQLite fixture type mismatch, now fixed with the existing engine guard.2d5703f93ee06f45320039323eb6c5ab8733bf15..6ece973156c6c0c11ebd0694f13d7a96b983b784:scoped-clean, no findings.Original failures: 41200856654, 41202537803.