Repository navigation
Phase 1: synthetic vault data - #2
Conversation
PR Summary by QodoPhase 1: Add synthetic vault dataset with sealed SQLite accessors
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes implement the described vault boundary with deterministic seeding and tests; review notes are limited to minor maintainability/performance refinements.
Pull request overview
Adds a synthetic “vault” support-ticket dataset backed by an in-memory node:sqlite database, with a strict schema and deterministic seeding, and locks the intended safety boundary via tests (narrow query-only module surface; no exported raw-row access or parameterized probes on sensitive columns).
Changes:
- Introduces a STRICT SQLite schema plus typed per-column sensitivity labeling.
- Implements deterministic seeded row generation including a single canary row and one below-k small-cell group.
- Adds a closure-encapsulated SQLite database wrapper that exposes only scalar queries, with tests that enforce the module surface and invariants.
File summaries
| File | Description |
|---|---|
| src/vault/vault.test.ts | Adds tests for schema labeling/DDL, deterministic seeding, and locked-down database/module exports. |
| src/vault/seed.ts | Implements deterministic synthetic ticket row generation, including canary and small-cell fixtures. |
| src/vault/schema.ts | Defines column sensitivity labels and the STRICT tickets table DDL. |
| src/vault/database.ts | Adds openVaultDatabase() that seeds the dataset and exposes only scalar queries (row count, canary presence, group size). |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Both Qodo findings addressed in 7a31ce4: 1. Unclosed prepared statements — fixed the valid part, declining the rest with reason. The per-call 2. Mutable sensitivity exports — fixed, and extended. |
There was a problem hiding this comment.
🔵 Needs a closer look
The changes define the security enforcement boundary that all later phases depend on, so final sign-off should come from a human reviewer despite no blocking issues being found.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The change establishes the security enforcement boundary that all later phases build on, so despite being clean and well-tested it warrants final human sign-off.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Balanced
What
Synthetic support-ticket dataset behind an internal storage module: STRICT SQLite schema with typed column-sensitivity labels, a deterministic 62-row seed (fixed-seed PRNG) containing one canary row and one below-threshold small-cell group (APAC/2026-W33, k=2), and a closure-encapsulated
node:sqlitedatabase whose only exports are narrow scalar queries.Why
Phase 1 of the build plan: the vault is the enforcement boundary everything later builds on. Two invariants are locked by tests here: no raw-row accessor is exported from the storage module (module-surface test), and no exported query accepts a caller-chosen probe against a sensitive column — a parameterized substring/equality check would be a boolean oracle that leaks row contents bit by bit, so canary presence is checked by a parameterless
hasCanaryRow().Boundary notes for later phases:
seed.jsis itself a raw-row source and must never be imported by the agent-facing tool layer (onlyopenVaultDatabase);groupSizeexists for suppression logic and tests.Evidence