Skip to content

runtime: build_runtime_graph labels stale node data with the current files' source_revision #59

Closed

Description

@Deicyde

Problem

build_runtime_graph(graph, ...) copies node content from an already parsed Graph, but rereads article bytes from disk to compute source_revision.

If an article changes between load_graph and projection, the result pairs stale node data with the new bytes' revision. A fresh load then produces the same source_revision with different node content, so the revision no longer identifies the snapshot it labels.

The parsed Node already carries source_sha256; projection never compares it with the reread bytes. This predates #15 and affects direct or cached Graph consumers even though in-repository callers usually load and project back to back.

Acceptance criteria

  • Reject projection when reread article bytes do not match node.source_sha256.
  • Define the contract for hand-built nodes without a source digest.
  • Add a regression that edits an article between load_graph and build_runtime_graph and proves no runtime graph is emitted.

PR #28 improves Lean-source snapshots but does not currently add this roadmap-node digest check.

Activity

  1. added
    has PRAn open pull request addresses this issue
    on Oct 13, 2026
  2. removed
    has PRAn open pull request addresses this issue
    on Oct 14, 2026
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions