8000 enhancement: raw log writer for building a fresh graph from explicit (tx, asserted, valid-time) records · Issue #431 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

enhancement: raw log writer for building a fresh graph from explicit (tx, asserted, valid-time) records #431

Closed

Description

@adityamukho

Motivation

The load half of project-minigraf/temporal_reasoning#378: after streaming and transforming facts out of a read-only source, a migration must wr 8000 ite them into a new graph file 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:

pub struct LogWriter { ... }
impl LogWriter {
    pub fn create(path, opts: OpenOptions) -> Result<Self>;
    pub fn append(&mut self, rec: &FactRecord) -> Result<()>;   // explicit tx, asserted, valid_from/valid_to
    pub fn copy_pages(&mut self, src: &Minigraf, range: PageRange) -> Result<()>; // fast path for untouched ranges, if the format permits
    pub fn finish(self) -> Result<()>;   // builds indexes, writes header (format version, last_checkpointed_tx_count), checkpoints
}

With the read-only open and the fact-log iterator this completes the extract, transform, load triple; purge is then "do not append".

Activity

  1. added this to the v3.0.0 milestone on Oct 1, 2026
  2. added
    rustPull requests that update rust code
    migrationMigration related issue
    on Oct 1, 2026
  3. added a commit that references this issue on Oct 7, 2026
  4. adityamukho commented on Oct 7, 2026

    @adityamukho
    CollaboratorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmigrationMigration related issuerustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0