Skip to content
21 changes: 21 additions & 0 deletions changelog.d/transport-compose-cli.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Add the transport skeleton composer, its local-only build driver and
`tools/build_transport.py`. A country's `transport_graph.json` spec resource
declares the skeleton graph; each node binds only the spec resources it
selects, every rules node runs through the one `simulate.rules_by_ref@1`
router, and later packages append branches through a typed extension point
that cannot re-key the skeleton. The driver runs ancestor-closed checkpoints
on `<out>/.graph-store` and writes every output under `--out`; it refuses an
existing store tree that contains a link, which could redirect store writes.
Activation checks every selected resource and reference set and every null
scenario knob before donor preparation. Calibration ancestry refuses hold-out
selections and sources, benefit-unit engine references, and graph digests.
Selected resource lists remain literal data. The driver writes deterministic
HDF5 container bytes while readback continues to hash the complete file.
CREATE inventories are cached by implementation, parameters and source bytes;
a cold build runs CREATE twice, and a warm inventory does not run the probe.
Cold `--resume require` builds refuse before preparation. Local spec directories
are protected from output overlap, node ids must be safe filenames, and
extensions receive independent spec copies.
Extensions can declare new sources and pre-export checkpoints, and use
`transport_rules_node` to obtain a binding's engine reference and period.
The locality property is parametrized over every selected resource.
9 changes: 9 additions & 0 deletions changelog.d/transport-rules-registry.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Add explicit transport registry preparation with pinned Axiom bindings, one
multi-engine rules kernel, shared calibration and terminal kernels, and the
transport gate bindings. Engines use the persons-households-benefit-units
schema and nesting that the benefit-unit rule declares (the schema CREATE
builds). Engine-free adapters can exercise registry dispatch without
installing a country engine. Module hashes and tree digests bind the actual
RuleSpec bytes. Engine commit and wheel SHA-256 pins, and the RuleSpec commit
for exported trees, are format-checked caller declarations; installed engine
provenance is not checked.
29 changes: 29 additions & 0 deletions docs/agent-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,35 @@ Update this guide in the same PR whenever the workspace layout, test
commands, or release flow change. If you find it contradicting the repo,
trust the repo and fix this file.

The transport build driver (`tools/build_transport.py`, a shim over
`microcosm.build.transport.cli`) composes a country's graph from its
`transport_graph.json` spec resource and runs it locally: every file it
writes, including its `.graph-store`, lies under `--out`, and it has no
upload or staging path. Before it opens the store it refuses any link in an
existing store tree (the root, `objects`, `tmp` or a shard), because the
store creates those directories by following links; it does not guard
against links planted while a build is running. It refuses before reading any graph source while the
country spec still has unresolved evidence: every selected resource/reference
set and every null scenario knob is checked before donor preparation.
Tests for it run on the engine-free toy package in
`test_support/microcosm_build/transport_composed.py`. The rules registry checks
module hashes and binds the RuleSpec tree digest. Engine commit and wheel
SHA-256 pins, and the RuleSpec commit for exported trees, are format-checked
caller declarations; installed engine provenance is not checked.
Fresh driver runs write identical HDF5 bytes with object timestamps disabled;
readback keys continue to include the complete container bytes. CREATE's column
inventory is cached by implementation, parameters and source bytes. A cold
build runs CREATE twice (inventory probe and graph execution); warm inventory
lookups hash the inputs without running the probe. Cold `--resume require`
refuses before preparation. Output directories must also be disjoint from a
local `--spec-dir`.
G7 extensions can wrap a factory in `TransportExtension` to declare additional
sources and ordered checkpoints. Source names must be new; skeleton predecessor
sets must stay identical. Checkpoints run after calibration and before export,
and must not depend on the exported dataset. `transport_rules_node` supplies
the prepared engine reference and period from the binding, so extensions do
not repeat period values.

UK size experiments use `microcosm-build-uk --release-role dense --dataset-households`
(`tools/build_uk_full.py`; `tools/build_uk_rowwise_candidate.py` is a stub over it)
with the same pool inputs as the dense candidate. The flag changes exported
Expand Down
Loading
Loading