Typed Tripwire children and bounded lists
Implemented and integrated. The selected SDK is 74b4e6c93212dd927525aeb70a293509b557fb8d.
The final qualification report
records the measured 54d7c40 runtime, matched Heavy16 selection, Wire/Hylix
protection and the nested-order tradeoffs. The selected SDK adds only guide and
test updates after that runtime; source scope
preserves this distinction.
Maintained callers use typed children, bounded lists and exact selected-child windows where applicable. The usage inventory, producer-byte corpus, final callback checks and workspace metadata checks record that rollout. The 330-call API matrix records both gains and regressions: count-only array access stays cheap, while full typed scalar iteration loses to Wire at the largest tested counts. Typed access does not automatically coalesce many small IC reads into a bulk fetch. Opaque payloads, specialized packed rows and low-level source regression tests keep their distinct roles. The original foundation and failed candidates below remain evidence of the experiment, rather than current integration instructions.
Frozen SDK: b8a844092dc47fa36fc7d3065d0a3fdb03d05c07, based on structural admission 4af0ec83b12d107dfc9ac77462767faf2fe83959. This uses the approved hygiene/cold-rejection base and contains neither rejected Control outlining nor the rejected sizing factorization. SDK source worktree: /srv/shared/code/newstack/playground/tripwire-compact-20261029/typed-sdk.
The API adds Nested<Child[, MAX_BYTES]>, List<Child, MAX_COUNT>, original-source SourceWindow values and a small Message GAT contract. Nested Args and list item Args encode directly into final caller storage. A selected child owns its fixed area and keeps the original source lifetime, independent of temporary parent/field/list handles. Existing scalar/Bytes/Text encodings and native metadata remain unchanged. Views cannot escape the higher-ranked entry callback or a returned future. No runtime schema lookup, payload cache, complete-child copy, unchecked path or automatic Option/enum representation was added. The SDK guide documents acyclic generated child paths and literal bounds.
Global generated cumulative-boundary admission from 4af remains in place: every stored end is nondecreasing and bounded by the exact payload length before the handler runs. Nested children apply that check when selected. A list validates count, exact geometry, its directory and each child byte cap with bounded stack scratch; selected children then open their own fixed headers. Bool, field limits and fetched UTF-8 retain selected/lazy validation. Scalar-only trailing bytes still remain unselected; fixed canonical width is an encoder/list-stride fact.
Native-only descriptors keep tripwire-compact-1 and flat child schema references. List fields add item_schema, max_count, and nullable compiler-proven item_fixed_len; count cap zero has null item metadata. Name::visit_schemas visits native (schema, descriptor) pairs, with a bool callback to prune already-visited subgraphs. The client owns any map. Metadata is absent from Wasm and never transmitted. Unknown native custom child descriptors must fail a generic client build instead of selecting a fallback format.
Qualification
Native summary: 122 tests/doctests passed (core+derive 99, facade 2, facade docs 11, retained SharedSpan 10). Full locked offline metadata resolves 140 packages and 31 workspace members. Scoped rustfmt, diff checks and 381 local documentation links pass. Checksums of all 428 tracked files are unchanged across final gates and the source is clean. See source patch, source before and source after. The IC source reviewer accepted the final source design; actual IC/runtime/performance qualification is Apps' separate gate and remains pending here.
Tests pin cross-module generated Args, equivalent byte-field wire bytes, borrowed original-source pointers, exact nested frames with unrelated outer trailers, cap/truncation before child copies, no nested reads on scalar rejection, zero/fixed-width children, malformed child/list directories, lazy Bool/MAX/UTF-8 behavior, direct final-region encoder pointers, callback failures/foreign/short returns, changing custom child sizes, native descriptor shape and visitor pruning. Compile-fail docs pin child/list escape, returned futures, impossible fixed caps, recursive contracts and invalid custom fixed contracts.
Full-workspace cargo fmt reports two preexisting unchanged files: facade src/lib.rs reexport ordering and cdk-rsx-macros/src/export.rs formatting. Their contents are identical to 4af; they were not changed to qualify this feature. The complete fmt log is retained; scoped format passes.
Failed development attempts remain in native-foundation/: the initial generic list marker needed the approved static schema-marker bound while retaining actual borrowed view lifetimes; a syn PathArguments constructor was corrected; and a proposed recursive count-zero test hit a Rust const-query cycle, so schemas remain explicitly acyclic. The final source passes the nonrecursive zero-count and zero-width cases.
Integration
Use the complete b8a8440 history (or the full patch over 4af). Do not cherry-pick only the final derive commit without its SourceWindow/Message and List foundations. Foundation 155404f adds the shared contract/window/writer, List commits add its bounded runtime and tests, and b8a8440 integrates generated children, typed metadata and documentation. Cargo builds used the main absolute pinned environment, the exclusively leased warm target and unique TMPDIR=/dev/shm/tripwire-typed-foundation-native. The target lease is released. Maintained application migrations and actual IC qualification are coordinated by root/Apps/Fixtures.