Skip to content

Exercise reference memory through SQL and live context - #73

Merged
aryanorastar merged 2 commits into
mainfrom
test/memory-sql-rehearsal
Oct 23, 2026
Merged

aryanorastar merged 2 commits into
mainfrom
test/memory-sql-rehearsal

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Customer failure being prevented

Before a memory pilot, separate passing storage and context-reader tests do not prove that saved SQL pointers actually reach only the right customer's live posts. A disconnected reader, stale context or forgetting that does nothing could escape that coverage.

Test-only change

  • Add one synthetic rehearsal to the existing guarded local/Postgres CI verifier. It composes the production SQL memory adapter, service and live-context reader; no production modules, schema, prompts, dependencies or settings change.
  • Eight scenario groups cover two-post scope/role boundaries, uncached edits, reader recreation, changed-owner rejection, deleted-message/outcome invalidation, context-off reads, capture-off forum erasure, durable opt-out/expiry and text-free rows before erasure.
  • Fake post/message objects make no Discord or provider calls. The verifier's existing local test-database restriction remains; PGlite is only a serialized local alternative, not concurrency proof.
  • Document the distinction between this rehearsal and enabled generated answers, a full bot restart, the live pilot and remaining privacy/data-use gates.

Evidence

  • Local full suite 839/839, offline 8/8, isolated SQL verifier including all eight rehearsal groups pass.
  • A separate private, in-memory sensitivity run passes the real baseline and rejects five deliberate faults: disconnected reader, missing requester-owner guard, cached live reads, stale deleted outcome, and successful-but-no-op forgetting. Runtime repository files are not modified by those probes. This is test sensitivity, not five observed production bugs or runtime repairs.
  • Hosted Node 20/24/Postgres pass at exact head c2953f27e7f3afc48b1ed5f6be5e00f823153e86 (run 39546418506). The database job's log confirms all eight SQL/live-reader rehearsal groups ran against its real PostgreSQL 16 service, not PGlite.
  • October 23 fresh local verification on macOS, Node v26.7.0: full suite 839/839, offline 8/8, and all eight SQL/reader scenario groups pass again. The real baseline passes; five independent in-memory faults are all rejected. No repository runtime file is mutated, external service called or production database touched. Local PGlite 0.5.10 remains serialized; hosted PostgreSQL supplies the separate real-server integration evidence.
  • One user-authorized independent review inspected the exact head, test assertions, isolation guards and hosted execution log. No actionable findings. The SQL adapter → memory service → live-context reader harness is the appropriate running-environment end-to-end check for this test-only change. This is an independent code/evidence review, not a fabricated human GitHub approval.

Reproduce safely

On an installed checkout of this head: npm test, EVAL_NO_MODEL=1 node scripts/customer-eval.js, then node scripts/verify-support-db.js with the verifier's dedicated local test database, or node scripts/verify-support-db.js --pglite /absolute/path/to/@electric-sql/pglite. The database guard rejects non-test targets. Expected: 839 tests, eight offline checks, the verifier's existing SQL checks and the eight named joined-reader groups pass. Never use production credentials or a production database. The separate sensitivity probe is private verification tooling, not a dependency of this PR.

Release boundary

The affected test-only flow is verified and independently reviewed; ready for maintainer review, not merged or deployed. Memory/context/fix-inbox remain off. C1–C4, enabled generated answers, full bot restart/pilot, processor/backup/security/notice approval and actual memory enablement remain separate open gates. No new paid comparison or protected input read. Existing comparison holds and earlier release decisions are unchanged. Canonical current product/release status remains in documentation PR #69; this branch is based on main and its older release checkpoints are historical. No delivery-score increase.

@aryanorastar
aryanorastar marked this pull request as ready for review October 23, 2026 09:03
@aryanorastar
aryanorastar marked this pull request as draft October 23, 2026 12:49
@aryanorastar
aryanorastar marked this pull request as ready for review October 23, 2026 12:57
@aryanorastar
aryanorastar merged commit c61920d into main Oct 23, 2026
3 checks passed
@aryanorastar
aryanorastar deleted the test/memory-sql-rehearsal branch October 23, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant