You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[vulcan] minigraf_bug: MiniGrafDb::drop() writes to the graph file uncond #226
Description: MiniGrafDb::drop() writes to the graph file unconditionally, even for read-only handles — corrupting any other open instance of the same file.
Reproduction: open DB handle A, register rules, write several datoms, checkpoint. Then in a subprocess, open handle B to the same file, do a read-only query, let B go out of scope (del fires). Back in the parent process, handle A can no longer write — raises either "Serde Deserialization Error" or "Page N out of bounds (total pages: N)".
Evidence: the graph file's mtime and size both change after the read-only subprocess exits (size grew by 4 KB in testing), confirming Drop writes to the file even when no user-visible mutations occurred.
Impact: any architecture where two processes open the same graph file (e.g. a persistent MCP server + a per-turn hook subprocess) will have the persistent process's write handle silently broken after the hook exits. Data written before the hook opened the file is preserved, but no further writes from the first handle succeed.
Expected: Drop on a read-only (no-write) handle should not modify the file, or at minimum should not invalidate other open handles to the same file.
Workaround applied in mcp_server.py: track graph file mtime; reopen + re-register session rules whenever an external modification is detected before the next write.
Error:
Serde Deserialization Error / Page N out of bounds (total pages: N)
Activity
fix: skip checkpoint on Drop when handle made no writes (issue #226) (#…
docs: add design spec for Drop read-only handle bug fix (issue #226)
docs: add implementation plan for Drop read-only handle fix (issue #226)