omnigraph/crates
aaltshuler aabb3dca2e fix(storage): flush before acking in local write_text_if_absent
tokio's async File buffers writes internally: write_all only fills the
buffer, and the actual OS write happens in a background task after drop —
so write_text_if_absent could return Ok(true) with the file created but
still EMPTY, and an immediate reader saw EOF. Caught twice in CI as
'EOF while parsing a value' reading state.json right after cluster import
(the cluster's first state-write routes here since the storage port);
also an invariant-6 violation (acknowledged before the write reached the
OS). The other local write paths use tokio::fs::write, which flushes
internally — this was the one miss.

Fix: flush().await before Ok, with the same remove-on-failure cleanup as
the write itself. Regression test is a best-effort tight loop (the window
is timing-dependent; the two CI failures are the recorded red) asserting
read-after-ack never sees a short file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 13:44:51 +03:00
..
omnigraph fix(storage): flush before acking in local write_text_if_absent 2026-06-12 13:44:51 +03:00
omnigraph-cli feat(config): OMNIGRAPH_NO_LEGACY_CONFIG strict mode (RFC-008 stage 4) 2026-06-12 00:03:10 +03:00
omnigraph-cluster test(cluster,server): gated object-storage cluster e2e + CI wiring + docs 2026-06-11 15:56:40 +03:00
omnigraph-compiler release: v0.6.2 2026-06-09 15:59:59 +02:00
omnigraph-policy feat(policy): from-source twins for the policy loaders 2026-06-11 05:09:45 +03:00
omnigraph-server feat(config): OMNIGRAPH_NO_LEGACY_CONFIG strict mode (RFC-008 stage 4) 2026-06-12 00:03:10 +03:00