Skip to content

Release A: ww-mcp removal (GIT-97), disk vector cache (GIT-98), venue driver (GIT-83) - #35

Merged
nTEG-dev merged 10 commits into
mainfrom
release/A
Sep 21, 2026
Merged

nTEG-dev merged 10 commits into
mainfrom
release/A

Conversation

@nTEG-dev

Copy link
Copy Markdown
Member

Release A: prepared for release. Chris merges, bumps the version and publishes (GIT-94). This PR sets no version; the draft CHANGELOG entry is under [Unreleased].

Linear: https://linear.app/nteg-labs/issue/GIT-97 · https://linear.app/nteg-labs/issue/GIT-98 · GIT-83

Contents (merged in order, --no-ff, no conflicts)

  1. fix: reach Supabase over PostgREST only — remove the ww-mcp edge function dependency (GIT-97) #30: GIT-97, reach Supabase over PostgREST only (ww-mcp removed), 6ee7e9d
  2. fix: cache the embedding index on disk so a cold process start costs bytes, not megabytes (GIT-98) #31: GIT-98, on-disk embedding index cache, 3214426
  3. test: blank-Supabase venue driver with an expected-failures gate (GIT-83) #34: GIT-83, blank-Supabase venue driver, d6a5ca0
  4. 28366f6: driver gate changes:
    • The GIT-97 ww-mcp entry is removed from EXPECTED_FAILURES, so a ww-mcp 404 now fails the gate.
    • The driver now also fails on any /functions/v1/ request, whatever its status, and on a thread-count mismatch between session_start and list_threads.
  5. 9282ca7: draft CHANGELOG entry

#30 and #31 both edit supabase-client.ts, and it auto-merged. The result has no callMcp, getMcpUrl or functions/v1 references, and it keeps getLearningsFingerprint and getSupabaseUrl.

Gates: all pass on release/A

Gate Result
npx tsc --noEmit -p . ✅ no errors
npm run test:unit with an isolated HOME (GIT-92) ✅ 76 files / 1234 tests passed. The temp HOME only gained an .npm directory.
Venue driver flow on gitmem-e2e (vujndhcumgroztfkkdus) ✅ exit 0. /functions/v1/ requests: 0. session_start thread count 3 = list_threads 3. MCP HTTP error: 404 and Failed to load last session both absent from stderr. health: 0 failures.
Venue driver egress, 250 learnings ✅ exit 0. Start 1 (cold): 921,750 B. Start 2: 100 B (disk-cache hit, 3 requests).

Expected failures still seen, all allowlisted with tickets:

  • GIT-84: scar_usage 404
  • GIT-106: scar_enforcement_variants 400
  • GIT-105: knowledge_triples 400
  • GIT-73: gitmem_query_metrics 409, intermittent

Venue note: gitmem-e2e currently has GIT-84's setup.sql applied, from #33's re-apply check. It has the same tables as main's setup.sql; the only differences are the refresh function's IS DISTINCT FROM guard and two DROP POLICY IF EXISTS lines. main's setup.sql itself can't be re-applied over an existing schema; that's the bug #33 fixes.

Before publishing: checks for the person releasing

  • Rebuild dist from clean. npm pack --dry-run in this working tree includes 4 stale build outputs whose source was deleted long ago: dist/commands/license.{js,d.ts} and dist/tools/create-linear-issue.{js,d.ts}. tsc never deletes old output. Run rm -rf dist && npm run build before npm publish.
  • npm ci, then re-run the unit suite. Local node_modules is stale: vitest 1.6.1 is installed, while package.json and package-lock.json pin 4.0.18. There are also extraneous packages such as onnxruntime-web. The unit gate above ran on 1.6.1.
  • Pack contents (otherwise clean): 252 files, 384 KB packed / 1.8 MB unpacked. Top-level entries: dist/ (228), hooks/ (11), bin/ (3), schema/ (setup.sql, starter-scars.json), README, CHANGELOG, LICENSE, package.json and 4 agent templates. Not included: tests, the e2e driver and its netlog preload, any .env, anything from the scratchpad, *.tgz, and the untracked drafts.

Critical Dependabot alerts (4)

# Package Where Ships to customers?
185 next <15.5.24 (RCE in the image-optimization API with AVIF) apps/docs No. It's the docs site's own runtime, not part of the npm package. The docs deployment should move to ≥15.5.24.
184 next <15.5.24 (RCE on Windows-hosted servers) apps/docs No. Same as above; docs site only.
96 vitest 4.0.x (Vitest UI server file read/exec) root, devDependency No. Dev-only; bump to ≥4.1.0.
53 protobufjs <7.5.5 root, transitive via @testcontainers/postgresql → dockerode → grpc No. Dev-only. Locally it also appears under an extraneous onnxruntime-web, which isn't in package.json or the lockfile and doesn't ship.

The runtime dependencies are only @modelcontextprotocol/sdk, uuid and zod, and none of them has a critical alert.

Not in this release (known)

  • confirm_scars relevance and scar usage are still not recorded on customer stores. The write targets the unprefixed scar_usage table, which is fixed in fix: route the usage table through getTableName and make setup.sql re-applicable (GIT-84) #33 (GIT-84) and not included here. The CHANGELOG says so under Known issues, and it deliberately does not claim the relevance feedback is now kept.
  • gitmem_query_metrics.memories_applied, written by updateRelevanceData, doesn't exist in setup.sql. This is schema drift, found while checking the claim above. It needs a ticket.

No merge, no version bump, no publish.

🤖 Generated with Claude Code

claude and others added 10 commits September 20, 2026 19:35
…tion dependency (GIT-97)

listRecords/getRecord/upsertRecord routed through /functions/v1/ww-mcp, an edge
function that exists on nTEG's Supabase project and is not shipped with the
package. On a customer-owned project every such read returned 404.

- listRecords/getRecord now use PostgREST directly; upsertRecord delegates to
  directUpsert (it had no remaining callers). callMcp/getMcpUrl deleted.
- Equality filters always emit an explicit operator, so a value containing '.'
  (a title, a version) is treated as data.
- session_start loads session history and threads with Promise.allSettled, so
  a failed history read no longer discards a successful thread read and drops
  the panel to the local threads.json.
- Transport tests pin reads to /rest/v1 and fail if an edge function returns.
…bytes, not megabytes (GIT-98)

In local search mode every server process downloaded every learning with its
1536-dim embedding at startup and discarded it at exit. Short-lived processes
(sub-agents, fan-outs, CI) paid full price each time; a customer exhausted a
Supabase egress allowance this way.

- getLearningsFingerprint(): one request, one row (Prefer: count=exact) gives
  row count + newest updated_at for ~60 bytes.
- vector-disk-cache: rows persisted under that fingerprint, keyed by a hash of
  (store URL, table). Any mismatch, corruption or unknown fingerprint is a miss
  and falls back to the download. Atomic temp+rename writes, mode 0600.
- Misses are single-flighted across processes with an O_EXCL lock: one leader
  downloads, followers wait (async, bounded) and read its cache.
- cache-flush bypasses the disk cache and rewrites it.
- Opt out with GITMEM_VECTOR_DISK_CACHE=0.
…-83)

Drives the built MCP server over stdio against a Supabase project that has
schema/setup.sql and nothing else: no edge functions, which is what every
customer project looks like. Pro tier, with an isolated HOME and GITMEM_DIR
per run.

- flow: session_start -> list_threads -> recall -> confirm_scars (with
  relevance) -> create_thread -> list_threads -> session_close -> health.
  Seeds scars, a prior session and remote threads, plus a local threads.json
  that deliberately differs from the remote table.
- egress: bytes received on cold and warm starts and around two
  session_starts (GIT-98). --usage N seeds scar usage so
  refresh_scar_behavioral_scores() has work to do.
- blank-supabase-netlog.mjs is preloaded into the server and logs every fetch
  (method, path, status, body bytes). No request bodies or headers are logged.
- Gate: exits 1 on any 4xx/5xx from /rest/v1/ or /functions/v1/ that is not
  on EXPECTED_FAILURES. Each entry names the ticket that removes it: GIT-73,
  GIT-105, GIT-106, GIT-84, GIT-97.
- Credentials come only from a VENUE_ENV file outside the repo. Config
  problems exit 2 with a plain message. Production (cjptxyezuxdiinufgrrm), or
  any URL that is not https://<VENUE_REF>.supabase.co, is refused before any
  request.
- Embeddings come from a local fake Ollama endpoint, so no embedding API key
  is needed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…matching thread counts (GIT-97)

PR #30 removes the ww-mcp dependency, so its expected-failure entry comes out
and any ww-mcp 404 fails the run. The driver also fails on:
- any request to /functions/v1/, whatever its status
- a session_start thread count that differs from list_threads in flow mode

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Unversioned: the version is chosen at release (GIT-94).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
tsc never deletes output whose source was removed, so a publish from a
long-lived working tree shipped stale compiled files. The last pack included
dist/commands/license.* and dist/tools/create-linear-issue.*, whose source is
long gone. prepublishOnly now runs `rm -rf dist && tsc`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Release A: ww-mcp removal (GIT-97) and the on-disk embedding index cache
(GIT-98). No schema change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@nTEG-dev

Copy link
Copy Markdown
Member Author

Final prep: c14048e (v1.9.0)

The two "before publishing" items in the description are done:

  • npm ci: plain npm ci fails with ERESOLVE. The dev dependency @anthropic-ai/claude-agent-sdk@0.2.38 peer-requires zod ^4, but the root pins zod ^3.22.0. I used npm ci --legacy-peer-deps, the same command CI's test and publish jobs run (ci.yml:28, :71). vitest is now 4.0.18, matching the lockfile. The lockfile is unchanged, and zod is still 3.25.76.
  • Re-gated on vitest 4.0.18: tsc passes, and the unit suite with an isolated HOME gives 76 files / 1234 tests, identical to the 1.6.1 run.
  • prepublishOnly is now rm -rf dist && tsc (8a1fa12). After a clean rebuild, npm pack --dry-run lists 248 files, down from 252. The only removals are the 4 stale files, dist/commands/license.* and dist/tools/create-linear-issue.*. Nothing was added.
  • Version 1.9.0 (c14048e): set in package.json and package-lock.json, and the CHANGELOG [1.9.0] - 2026-09-20 heading is in place, with an empty [Unreleased] above it. No git tag has been created; that's left for the release.
  • Venue driver on c14048e (gitmem-e2e):
    • flow: exit 0. 0 /functions/v1/ requests, threads 3 = 3, health 0 failures.
    • egress: exit 0. Start 1 received 921,700 B, start 2 received 100 B.

Not changed: server.json (the MCP registry manifest) is still at 1.2.1. Past bumps haven't updated it either; update it if the registry listing should track npm.

Not merged and not published.

@nTEG-dev
nTEG-dev marked this pull request as ready for review September 21, 2026 04:04
@nTEG-dev
nTEG-dev merged commit 26ca5d7 into main Sep 21, 2026
4 checks passed
@nTEG-dev
nTEG-dev deleted the release/A branch September 23, 2026 05:49
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.

2 participants