Civic services directory

A local prototype for an editor to publish a service catalog and a resident to find services by district and category. The canister keeps one Store root and a private directory owner. The same generated IC Wire interface drives the Minima FrozenSortedMap and Nyxus Map builds. Both use the ordered key (district, category, service_id) and the same bounded name and contact record. The Minima owner retains the arena root and frozen map descriptor in Nyxus, with one transient provider for stable memory.

Installed results

The first Minima build published one revision from 256 entries provided in reverse order. The generated client read 180 matching listings over eight pages, verified point lookups and neighboring filters, and handled a last ID of u32::MAX. It rejected a non-controller editor, a truncated Wire request, duplicate keys, a 50-byte UTF-8 name, and a batch of 257 rows. The maximum fixture request was 16,643 bytes. A 24-row page with a continuation was 1,577 bytes. Reads and rejected republication preserved the stable image byte for byte.

The follow-up changed publish to require the editor's expected revision and replace the complete snapshot. Each cursor identifies its filter, revision and last ID. A stale snapshot request or cursor returns a typed refusal. The owner builds the replacement before swapping it into the write scope, then retires the old Minima descriptor with FrozenSortedMap::retire. This trial stayed in prototype mode and clean-installed both follow-up artifacts.

Both follow-up builds accepted the same three 256-row publications and matched the independent host fixture for all 180 results in eight pages per revision, including point reads and the removed listing. Both rejected the prior revision's cursor and a duplicate batch against the live revision. The 1,577-byte full-page reply and 16,644-byte request stayed within the configured 2 KiB and 24 KiB Wire caps. The generated descriptor and client were byte-identical across the two final builds.

Backend Stable image bytes after publications 1, 2 and 3
Minima 131,072 / 196,608 / 196,608
Nyxus 0 / 0 / 0

Each populated Minima snapshot needs one 64 KiB payload block. The first replacement requires a second payload block while the earlier map is live. The third publication reuses the retired block without growing stable memory. The Nyxus control stores the same logical entries in retained heap. The test compared completed work and readback. It did not measure complete instructions, heap use, or latency by engine.

Authoring and skill feedback

  • Quickstart supplied the exact root, service, owner and endpoint shape. The first native metadata build failed with root memory module must be public when the root attribute annotated mod memory;. Using pub mod memory; fixed the diagnostic while the enclosing root stayed private.
  • The Minima benchmark supplied single-provider format and reopen wiring and the retained descriptor. Its Option<NyxusBox<FrozenSortedMap<...>>> pattern produced a duplicate core::ptr::drop_glue symbol for FrozenSortedMap<(u16, u16, u32), (u8, [u8; 48], u32)> in the pinned native release build. Keeping the tuple payload and storing the map descriptor directly still produced the duplicate symbol. A named fixed_record! value with #[repr(C)], NyxusData, and a FixedBytes<48> field passed native metadata and the prepared wasm64 build. The trial identified a working representation and left the compiler failure's cause open.
  • The direct descriptor also simplified the app's empty state. FrozenSortedMap::from_sorted with an empty input needs no payload block. Each loaded map can then use the same explicit build, swap and retire path. The owner records the UTF-8 length separately because FixedText<N> requires exactly N encoded bytes.
  • The creation skill arrived during initial authoring. Its Quickstart and Wire routes matched the code used. Direct links to the Minima root and fixed-record recipe would shorten discovery of the first provider and domain record. TypeScript client shape also mattered in the oracle. Options use {some: value}, enum variants use {tag, value}, and decoded records have null prototypes. The runner normalizes these DTOs to plain JSON before comparing their exact fields.

Quickstart · Minima root · Minima fixed records · Generated client runner

Inputs and reproduction

Unified commit 3909f1346a7d993ce1e56310e4844d0ae5dfdb84, SDK Git tree 693b4c89854bbdd94b365b7a4d92c468763bab36, Rust nightly-2026-10-15 commit 7df81381d027710708209f36b98d11b1c88f8d2e, and PocketIC 16.1.0 executable SHA-256 6a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6. The common 1,589-file SDK closure digest is 672eabf5232fa7f8796fde7569605ddaaf8e5ee9181117c4a6a5147fee66a7cd. The 10-file day-one and 11-file day-two app closure digests are e87e3d789e46c29850d458f8573f82f94758bc4a52cedf4bebb0ef9db132b544 and e8ea1d82aa3a977952c023b6c56d7501bf04b0b577d96f38a6af0fcf8427040c. Digest inputs are records ordered by relative path as <sha256> <bytes> <relative path>\n.

Canonical wasm64 build SHA-256 Verified input and output paths
Initial Minima publication da37a95151245af22eb9d956fee971c725529b4ac74559757268b80fca8eb04f 1,619
Follow-up Minima 82a561f4ef0c5efe06123703a8aa11074c86f4f20f549c94011ebf7089f91ffa 1,620
Follow-up nyxus-control 50e5302d95a897547fe11b02235b9dbda158dbc550553c691f530af41de999de 1,620

Copying the seeded registry took nine seconds. The initial successful canonical build took 36.45 seconds after three failed native builds. The follow-up builds took 23.93 and 25.14 seconds with a warm private target. The local installed checks took 3.49 seconds initially and 7.26 seconds for the combined backends. These elapsed times describe this run and include shared machine conditions.

The app and check.mjs stay in ignored playground/xx11/. The following commands replay the final two-backend checks from the repository root. Point the app's local dependencies at the selected SDK source and seed the private registry from its lockfiles before running the offline build. Standalone build

lane="$PWD/tmp/ai-app-trials-wave-2/xx11"
snapshot="$PWD/tmp/ai-app-trials-wave-2/source"
app="$PWD/playground/xx11/Cargo.toml"
export CARGO_HOME="$lane/cargo-home" CARGO_TARGET_DIR="$lane/target" TMPDIR="$lane/temp"
export CARGO_BUILD_JOBS=4 CARGO_INCREMENTAL=0
source "$snapshot/tools/env.sh"
out="$(mktemp -d "$lane/replay.XXXXXX")"
for backend in minima nyxus; do
  features=()
  if [[ "$backend" == nyxus ]]; then
    features=(--features nyxus-control)
  fi
  python3 "$snapshot/cdk-rsx/tools/build-app.py" --manifest-path "$app" \
    --out-dir "$out/$backend" --name directory --offline --locked "${features[@]}"
done
RRT_PIC_STATE_DIR="$lane/pic-state" \
  env -u RRT_PIC_SERVER_URL -u LD_LIBRARY_PATH -u LD_PRELOAD \
  node "$PWD/playground/xx11/check.mjs" day2 "$out/result.json" \
    "$out/minima/directory" "$out/nyxus/directory"