enhancement: raw log writer for building a fresh graph from explicit (tx, asserted, valid-time) records · Issue #431 · project-minigraf/minigraf · GitHub
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
enhancement: raw log writer for building a fresh graph from explicit (tx, asserted, valid-time) records #431
The load half of project-minigraf/temporal_reasoning#378: after streaming and transforming facts out of a read-only source, a migration must write them into a new graph file
8000
with their original transaction numbers, assertion flags and valid-time windows intact. The public transact/retract path cannot do this: it assigns the next tx, stamps valid_from with now, and applies schema validation meant for live writes.
Proposal
A write-side API that produces a normal, openable graph file:
pubstructLogWriter{ ... }implLogWriter{pubfncreate(path,opts:OpenOptions) -> Result<Self>;pubfnappend(&mutself,rec:&FactRecord) -> Result<()>;// explicit tx, asserted, valid_from/valid_topubfncopy_pages(&mutself,src:&Minigraf,range:PageRange) -> Result<()>;// fast path for untouched ranges, if the format permitspubfnfinish(self) -> Result<()>;// builds indexes, writes header (format version, last_checkpointed_tx_count), checkpoints}
tx values must be non-decreasing across append; gaps are allowed (a purged transaction leaves a hole) so :as-of N stays stable for untouched facts. Whether a hole is represented as an empty transaction or simply absent is the implementer's call, but :as-of on a hole must resolve to the preceding state.
No schema validation beyond structural integrity; the caller owns semantics (a migration verifies afterwards with the audit).
Done. Core: LogWriter (create/append/advance_tx_count/finish) in #466, built at <path>.partial and renamed by finish, holes keep :as-of, new STG-043/API-015/API-016. Bindings: every binding via #467. copy_pages was not provided, since v8 pages share one dictionary and are not self-contained (see CHANGELOG and docs/superpowers/specs/2026-10-07-log-writer-design.md). With #429 and #430 this completes extract–transform–load for temporal_reasoning#378. Ships in v3.0.0.
Activity
Merge pull request #466 from project-minigraf/feat/431-log-writer
adityamukho commentedon Oct 7, 2026
Done. Core:
LogWriter(create/append/advance_tx_count/finish) in #466, built at<path>.partialand renamed byfinish, holes keep:as-of, new STG-043/API-015/API-016. Bindings: every binding via #467.copy_pageswas not provided, since v8 pages share one dictionary and are not self-contained (see CHANGELOG anddocs/superpowers/specs/2026-10-07-log-writer-design.md). With #429 and #430 this completes extract–transform–load for temporal_reasoning#378. Ships in v3.0.0.fix(log_writer): keep the write rules in every built file (#477)