Skip to content

I1005 — The graph is a generated artifact with a schema and no unsafe field

Serialise the graph as a deterministic generated artifact with a schema, carrying safe metadata only, produced by the generation the repository already runs.

DONE wave 2 · p0 · implementation profile · parallel safe

Part of capability-graph — One capability graph, two projections, and no second inventory of what this repository can do.

Objective

Serialise the graph as a deterministic generated artifact with a schema, carrying safe metadata only, produced by the generation the repository already runs.

Why

Both projections and every test need one file to read. Making it generated keeps it honest; giving it a schema makes it consumable; keeping it free of anything private makes it publishable.

Current state

No aggregate artifact exists. The site reads several derived datasets, each from its own script.

Desired state

One generated artifact carries the graph, with a schema, deterministic ordering, provenance and no field that must not be published.

Scope

  • apps/majordomus-cli/src/generate.rs

Out of scope

  • A hand-edited copy of the artifact
  • Any token, key, header, environment dump or machine-absolute path in the output
  • A timestamp inside the canonical data

Dependencies

What waits on this

Acceptance criteria

  • The artifact is produced by the existing generation target set, not by a separate script
  • It has a schema, and the schema is generated from the types rather than written by hand
  • Ordering is deterministic and repeated generation is byte-identical over identical inputs
  • It contains no credential, no private environment value and no machine-absolute path, proved by a test
  • Provenance is recorded in the artifact's own metadata where its format cannot carry a comment

Validation

  • majordomus generate --check
  • cargo test --workspace --all-features

Evidence required

  • artifact_generated
  • schema_present
  • safe_metadata

Evidence

coverstypecommandresultat commit
artifact_generatedtestmajordomus generate && majordomus generate --checkdocs/generated/graph.json and docs/generated/graph.schema.json are written by the existing target set and the check reports in sync; the artifact is 1,104,403 bytes pretty-printed (821,696 compact) over 901 nodes, 2,100 edges and 25 node kinds, and regeneration is byte-identical, asserted by tests/generate_check.rs674b899
schema_presenttestcargo test --lib generate::tests::the_schema_of_the_graph_comes_from_the_types_that_define_itthe schema is generated from the Rust types through CanonicalSchema::of::<Graph>(), names the struct fields id, nodes, edges, node_kinds, edge_kinds and metadata, carries its provenance as a field because JSON has no comment, and is 7,407 bytes674b899
safe_metadatatestcargo test --lib generate::tests::a_published_artifact_is_refused_when_it_carries_a_machine_path_or_a_credentialgeneration refuses rather than writes when the rendered document carries a machine-absolute path, a PEM block, an authorization header or a token shape; each marker is proved to be caught, and a graph of repository-relative sources passes674b899

Risk

One artifact for everything grows until it is downloaded on every page load. Its size is measured and budgeted with the other assets.

Timeline

started
2026-09-06T17:35:38Z
verified
completed
2026-09-06T18:07:50Z

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I1005.yaml. Read it back with majordomus plan show I1005.