Repository navigation
fix: bounded write-path check with an UNVERIFIED verdict; self-describing close WARNs (GIT-102) - #41
Merged
2 commits merged intoSep 22, 2026
Merged
2 commits merged into
2 commits merged into
Conversation
…elf-describing close WARNs (GIT-102) - checkWritePathWithTimeout() races the startup probe against 10 s. A store that never answers gives "timed out after 10 s, durability UNVERIFIED" instead of silence; a late answer replaces it, marked late. server.ts uses it on both startup paths. - The last verdict is exposed through health (write_path, and a first line "Write path: ..."). It was visible only on stderr, and not at all on a hang. - A probe that errored with anything but a missing table was ignored, so a store refusing every connection logged "Write-path OK". It is now "unreachable", durability UNVERIFIED. - session_close's "WARN N write failures" becomes one line per failing subsystem: name, failure count, cause (its latest error), and a mandatory "session content stored OK / NOT stored" clause, from whether the session row actually landed. +14 tests; the unreachable and timeout cases fail on origin/main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…h verdict in health (GIT-102)
Exits 1 on 1.10.0 ("WARN 1 write failure"; health without a verdict).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
neoneye
pushed a commit
to agent-memory-atlas-archive/gitmem-dev--gitmem
that referenced
this pull request
Sep 22, 2026
Conflicts: - session-close.ts: gitmem-dev#40 and gitmem-dev#41 add the same sessionRowStored flag; one declaration kept (one assignment after the upsert), comment covers both uses. - blank-supabase.mjs: all result fields and all checks kept. tsc clean; no new returns to type.
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.
What
The startup write-path check can no longer go quiet,
healthshows its verdict, andsession_close's WARN says what failed and whether the session was saved (GIT-102).checkWritePathWithTimeout()races the startup probe against 10 s. A store that never answers gives the verdicttimed out after 10 s, durability UNVERIFIEDand a loud stderr warning. If the probe answers later, its real verdict replaces that one, markedlate.server.tsuses it on both startup paths (with and without a license key).healthexposes the last verdict: awrite_pathfield, plus a first line such asWrite path: Supabase — … writes are durable (ok, checked …, 327 ms)orWrite path: timed out after 10 s, durability UNVERIFIED (NOT OK, …). Before any verdict exists it saysnot checked yet.WARN 1 write failurebecomes one line per failing subsystem:session content stored OKorsession content NOT stored, taken from whether the session row actually landed, not from overall close success.Found along the way (fixed here, same class)
A probe that failed fast with a network or auth error was deliberately ignored ("out of scope"), so a store refusing every connection logged
Write-path OK. The timeout only catches hangs. That case is now its own verdict:unreachable,store unreachable (<error>), durability UNVERIFIED. Countingskipped, there are now six modes:timed_outis the fifth outcome the ticket asked for, andunreachableis the extra one.How to test
Venue (v1.8.0
setup.sql,vujndhcumgroztfkkdus; production not touched):flownow requires every close WARN to match<subsystem>: N of M writes failed — <cause> · session content (stored OK|NOT stored), andhealthto carry aWrite path:line. The GIT-105 triple 400 provides a real write failure to describe.origin/main1.10.0WARN 1 write failurehealthWrite path: Supabase — learnings/decisions tables present, writes are durable (ok, …, 327 ms)A store that hangs (local probe, not the venue: a TCP listener that accepts and never answers, used as
SUPABASE_URL;healthcalled at 11.5 s):origin/mainhealthline 1No tracked effects this session.Write path: timed out after 10 s, durability UNVERIFIED (NOT OK, checked …, 10018 ms)⚠️ [gitmem] WRITE PATH: timed out after 10 s, durability UNVERIFIED.Unit tests: 1288/1288 pass (+14):
healthline formats;checkWritePathverdicts: ok, missing tables, connection refused →unreachable, auth failure →unreachable. Bothunreachablecases fail onmain, where they reportsupabase, ok;stored OK/NOT storedon every line, unknown subsystem, no failures → no WARN.No existing test encoded the old behaviour.
Checklist
npm run test:unitpasses (1288)healthoutputBreaking changes
None.
healthgains a first line and awrite_pathfield; close WARN text changes.🤖 Generated with Claude Code