Build iteration investigation — 21 October 2026

Read-only investigation against main 289b355b and the frozen Hylix round-one worktrees. No builds, target mutations or product changes were made. Runtime performance qualification remains the current priority.

Later round-two screening exposed two sparse-checkout launch failures before compilation: Cargo metadata passed, but the canonical wrapper and then its shared helpers were absent. The original attempts are preserved in rrt/tmp/hylix-round2-20261021/single-search-preflight-repair.json. Materialize the builder, imported helpers and harness, then exercise the CLI entry point before freezing a candidate; dependency resolution alone cannot check them.

The immediate problem is repeated full native and Wasm compilation, aggravated by changing local package paths between worktrees. Current evidence does not identify const evaluation as the dominant compiler phase. Improve cache reuse and measure native rlib-only emission before redesigning ABI generation.

Recorded costs

The successful cache-path build receipt records 128.784 s. Its canonical SDK receipt records 124.684 s; the port wrapper subsequently builds the verifier.

Serial Cargo invocation Recorded elapsed
Native cdk-rsx-wasm preparation tool 10.45 s
Native Fourcans library 57.12 s
Wasm Fourcans library 55.67 s
Native typed block verifier 3.55 s

These invocations account for 126.79 s. The log contains no cache-lock wait or long-const-evaluation warning. The first invocation rebuilt Wire and the tool; the subsequent simd-workspace build finds the tool warm in 0.10 s. Increasing jobs cannot remove the sequential dependency/application portions.

Existing content-cache timestamps narrow the expensive units further. Subtracting fingerprint/invoked.timestamp mtime from the successful fingerprint JSON mtime gives these approximate compiler-unit brackets; they include compiler/link work and are not rustc phase profiles. Dependency units overlap.

Unit Native Wasm
Fourcans application 35.468 s 38.516 s
Takt 11.772 s 7.605 s
Reactor 10.217 s 9.161 s

For Fourcans the native interval is 04:54:36.278–04:55:11.746 UTC, and the Wasm interval is 04:55:29.082–04:56:07.598. Their fingerprint directories are x86_64-unknown-linux-gnu/release/build/rrts-fourcans-canister/076a3e3f89e5a9ec and wasm64-unknown-unknown/release/build/rrts-fourcans-canister/0fa1951de0f99ff7 beneath rrt/tmp/perf-round12/const-sha. Native output includes a 17,049,594-byte rlib and a 1,811,688-byte shared library. The descriptor driver uses the rlib.

An unchanged main Nyxus final build has native/Wasm Cargo phases of 0.23/0.31 s and a 2.002 s canonical receipt. This proves unchanged-artifact reuse works; it does not predict the time of a real Hylix edit. Debug-profile control compilation also rebuilt the Wasm standard library, so that result is not a warm release comparison.

Evidence: rrt/tmp/hylix-round1-20261021/cache-path-build.log, cache-path-build.receipt.json, cache-path-build/reactor_cell.build.json, and rrt/tmp/engine-naming-20261021/{nyxus-build-final,hylix-build-final}.log.

Low-risk tooling and experiment order

  1. Use two fixed physical build checkouts with explicit leases. Identical const-SHA Cargo.toml and src/lib.rs bytes produce distinct content-cache fingerprints in cache-path, simd-workspace and encoded-moves. The native fingerprints 39e008eb4c7d758f, 79109dee0783b06f, and f17388f35e2b2ad4 have identical compiler, target, profile, features, flags and configuration, but different JSON path values; their dep-info names the three checkouts. Wasm has the same path distinction. Content freshness prevents stale reuse; it does not make path identities interchangeable. Two persistent slots can alternate build/run work without rewriting a slot while Heavy16 still pins its source. Both slots need initial native and exact-profile Wasm warming. Keep checksum freshness/content fingerprints and one target owner. A changed Hylix policy still invalidates dependent libraries and the application, so the observed 113 s is not all recoverable cache overhead.

  2. Measure native rlib-only emission. native_interface() calls Cargo build on the application's declared ["cdylib", "rlib"] target although it only links an rlib into the temporary interface printer. The pinned Cargo supports cargo rustc --crate-type rlib. An isolated experiment can keep the original manifest, lockfile, features, target, release settings and build scripts while removing the unused native shared-library output. Keep the Wasm invocation unchanged, consume Cargo's reported artifact addresses, and compare freshly printed Wire JSON. It may remove link/LTO work; it will not avoid typechecking, const contracts or all rlib codegen. Do not replace it with debug settings or an interface-only feature contract.

  3. Pin the selected dependency closure, conservatively. source_snapshot() scans every local package in both complete metadata documents. The cache-path receipt pins 604 files / 4,319,767 bytes. Traversing the existing full resolved graph from application, preparation tool and block verifier leaves 131 files / 719,880 bytes in ten unrelated packages, including SDK canister READMEs. Start with all dependency kinds and target arms of that reachable graph, retaining full locked metadata resolution, selected-package files, workspace manifests/locks/configuration, builders and explicit source inputs. Include build-script inputs outside package roots; retain included READMEs. Apply the actual feature selections when resolving. This mainly prevents discarded work, rather than saving much hashing time. The first Nyxus log already shows a source-guard rejection after 51.26/50.73 s of native/Wasm compilation.

  4. Record stage/unit timing and preserve successful cache stages. Add elapsed and child CPU measurements around metadata, tool, native compile, printer, Wasm compile, transformation and publication; record Cargo fresh/rebuilt unit identities. A separately authorized diagnostic run can capture rustc phase timings. Preserve independent native/Wasm caches keyed by exact input, compiler, configuration, target, profile and features. Current content-cache units already coexist; do not clean them on retries. Keep descriptor printing, feature equality, final transformation/checks and atomic completion markers. A cached Wire JSON keyed merely by app source or endpoint names is unsafe.

Const hashing and larger changes

The SHA fixed-rotation optimization is already implemented. Its historical matched Fourcans native experiment reduced 273.141 to 139.613 s, with identical native shared-library bytes; it is not a measurement of today's 57 s phase. See rrt/research/const-sha-four-native-2026-10-19.md.

One remaining source-level duplication is concrete: Store's memory macro emits semantic_contract(identity, sources, dependencies) in each generic memory implementation. That routine recomputes semantic_source(identity, sources). Fourcans uses seven Workflow<Progress, Error> instantiations, each naming the same 30,650 bytes of Takt v1.rs, cell.rs and node_table.rs, before hashing its different dependency contracts. A declaration-level source digest could be computed once and combined with each exact ordered dependency list using the same framing. Measure this after unit profiling. Generic-dependent source or identity expressions cannot be blindly hoisted. Every static rejection and every current digest must remain demonstrably equivalent; no runtime hashing substitute or shorter unchecked input list.

Separating endpoint descriptors from application code, or changing physical reflection/certificate representation, is an SDK architecture change. The native layout and Wasm layout are separate target contracts: never reuse host physical certificates as Wasm certificates. Target-independent DTO schemas may eventually support a smaller descriptor producer, but generating a second hand-maintained schema or omitting endpoint cfg/feature checks would be wrong.

Verification for a later authorized change

Use an isolated fixed path and leased warm target. Test A → B → A with deliberately older source mtimes, including a proc-macro change, and verify rebuilt/fresh identities and executed behavior. Compare fresh Wire descriptors and prepared Wasm for tooling-only changes. Closure tests must reject mutation of a selected dependency, included README, external build-script input, feature/config/lock input and generator input, while permitting an unrelated package README edit. Preserve the existing failure/publication/concurrency tests. Contract-hoisting tests must independently compare framed digests and preserve compile-fail gates; SDK contract changes still need their actual lifecycle qualification.

A future artifact verifier could free build slots before Heavy16 ends by checking the immutable canonical source archive against the manifest's complete source table, while continuing to hash installed Wasm, tools, verifier, server and host harness. This requires explicit provenance/containment tests: reject missing, duplicate, altered or unbound archive entries and mixed artifacts; accept only the bytes sealed by the successful build-time before/after guards. The current campaign continues to require unchanged original paths through execution.