CultLib/packages/cultnet-ts/test/fixtures/idunn-runtime
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens c3add7dd1b Idunn runtime fixture generator takes its specification as input
The four hard-coded sets become flags, with @file response-file splicing.
A consumer keeps its own .args file instead of committing a patch against
the example. fixture.args carries CultLib own sets; the README documents
the flags. Committed fixture bytes are unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 04:30:40 +02:00
..
rudp-route cultnet-ts: regenerate Idunn runtime fixtures with the stateful lease-bound set 2026-09-29 03:10:55 +02:00
service cultnet-ts: regenerate Idunn runtime fixtures with the stateful lease-bound set 2026-09-29 03:10:55 +02:00
service-stateful cultnet-ts: regenerate Idunn runtime fixtures with the stateful lease-bound set 2026-09-29 03:10:55 +02:00
web cultnet-ts: regenerate Idunn runtime fixtures with the stateful lease-bound set 2026-09-29 03:10:55 +02:00
.gitattributes cultnet-rs fixture example: name an Odin port a dev machine does not run 2026-09-29 01:44:04 +02:00
fixture.args Idunn runtime fixture generator takes its specification as input 2026-09-29 04:30:40 +02:00
machine-id cultnet-rs fixture example: name an Odin port a dev machine does not run 2026-09-29 01:44:04 +02:00
README.md Idunn runtime fixture generator takes its specification as input 2026-09-29 04:30:40 +02:00

Idunn runtime fixtures

Written by the Rust owner, not by the TypeScript tests. Regenerate with packages/cultnet-rs/examples/idunn_runtime_fixture.rs (CultLib 9ba6ac4; it uses cultnet-rs only, and Idunn's IdunnRuntimeActivationLaunch is that same crate's). It needs Linux and a machine-id equal to the machine-id file here, because the provider identity is bound to it. On Yggdrasil:

DOCKER_ARGS='--cap-add SYS_ADMIN --security-opt apparmor=unconfined'     bash ygg-verify.sh <CultLib> HEAD rust 'cd packages/cultnet-rs &&       cp <fixed-machine-id> /tmp/mid && mount --bind /tmp/mid /etc/machine-id &&       cargo run -q --example idunn_runtime_fixture /tmp/out'

then copy /tmp/out over this directory. --cap-add SYS_ADMIN exists only so the bind mount can present the committed machine-id, which keeps Yggdrasil's real machine-id out of the repo. Every presence-*.bin was accepted by authenticate_runtime_presence_claim and correlated by correlate_runtime_presence_claim before being written; the below-minimum vector correlates to exactly expected-capability-000-capacity. Ed25519 is deterministic, so the TypeScript signer must reproduce them byte for byte.

service-stateful is the lease-bound shape (streampixels-service, state lineage set, write_lease_required: true). Rust issues lease.cc, which names the digest of its presence-warming.bin; presence-active.bin and presence-degraded.bin are sequence 2 and carry that lease's digest. lease-other-warming.cc names a different warming digest and lease-other-target.cc names another target; the TypeScript lease check must refuse both.

Generating a consumer's own set

The generator takes its specification as input, so a consumer needs no patch to CultLib. The specification is command-line flags; @<file> splices in a response file (one --flag value per line, # comments). CultLib's own sets are fixture.args here:

cargo run -q --example idunn_runtime_fixture /tmp/out @<path>/fixture.args

The consumer keeps its own .args file in its repository and runs the same command with the same machine-id bind mount as above. Global flags: --source-repository, --detail. Each --set <dir> opens a set written to <out>/<dir>, and the flags after it configure it: --target, --transport, --stable, --candidate (required); --capability (default <target>.api), --schema (default <capability>.v1), --health-contract (default <target>.runtime-health), --minimum-capacity (default 1), --stateful with --state-schema-generation and --lease-other-target, and repeatable --dependency kind=..,capability=..,schema=..,provider=..,endpoint=.. (optional compatibility, capacity, startup, authority, projection). The full grammar is the header of the example.

Every generation enrolls fresh keys, so regenerated bytes differ from the committed ones. The committed set stays; fixture.args regenerates the same file list, sizes and structure.