Ashroot evolution: implementation and qualification
2 November 2026. The optional layer now has scalable static schemas, SetNull and cyclic cascades, general single-upgrade migrations, prefix batches and lazy row queries. This qualifies a fresh V1/V2/V3 artifact generation. The first-generation evidence stays unchanged and is not an old-binary admission claim for these new images.
Implemented decisions
list! uses sealed recursive types and exact compiler metadata. There is no
fixed Ashroot table/index count, eight-reference buffer or graph matrix. Tests
exercise 17 tables and 25 indexes, late-position FK/unique selection, empty lists
and a 20-module catalog. Static checks cover positions, membership, duplicate
tables, actual foreign targets and migration source selection. Ordinary writes
check live references directly through the same synchronous Context; they do not
stage a reference array. Dynamic operation budgets still bound actual work.
Relationships support immediate Restrict, bounded Cascade with cycle/diamond deduplication, and SetNull. Nullable edits for one row compose before business validation. The complete candidate set is checked for unique collisions against live rows and against other candidates, allowing keys released by deleted rows. Commit removes old entries before publishing replacement entries. Expected refusal changes no primary/index contents; unexpected commit failure traps.
Target-ordered migrations select from::<OldTable,_>(mapper), New or Seed.
They add/remove/reorder tables, add/remove/change fields, indexes and references,
and change delete policies. All target references are checked after target
construction. Reindex streams unchanged primary storage; Recode creates
target-owned values; NativeValues and HylixValues move unchanged nested
owners rather than cloning payloads. Seed and mapped rows share a construction
budget. Dropped attachments retire through their actual owning adapters.
Useful writes now include upsert, single-read update_with, bounded
insert_many/replace_many/upsert_many, multi-root remove and table clear.
Batches report their successful prefix and leave the unused iterator suffix.
atomic traps the complete IC execution on a returned error; it adds no local
journal/savepoint or native rollback. Lazy primary/index rows and point lookups
compose with ordinary Rust iterators, with hard visit caps before filtering and
no borrowed row or resource loan crossing await.
The authoring convention documents purity, immutability, ownership, full interpretation policies, custom maintenance, preflight versus rollback, and native failure recovery. The authoring guide supplies API examples. Custom unsafe indexes must satisfy the complete grouped-candidate and two-phase maintenance contract in Definition, including cross-row uniqueness; Rust cannot prove arbitrary callbacks are pure. Source-known checks run during compilation, not through runtime purity monitoring.
Both Ashroot and the SDK memory conventions explicitly choose one synchronous upgrade. DTS can span rounds; there are no application migration continuations, background jobs or migration-progress denial flags. Very large stable payloads may deliberately support narrower changes. Required instruction, memory and I/O work must fit that upgrade. See the budget review.
Sources and gates
newstack HEAD: b2cb4b9fb01073a3cd55131362fc226355b65853.
SDK HEAD: d0e53afc7b7fdc4b7cf4e2ccbe1e55a386133c4b.
The SDK working changes are only AGENTS.md, docs/convention.md and
docs/upgrades.md; SDK runtime code and its gitlink are unchanged. No RRT/RRts/HRRT
runtime or neighboring repository was modified. Existing Heavy16 evidence is not
relabelled as Ashroot measurements.
The pinned compiler is rustc 1.101.0-nightly, commit 7df81381d, 14 October 2026.
Canonical wasm64 release builds use opt-level 3, thin LTO and one codegen unit.
Every image has exact source archives and before/after freshness receipts.
All 583 recorded selected-build inputs still matched at the final gate.
| Gate | Selected-source result |
|---|---|
| Default-feature native tests | 60 passed |
| All-feature native tests | 75 passed |
| Hylix-only focused tests | 26 passed |
| Minima-only focused tests | 27 passed |
| Independent authoring clients | 2 valid clients and 20 intended compiler refusals passed |
| Runnable leaderboard example | Passed |
| Canonical feature images | 12 built, compatibility/Wire checks passed |
| Actual IC qualification | 5 small integrity/migration scenarios, 1 large migration, 564 measured CRUD/batch calls passed |
One illustrative macro doctest is ignored and is not counted as passing. Native tests include owning nested Hylix Blob preservation and exact retirement ledgers, native nested allocation moves, shared Seed/From budget boundaries, panic quarantine, batch progress, nullable candidates and bounded iterator behavior.
Actual tests use the unchanged PocketIC v16.1.0 executable with SHA-256
6a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6.
Its actual effective application configuration enables DTS and disables
benchmarking instruction limits. The inspected neighboring IC source and this
frozen measured executable remain distinct identities.
Native and mixed normal targets each convert populated fresh V1 and V2 sources. V3 changes four source tables into five reordered target tables, drops Locks, adds Tags/Receipts, changes indexes/FKs, and recodes Cars into a real bool/owner row. Mixed conversion moves Nyxus→Hylix, Hylix→Minima and Minima→Nyxus. Missing final parents and late conversion traps restore usable old code, rows, indexes and stable bytes. Successful targets survive KEEP and fresh writes. SetNull conflicts, effects and update-trap rollback, cyclic cascades and bounds pass on Nyxus, hybrid Minima and Hylix. The extra Hylix-Car case uses V1; separate bad/late upgrade companions for that extra variant were not supplied.
One real populated upgrade across DTS
50,000 rows per source table means 200,000 source rows. One synchronous upgrade retained/transformed 150,000 target rows, retired 50,000 Locks and created two empty tables. Complete paged primary/index oracles matched the independent host model. Population setup committed in earlier updates; conversion itself used no application continuation message or migration state machine.
| Selected upgrade ledger | Instructions |
|---|---|
| Pre-upgrade | 1,220,441 |
| Post-upgrade, one attempt over four DTS slices | 6,098,128,348 |
| Whole Wasm execution | 6,099,348,789 |
| Separate observed warm compilation debit | 44,939,420 |
| Complete charged execution | 6,144,288,209 |
The Wasm total already includes 69,200,000 page-access instructions. Add neither those pages nor slice/round totals again. The complete charge exactly equals the 300B prepayment limit minus 293,855,711,791 refunded unused instructions. Both phases share one committed logical upgrade; coverage is complete. Actual cycle debit was 6,655,340,209. No install-code quota retries were required.
The selected effective budget is 300B instructions per install/upgrade and 2B per install slice; 40B is the ordinary update limit. All upgrade phases share the total. Official instruction limits. The target had already been installed during the session's smoke/small cases: the observed compilation debit is warm, not a cold worst-case charge. This proves real conversion across DTS; it does not establish maximum safe capacity, constant peak memory, or another schema's conversion cost.
Matched native cost screen
The handwritten control preserves the same four private native tables, rows, indexes, FK/unique checks, gate, deletion semantics and public protocol. It shares the public planner/descending wrapper. This measures coordination over that integrity-preserving control. Mixed has no matched handwritten control.
Every arm starts with 32 rows/table. Matched native/control arms each complete 188 calls and 326 row writes/removals, with identical ordered outcomes and final state. Setup, migrations, traps, queries and inspection are outside these totals.
| Cohort | Calls/arm | Completed rows/arm | Native instructions | Manual instructions | Difference |
|---|---|---|---|---|---|
| All | 188 | 326 | 126,097,974 | 120,941,925 | +4.263% |
| Scalar CRUD | 180 | 180 | 119,053,397 | 113,906,883 | +4.518% |
| Bounded prefix batches | 8 | 146 | 7,044,577 | 7,035,042 | +0.136% |
| N100 upsert batch | 1 | 100 | 1,697,913 | 1,691,681 | +0.368% |
| Refused batch prefixes | 3 | 22 | 2,343,027 | 2,341,239 | +0.076% |
The less favorable scalar insert cohort is +10.894%; it remains in the complete CSV. The 5,156,049-instruction aggregate difference includes 5,120,000 additional page charges. Those charges are real work, already included in the totals. Body intervals show -1.699% but differ in first-touch attribution and do not measure isolated computation overhead. Cycle debits are 1,473,771,948 versus 1,463,459,850 (+0.705%); summed dirty-page counts equal 613.
Per-call host times are preserved as diagnostics. This is one selected-source cohort with fixed arm ordering, not a latency distribution or mainnet throughput claim. The baseline is a separate source generation, not a repeated sample of the selected binary.
Static specialization and size
The baseline expanded native image was 680,208 bytes, including unused grouped nullable-maintenance paths for schemas having no SetNull. A minimal compile-time specialization keeps all graph planning/checks but omits that unused maintenance. It saves 57,299 native bytes and 60,215 mixed bytes. Both generations passed their full actual IC matrix; baseline native calls used 36,619 more instructions for identical work.
| Selected size/accounting | Native | Manual native | Difference |
|---|---|---|---|
| Prepared Wasm bytes | 622,909 | 574,996 | +47,913 (+8.333%) |
| Executable Code payload bytes | 370,736 | 360,281 | +10,455 (+2.902%) |
| Deterministic gzip bytes | 132,046 | 124,301 | +7,745 (+6.231%) |
| Final Wasm capacity bytes | 16,842,752 | 16,842,752 | 0 |
| Final stable capacity bytes | 0 | 0 | 0 |
The remaining prepared-size difference includes names +28,823 bytes, Data +8,560 and other payloads +75. Wire/compatibility section sizes match. Runtime binary accounting confirms the gzip lengths. Final total memory accounting is +7,746 bytes, almost entirely the binary difference plus one custom-section byte. Equal capacity does not establish equal live or peak allocation.
Evidence and remaining boundaries
Evidence navigation links the exact per-operation comparison, size attribution, final gate and archive. Both source generations, full traces, source/build receipts and authoring failures are preserved. Initial matcher failures and isolated temporary-driver receipts remain separate from the final real 22-case checker. Historical absolute paths identify their runs; they are not fresh-build receipts for a relocated checkout.
One primary key representation per database remains intentional. Restrict is immediate even if its source is also scheduled for deletion. Mappers preserve one source row ID per mapped target row; merge/split/fanout and rekey/on-update propagation are absent. There is no SetDefault, deferred SQL constraint API, arbitrary effectful trigger system or cross-domain strong FK. Custom spatial indexes are supported through Definition; a built-in R-tree/HashMap primary is not supplied. Minima remains the explicit hybrid fixed-slot backend.
Nested-owner field moves are qualified by native ownership/ledger tests; actual IC V3 uses portable scalar fixture rows, not every arbitrary owning-row encoding. Large conversions can temporarily hold source and target allocations. Callbacks, workspace and allocator overhead outside logical budgets remain author obligations. Native caught failures require restoring/discarding the whole Store/providers; there is no IC rollback simulation or late-flush recovery guarantee. No SDK engine/runtime performance claim is inferred from this screen.
Current Ashroot/fixture/research links and the three changed SDK policy documents pass their scoped checks. Research navigation is current. The repository-wide documentation check still reports the same 16 pre-existing missing crypto benchmark artifacts; its exact output is preserved.