Mova0.6 pre-release

sitegraph

A family site's content as a dependency graph: a change remakes only the nodes whose stamp moved and the nodes above them. No dependencies, so any site (Mova, Research, Dictionary …) can use it by path. The model is in src/*.rs.groupant.md and models/sitegraph.groupant.md.

How it works

Run

cargo test --release -p sitegraph. First user: research.elamur.ai, site depgraph plan|apply|check|parity|origins (~/Research/tools/site/src/depgraph.rs).

Limits

Dependencies are declared, not discovered; a File input sees a change by size and time only; outputs a node no longer makes are not removed; no scheduler, watcher or server.

How a site declares its node kinds

A site owns its node kinds; the crate never reads a site's data. Four steps, as research.elamur.ai (~/Research/tools/site/src/depgraph.rs), Mova's units (peta/tools/papers/src/site_onfly.rs) and the dictionary's index (dict_onfly.rs) do it.

  1. Name the kinds by a prefix of the id (kind:<key>): src:<route> for a file someone else writes, row:<paper> for a value many pages show, tpl:<name> for a template, citedby:<route> for a page you make. Frozen::census and the reports count nodes by that prefix.
  2. Give every node its own inputs, and an edge for everything else it reads.
    • a file: Input::File(path) (size and time; Input::Content when a rewrite with the same bytes must not move it);
    • a value you computed from your data: Input::Value(key, version), the version being a hash of exactly what the page shows (a list's members, a count) β€” a page then moves only when what it shows moves;
    • another node: .dep(Edge::Reads | Cites | Lists | Template | Code, id);
    • the code that makes the node: its code string (a hash of the Rust sources that make it, or a version). A value node that summarises its dependencies (a paper's row from its page) sets cutoff = true: a touch that leaves the value equal stops there.
  3. Make the targets. Either a Builder (return the outputs; read through Ctx β€” cx.node(id), cx.read(key) β€” so an undeclared read is refused) with a Publisher (FileTree for files served in place, StampStore for a folder per stamp), or your own maker for the dirty set plan gives (a site's existing batch steps), recording State::record for what it made. Keep the state file beside your other state; a failed node keeps its old output.
  4. Check. build::verify on a sample (remade in memory, compared with what is published: a stale page on a clean node is a missing edge) and two runs from empty states compared byte for byte.

Pages of one list, paged: give every page its own node (its file, cutoff) under the list's node, so a twin or an index above a page moves only when that page's bytes do. A count that every page shows (Research's Β«of the N whose bibliographies we readΒ») is one value node with an edge from each page: correct, but it moves them all β€” keep such values coarse or show them in one place.

This page in Markdown https://md.mova.elamur.ai/free/en/docs/tools/sitegraph/