Skip to content

fix(memory): preserve publication restart integrity coverage - #189449

Merged
roboclaw-bot merged 1 commit into
mainfrom
flake/memory-publication-integrity
Oct 31, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
flake/memory-publication-integrity

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

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 prepare and exec for 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.

Mode Base failures/runs Final fix failures/runs
Node, file alone 20/20 0/20
Bun, original nine-file CI shard 1/1 0/20
Bun, file with four CPU load processes 1/1 0/20

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.ts and CI group changed-extensions-config-88 from run 41200856654. Each fixed replay passed all 59 runnable shard tests; its 18 existing opt-in PostgreSQL cases remained skipped.

  • The seven-test file also passes via pnpm test <file> --maxWorkers=1: 41.87 s cold wall time, including compiled subprocess preparation. CI execution seconds are pending.
  • Existing seal-less Doctor coverage passes on Node and Bun: two selected cases per runtime.
  • Targeted typecheck of both changed files, lint, format, and git diff --check pass. The typecheck also exposed and verified an inherited SQLite fixture type mismatch, now fixed with the existing engine guard.
  • Codex autoreview at P0–P2 reviewed 2d5703f93ee06f45320039323eb6c5ab8733bf15..6ece973156c6c0c11ebd0694f13d7a96b983b784: scoped-clean, no findings.

Original failures: 41200856654, 41202537803.

@clawsweeper

clawsweeper Bot commented Oct 31, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 31, 2026 14:21
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The test watches parent-process SQL and misses the FULL scan performed by the integrity child.
  • After: The test requires a new completed FULL-verification receipt while retaining schema admission and FTS availability.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, source-supported test repair with reported repeated harness validation; this review did not execute tests or independently inspect the blocked original job logs.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-associated test-only PR reports Node/Bun failing-base and passing-head production-owner harness runs; it changes no shipped behavior requiring a separate product demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Broken restart coverage obscures whether memory publication retains schema admission without bypassing required integrity verification.
Reason: Restores meaningful coverage of an existing contract without changing product policy, adding production seams, or weakening required verification.

Regression provenance

Possible 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
Reviewed head: 6ece973156c6c0c11ebd0694f13d7a96b983b784

Before merge

None.

Findings

None.

Agent review details

How this fits together

Memory 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]
Loading

Technical review

Best 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

  • Memory publication restart fixture and SQL observer keeps the original intent (05848c1: Prove published memory schema receipts survive clean restart while required integrity checks still occur.)
  • Missing-seal expectation keeps the original intent (fix(doctor): avoid repeated agent database integrity scans #189247: Missing proof alone permits bounded admission with FULL verification still owed; malformed proof retains a required foreground gate.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 04681a3 adds extensions/memory-core/src/memory/manager-publication-admission.test.ts:245 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 04681a3efcb1; files: extensions/memory-core/src/memory/manager-publication-admission.test.ts)

PR surface

Tests 0. Total 0 across 2 files. Added test files: 0.

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

Labels

Label changes:

  • add P2: Repairs a broken memory restart regression test without changing runtime behavior.
  • 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:

  • P2: Repairs a broken memory restart regression test without changing runtime behavior.
  • 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 31, 2026, 10:36 AM ET / 14:36 UTC.

@roboclaw-bot
roboclaw-bot merged commit 09530a1 into main Oct 31, 2026
193 checks passed
@roboclaw-bot
roboclaw-bot deleted the flake/memory-publication-integrity branch October 31, 2026 14:55
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-core Extension: memory-core P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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