test(native): pin PR #194 spike — 79-migration walk as CI gate#204
Merged
Conversation
Walks every supabase/migrations/*.sql against an in-memory PGlite to lock in the PR #194 claim ("all 79 migrations green on PG 17.5 + pgvector 0.8.1") so a future migration that uses a Postgres-only feature PGlite can't honour breaks the build instead of breaking the native-app boot path silently. Four tests, complementary to pglite-adapter.test.ts (which pins the chain-shape contract): 1. migration-walk: every *.sql applies cleanly + outcomes preserve lexicographic order. 2. idempotency: a second applyMigrations() on the same handle marks every file skipped, applies none. 3. RPC smoke (scalar + vector params only): match_memories_cognitive, dedup_similar_memories, forget_weak_memories, consolidate_memories — proves the post-migration RPC surface resolves through the adapter on PGlite. 4. empty-array → jsonb cast contract: serializeValue() in pglite.ts deliberately routes empty arrays through `::jsonb`; pinned so a future "helpful" attempt to make empty-array TEXT[]/UUID[] calls work surfaces this assumption. Run locally: cd mcp-server && npm run build && \ node --test dist/__tests__/native/pglite-migration-walk.test.js All four pass on main (~16s, dominated by 4× full-corpus PGlite spin-up). Scoped intentionally narrow: UUID[]/TEXT[]-parameter RPCs (touch_memories, coactivate_memories, spread_activation, …) require the env-switch sub-task to also resolve the adapter's type-inference gap — out of scope here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
3 tasks
Dewinator
added a commit
that referenced
this pull request
May 4, 2026
The previous "0 PRs offen" snapshot is stale: the agent itself opened a 4-PR queue in the last 4 ticks (#208 standalone + #209→#210→#211 stack). Refresh the Aktiver-Code-Bestand block to credit landed sub-tasks (#202 DATA_DIR, #203 Tauri shell, #204 CI gate, #205 migration helpers) and add a Queue-Stand note that names the open stack, the linear merge constraint, and the ~19 still-supabase-direct services that the DbClient migration sub-story will work through atomically. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dewinator
added a commit
that referenced
this pull request
May 4, 2026
…sks 1/2/3-most/4/5/7-core landed The 09024a2 (tick 103) snapshot is two days stale: 9 of the 9 PRs in its "recommended merge order" have merged, plus #197/#198/#201/#202/#203/#204/ #205/#206/#207 landed in the same window. Refresh the doc that "is the canonical entry point for the native-app initiative" so a fresh reader does not get a 79-tick-old picture. Concrete changes: - Phase line: "spike phase complete · gated on PR-queue drain" → "implementation underway · sub-tasks 1, 2, 3 (most), 4, 5, 7 (core) landed; 5 PRs open, ~26 h Reed-lag since #202–#207". - End-state installer list: ".dmg / .msi / .AppImage" → ".pkg / .msi / .AppImage", with the 2026-05-04 epic-body decision (.pkg, not .dmg) cited. - Sub-task table: legend (✅ landed, 🔄 PR open, ⏳ spike-only) plus per-row PR status reflecting the current main: - Row 1 picks up #204 (79-migration walk as CI gate). - Row 3 picks up #202, #203, #206, #207 as landed and #208–#211 as open. Row was "_none yet_". - Row 4 / 5 reframed as "inherent" (PGlite is one WASM binary; node-llama-cpp ships per-platform bindings). - Row 7 picks up #205 (Docker → PGlite migration helpers core). - New "DbClient sub-story" subsection: 22 services touch Supabase directly on main; 2 in flight (Skills, SwarmPin); 20 remain after the open stack lands. Pattern: one service per PR. - "Recommended merge order — open PR queue (9 deep)" section replaced with "Open PR queue (5 deep, all CLEAN+MERGEABLE)" — the 9 it documented have all merged. - "Post-drain implementation gate" → "Post-stack implementation gate": parallel tracks (DbClient long-tail of 20 services + the sub-tasks 6/8/9 release-pipeline triangle on tauri-plugin-updater per #207). Doc-only, zero risk, direct-to-main per the standing rule for this file shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
supabase/migrations/*.sqlagainst an in-memory PGlite to pin PR docs(native-pg): re-validate spike — all 79 migrations green on PGlite (#177) #194's spike claim ("all 79 migrations green on PG 17.5 + pgvector 0.8.1") as a permanent CI gate.pglite-adapter.test.ts: that file pins the chain-shape contract; this one pins the migration corpus + runner contract (idempotency, ordering).main(~16s wallclock, dominated by 4× full-corpus PGlite spin-up).Why now
PR #194 documented "79/79 migrations green" as a finished spike on
main. Without a regression test, the next PR that uses a Postgres-only feature PGlite can't honour (e.g.pg_stat_*views,LISTEN/NOTIFY, certainCREATE EXTENSIONshapes) silently breaks the native-app boot path —npm run buildwould still pass while the Tauri shell would fail at first launch. This locks the claim into CI so the failure mode flips from "production-only" to "PR-time".What's tested
*.sqlapplies cleanly + outcomes preserve lexicographic order. The runner sorts before walking and the bookkeeping table relies on that order so a partial run can be resumed deterministically.applyMigrations()on the same PGlite handle marks every file skipped, applies none.match_memories_cognitive,dedup_similar_memories,forget_weak_memories,consolidate_memories— proves the post-migration RPC surface resolves throughPGliteAdapter.serializeValue()inpglite.tsdeliberately routes empty arrays through::jsonbbecauseTEXT[]vsJSONBambiguity for[]is unresolvable without column metadata. Pinned so a future "helpful" attempt to make empty-arrayTEXT[]/UUID[]calls work surfaces this assumption rather than silently changing semantics.Out of scope (deliberately)
UUID[]/TEXT[]-parameter RPCs (touch_memories,coactivate_memories,spread_activation, …). Those require the env-switch sub-task to also resolve the adapter's type-inference gap — see#184follow-up. The pinned empty-array test documents the workaround consumers already use (arr.length > 0guard).Test plan
cd mcp-server && npm run build && node --test dist/__tests__/native/pglite-migration-walk.test.js→ 4/4 pass on mainnpm test(which globsdist/__tests__/**/*.test.js) — new file is picked up automatically, no script change neededCloses nothing — this is a regression-test follow-up to PR #194 / #185, complementary to
pglite-adapter.test.ts. Atomic, depends only on what's already onmain, no dependency on PR #202 or #203.🤖 Generated with Claude Code