Land the Postgres dev cluster recipe Jan provisioned on delandtj-home
(rootless podman + pgvector/pgvector:pg18, PG 18.4, pgvector 0.8.2) and
align all live ADR 0002 / Phase 2 sub-plan references from pg16 to pg18.
- docs/plans/local-dev-postgres-setup.md -- rewritten end-to-end:
podman container vestige-pg with --restart=always, named volume
vestige-pgdata, PGDATA=/var/lib/postgresql/data/pgdata, port mapping
127.0.0.1:5432:5432, two-password split (superuser + app role),
pgvector preinstalled, CREATE EXTENSION vector handled at setup,
day-to-day commands, password rotation, dev-grade backup/restore,
teardown, boot-persistence notes for rootless podman. Old native
Arch install recipe moved to Out-of-scope (covered by image now).
- docs/adr/0002-phase-2-execution.md -- the open-thread mention of
pgvector/pgvector:pg16 in the Follow-ups section now reads pg18.
- docs/plans/0002c-migrations.md -- container example in the local
dev section updated to pg18.
- docs/plans/0002d-store-impl-bodies.md -- testcontainers GenericImage
tag pg16 -> pg18; prose reference updated.
- docs/plans/0002h-testing-and-benches.md -- harness pg18 across
testcontainers Postgres builder, image-caching prose, CI workflow
example.
The archival master plan (docs/plans/0002-phase-2-postgres-backend.md)
keeps its original pg16 references intentionally; the supersession
notice already points readers to the live sub-plans.
Nine Phase 2 sub-plans operationalising ADR 0002 against the Phase 2
master plan, each sized to fit a focused implementation session and
handed to Claude Code as a /goal brief without requiring the agent to
load the master plan.
Order of execution (each depends on the previous unless noted):
- 0002a-skeleton-and-feature-gate.md -- postgres-backend Cargo feature
+ PgMemoryStore skeleton with todo!() bodies. D1+D2.
- 0002b-pool-and-config.md -- PgPool builder, VestigeConfig/
PostgresConfig, vestige.toml loader wired into vestige-mcp. D3+D7
(master plan numbering).
- 0002c-migrations.md -- sqlx migrations 0001_init/0002_hnsw including
D7 (users/groups/memberships, owner/visibility/shared_with_groups)
and D8 (codebase column). SQLite V15 parity migration. D4.
- 0002d-store-impl-bodies.md -- real CRUD + registry bodies; trivial
fts_search/vector_search bodies. D2+D6.
- 0002e-hybrid-search.md -- one-statement RRF query. D5.
- 0002f-migrate-cli.md -- vestige migrate copy (SQLite -> Postgres),
--dry-run, idempotent re-runs, --allow-source-upgrade for pre-V15
sources. D8+D10.
- 0002g-reembed.md -- vestige migrate reembed (offline rebuild).
D9 + D10 reembed arm. Ships resolve_embedder helper as a workaround
for the missing Embedder::from_name(&str) constructor.
- 0002h-testing-and-benches.md -- testcontainers harness, six
integration test files, Criterion bench at 1k/100k. D14+D15.
- 0002i-runbook.md -- operator-facing deployment + day-2 runbook. D16.
Supersession notice added to the master plan (0002-phase-2-postgres-
backend.md) pointing at ADR 0002; body retained as archival reference.
PR B carries this commit plus the previous two (ADR 0002 + Phase 1
amendment sub-plans); no code change.
Three sub-plans operationalising ADR 0002 D1 + D3 on the existing
feat/storage-trait-phase1 branch (790c0c8, not yet pushed upstream):
- 0001a-trait-rewrite.md -- rewrite MemoryStore with
#[trait_variant::make(MemoryStore: Send)] generating a non-Send
LocalMemoryStore companion. Production callers use Arc<Storage> and are
unaffected; only the trait declaration and SQLite impl block change.
- 0001b-sqlite-split.md -- pure code motion. Split sqlite.rs (8713 lines)
into a sqlite/ directory (mod, crud, search, scheduling, graph, domain,
registry, portable_sync, trait_impl). Public re-exports unchanged; tests
green commit-by-commit. Depends on 0001a so trait_impl.rs picks up the
trait_variant attribute once.
- 0001c-async-trait-sunset.md -- rewrite Embedder the same way, then
remove async-trait = "0.1" from crates/vestige-core/Cargo.toml. End
state: zero async_trait references in the workspace.
Together these three lands as PR A.