49 KiB
AIR anonymous type-depth audit
Non-normative evidence for Q-059, initially at ba99ad6. This audit introduces no syntax-nesting limit, code, feature or acceptance rule. The sections below record successive failures and repairs; their remaining-work statements are historical. The closing inventory gives the final compiler type-traversal scope and bounds. Runtime validation remains separately tracked by Q-060.
Reproducer and observations
Generate a parameter type with depth d using "array<" * d + "u8" + ",1>" * d:
module type.depth
air 0
lang 0.1
features [arrays, ownership]
fn @f(%x: TYPE) -> void
effects []
entry:
ret
Replace TYPE with the generated type and call aji check FILE.air. Each array has length one; accounted size is one byte. No runtime execution, model experiment or held-out input is involved. Tests used the ordinary 8-MiB native stack; only core-dump capture was disabled for the child. No wall-clock timeout ended a probe.
| Depth | Input bytes | Before parser repair | After parser repair |
|---|---|---|---|
| 64 | 683 | accepted, exit 0 | not rerun |
| 256 | 2,411 | accepted, exit 0 | not rerun |
| 1,024 | 9,323 | accepted, exit 0 | accepted, exit 0 |
| 4,096 | 36,971 | aborted, exit -6 | accepted, exit 0 |
| 16,384 | 147,563 | not run | aborted, exit -6 |
The old 4,096-depth probe emitted no diagnostic JSON and a Zig segmentation-fault traceback before SIGABRT. It contains 3,529 parseType and 3,528 parseCompoundType frames. The new 16,384-depth failure instead contains 5,000 sizeQuery and 5,000 sizeValue frames in verifier/budget.zig. These repeated native frames and stack-dependent depth are evidence of native stack exhaustion, rather than a specified E5101 rejection. No core was captured; diagnosis uses Zig's symbolized stderr traceback. The observation confirms two recursive failure sites, not bounded behavior of every downstream traversal.
Parser repair and validation
Compound syntax is a unary chain. The parser now stores pending constructors and their inner spans in an arena-backed list, then closes/builds them from the innermost outward. File modes and capability kinds remain leaves. Feature checks still precede child parsing; member gates still precede the closing delimiter. The same constructor names, array-length checks, unknown-name behavior and error positions remain. Memory grows with the explicit input depth; no program heap allocation, ABI or language semantics changes.
Unit tests parse and inspect 32,768 array levels without recursive equality/formatting in the test. Separate 8,192-depth probes retain a single E0004 at the unknown leaf and a single E0001 at the missing outer delimiter. All unit tests, Zig format checks and 1,765/1,765 conformance cases pass. An old/new comparison over all 364 public conformance AIR files preserves exit status, stdout diagnostics and stderr exactly. A further 232 constructor/feature/error probes cover all nineteen unary/array constructors, reserved/unknown leaves, invalid file/capability names and invalid array lengths. These constrain parser compatibility; they are not proof of all input compatibility or a complete Q-059 fix.
The subsequent budget failure is verified and must be repaired without silently limiting previously permitted syntax. Iterative size evaluation, inner-type budget visiting, property/validity/equality traversals and diagnostic/canonical formatting require separate inspection. Q-059 stays open; resolving parser recursion alone does not resolve verifier processing.
Size-query repair
The next increment replaces the verifier's recursive size evaluation with explicit continuations for array/atomic/mutex wrappers, struct sums and enum payload sums/maxima. Only nominal member edges advance the original cycle-depth guard. Null overflow short-circuits remaining fields/variants and is cached at every completed ancestor, retaining the existing finite result for invalid nominal cycles. Inner-type budget visiting is iterative too.
The immutable size cache now also keys anonymous array/atomic/mutex nodes by constructor, storage identity and nominal depth. Different atomic/mutex constructors sharing one content pointer remain distinct. Every query reuses its pending stack; read-only runtime queries allocate nothing. Verification still rebuilds caller-supplied caches, including anonymous entries. Raw identities do not enter AIR, reports, diagnostics or canonical text; replacing type storage invalidates the cache.
The allocation-free fallback folds anonymous chains using a saturated affine map, retaining zero-sized leaves even when its multiplicative coefficient exceeds u64. Invalid zero array lengths cannot mask an overflowing inner segment. Nominal fallback traversal remains recursive; the memoized verifier query handles deep nominal chains explicitly. This distinction is not a claim of bounded native stack for arbitrary uncached host-side queries.
Unit cases cover 32,768 anonymous levels, 32,768 nominal declarations, zero/overflow behavior, null-result reuse, shared-content constructor identities and rebuilding a forged anonymous cache. Two AIR/source pairs additionally preserve acceptance of sixty-four huge arrays over an empty record and E5101 for the same chain over u64. All four new fixtures pass GC-before-each-step checking; the rejection adds a verified same-code twin. The existing full 1,765-case conformance snapshot and sixteen focused nested-size/heap-quota cases pass, and all 364 pre-existing AIR checks retain exact old/new outputs. The full snapshot plus four focused fixtures cover all 1,769 current conformance cases; test-extended also passes. These tests confirm the metric and cache behavior, not the whole Q-059 pipeline.
At depth 4,096 the complete check still accepts. At depth 16,384 it now reaches type validity and aborts with 8,711 wellFormed frames in verifier/types.zig, rather than sizeQuery/sizeValue. The size failure is removed; validity/property/equality/formatting and uncached nominal traversal remain open. No syntax-depth limit, semantic feature, public code or bundle text is added.
Type-validity and finite-layout repair
Type-position validation and generic-argument array-length checking now walk anonymous chains iteratively. The order of per-node checks, the transition to each inner position, and the graph-owner stop remain unchanged: graph content is checked for IslandSafe and is not rechecked as an ordinary member. Property predicates called by those checks are a separate traversal obligation.
Finite-layout checking now uses suspended DFS frames for nominal declarations, retaining field order, enum variant/payload order, empty variants and the original grey/black cycle behavior. An active declaration continues its remaining siblings after a back edge marks it black. Anonymous layout edges are iterative too. Arrays always follow their element; the original ownership/borrow wrapper set follows its content only with linear_aggregates. Graph owners and atomic cells retain their original layout boundary. No new accepted/rejected type position or cycle rule is introduced.
Unit cases cover 32,768 anonymous levels, a 32,768-declaration acyclic nominal chain, a deep anonymous self-cycle, the wrapper feature gate, graph validation's single E2111 and diagnostic order through siblings after back edges. Unit/format checks and all 1,769 conformance cases pass. All 366 public conformance AIR checks retain exact old/new exit status, stdout and stderr. An additional 48 generated mixed struct/enum cyclic graphs retain exact old/new outputs, including cycle selection and order.
The complete 4,096-depth check still accepts. At 16,384 it passes wellFormed and then aborts in Module.isLinearType: the symbolized traceback contains 10,001 isLinearType frames, no JSON diagnostics and exit -6. The probe stops there; 32,768 is not claimed to pass the complete pipeline. This confirms the next property-query failure, while equality, formatting and uncached nominal traversals also remain open. Q-059 is not resolved. No syntax-depth limit, semantic feature, public diagnostic code or bundle text is added.
Anonymous property-query repair
Whole-value linearity, Zeroable, Copy, Local, IslandSafe and endpoint/forbidden-content queries now follow their original anonymous edges iteratively. Send/Share uses an explicit query mode: Send follows ref/slice by querying Share, and Share follows mutex by querying Send. The unchanged terminal classifications and nominal-cache leaves decide acceptance. No borrow, transfer, aliasing, concurrency or runtime rule changes; predicates remain allocation-free read-only queries.
Nominal-property preparation now discovers dependencies through anonymous chains iteratively, still including phantom edges. Its monotone worklist, declaration/field order and fixed-point values are unchanged. Height and source-witness distance fold anonymous edges using their existing saturation at 65 and 34. These are property summaries, not new syntax limits; saturated chains can stop without changing the summary. Uncached nominal fallback calls remain recursive. The existing depth-64 guarded bounded predicate and depth-32 witness remain separate bounded traversals.
Unit tests cover 32,768 anonymous arrays ending in plain data, task-local state or a channel endpoint, both direct and nominal cached queries. A 32,768-handle phantom chain retains dependency/height behavior, and 65,536 alternating ref/mutex edges retain Send/Share mode changes at a non-Share region leaf. Boundary tests retain height and witness-distance saturation. Existing cyclic fixed-point, shared-diamond and mixed cached/uncached tests pass with the new loops. All unit/format checks, test-extended and all 1,769 conformance cases pass; all 366 public AIR files retain exact old/new exit status, stdout and stderr.
The original complete check now accepts depths 4,096, 16,384 and 32,768 on the ordinary 8-MiB stack, with no diagnostic output. A separate 16,384-depth return-equality check accepts, and an invalid atomic content type at the same depth returns E1001 with the complete found type rather than aborting. These observations do not prove arbitrary-depth equality/formatting or uncached nominal traversal. Q-059 remains open; no semantic feature, public diagnostic code, bundle growth or new acceptance limit is introduced.
Further probes confirm the remaining sites rather than merely inferring them from source: return equality accepts depth 32,768 but aborts at 65,536 with 10,001 Type.eql frames; invalid atomic content aborts at depth 32,768 with 9,999 printType frames. Both failing checks exit -6 without diagnostic JSON. Core capture is disabled only for the child; no timeout ends a probe. Equality and diagnostic/canonical type printing now have independently verified native-stack failures.
Type equality and printing repair
Type.eql now compares anonymous chains iteratively without allocation. Tags still differ before descent; every array length is checked before its element, and named types compare declaration indices without expanding the nominal graph. All constructor and leaf identities are unchanged.
Type printing now records anonymous suffixes in an explicit stack, then emits them from the innermost outward. Array suffixes retain their original lengths and canonical comma/space spelling; other wrappers close with >. Named declarations remain names. The internal Zig print/printType API receives a compiler allocator explicitly, with updated verifier/serializer callers; allocation and writer errors propagate. Stack storage is proportional to input nesting, deallocated after the print attempt, and adds no heap allocation to an Aji program. AIR text, diagnostic fields/codes and JSON serialization rules do not change.
Unit tests compare separate 65,536-level chains with equal types, unequal deep leaves and unequal middle array lengths; they retain each unary constructor identity. A 65,536-level varied-length type prints exactly and passes parse/print/parse/print canonical equality. Wrapper spellings, suffix-allocation failure and buffered writer failure are checked independently. Unit/format checks, test-extended and all 1,769 conformance cases pass, and all 366 public AIR checks retain exact old/new exit status, stdout and stderr.
Both verified crashing CLI inputs now finish: return equality at depth 65,536 accepts with no output, and invalid atomic content at depth 32,768 returns exactly one E1001 at the original primary position with the complete canonical found type. These are direct process outcomes on the ordinary native stack, not just isolated helper tests. Uncached nominal fallback and other type-query call paths still require audit; Q-059 remains open. No new syntax-depth limit, semantic feature, public diagnostic code or bundle text is introduced.
Audit-report traversal
Call-path inspection finds a further anonymous traversal in report.write's capability-kind collector. The verified 65,536-depth parameter module accepts checking but aji report aborts with 10,000 go frames (plus one inner frame), no JSON and exit -6. The collector now iterates inner types, preserving its nominal-name stop, scan sites, deduplication and sorted output. The complete report probe now returns an audit JSON document, and a checked deep capability parameter unit test retains sorted deduplication across declarations, parameters, return and block parameters. Unit/format checks and all 1,769 conformance cases pass; all 366 public AIR report commands preserve exact old/new exit/stdout/stderr.
The CLI retains verifyModule's size/property caches in check.Report.module; frontend constraints use properties.prepare before structural queries. Uncached nominal fallback remains present in the low-level APIs and needs its own audit. No blanket native-stack claim is made for all query paths. A separate accepted runtime zero-materialization probe exposes Q-060; compiler type repairs do not resolve runtime value traversal.
Cache-free nominal accounted-size queries
At c906441, a direct accountedSize query over a constructed chain of 32,768 single-field nominal records ending in u8 aborts with exit -6 on the ordinary 8-MiB stack. Its symbolized stderr contains 5,001 accountedSize and 5,000 uncachedBaseSize frames before the traceback limit. This is an executed low-level size-query failure, not a claim that the full verifier accepted that constructed module. A separate parsed programme with 1,024 or 4,096 uniquely named nested records passes the public verify wrapper, retains neither cache in the caller's module, then allocates/frees its one-byte contents through interp.run under fuel 8. Both old runs return normally after six instructions. No wall-clock timeout ends a probe; only child core capture is disabled.
The public size query now accepts a compiler allocator and propagates OutOfMemory separately from null arithmetic overflow. Cached entries and anonymous/scalar queries remain allocation-free. An uncached nominal leaf uses SizeMemo's explicit continuations in a temporary host arena, released before returning. Partial immutable module caches may supply child entries, including cached null; neither type storage nor caller cache is mutated. The nominal cycle guard, checked field sums, enum payload maxima/tag accounting, unary affine folding and early overflow behavior are unchanged. The recursive arithmetic derivation is retained only as a shallow independent test oracle.
All runtime size-query callers propagate metadata allocation errors before charging authority or publishing new payloads. The existing accounted-size invariant (spec 08 §7.1), verifier acceptance/priority, heap/region/graph/buffer/channel charges and release rules remain unchanged. This adds no Aji allocation, effect, fuel charge, scheduling point, code, trap, feature, semantic flag or depth limit. The internal Zig accountedSize API gains an allocator/error result; AIR/source syntax and CLI records are unchanged. The existing nominal_queries/cycle AIR/source rejection pair still expects E1003, and the valid nested_allocation_quota pair retains its precise allocation and release behavior.
Unit tests compare 7,168 shallow mixed struct/enum/wrapper queries, including invalid cycles, zero lengths and overflow, against the independent arithmetic derivation. A 32,768-declaration query now returns one byte. Every underlying metadata allocation is failed in turn, checking propagated OutOfMemory and complete temporary cleanup; cached success/overflow and partial-cache reads are checked separately. A verified enum/record/array programme runs 108 times across cached/cache-free modules, quota boundaries, fuel 0–8 and ordinary/per-instruction collection; all 54 paired records and instruction counts agree. Runtime metadata OOM remains a host error, not a budget_exceeded edge.
The repaired process-level 32,768-declaration query returns one byte, and both parsed cache-free library programmes retain their six-instruction result. All units, format checks, test-extended and all 1,791 current conformance cases pass; all 370 public conformance AIR check commands retain exact old/new exit status, stdout and stderr. Uncached nominal property predicates and their public call paths remain separate Q-059 work. No fresh Claude review was available.
Cache-free nominal property queries
At 897f538, each of nine direct queries over 32,768 nested nominal records ending in u8 aborts with exit -6 and recursive property frames on the ordinary 8-MiB stack: linearity, Zeroable, Copy, Local, Send, Share, IslandSafe, endpoint and forbidden content. These constructed resolved graphs test the query API, not acceptance by the complete verifier. Only child core capture is disabled; no timeout terminates a probe. All nine repaired probes return their expected booleans.
Public property queries now take a host allocator and propagate metadata OutOfMemory. An iterative classifier retains the original anonymous edges, Send/Share transitions and terminal rules. Cached facts and anonymous terminal paths allocate nothing. A cache-free nominal query runs the existing monotone property worklist in a temporary arena and releases it before returning; it neither mutates the caller's module nor installs a cache. Zeroable rejects an enum without preparing its payload graph. Explicit prepared queries serve internal stages whose preceding type verification supplies immutable caches and value types. Public generic-argument validation uses fallible queries where that precondition does not hold. The private derivedType helper already receives the prepared module; its fallible calls therefore read cached facts without allocating.
The preserved invariant is that ownership/transfer/aliasing decisions use the same structural facts, independently of whether the caller retained verifier caches (spec 02/03/04). Property preparation retains its fixed points, universal/existential aggregation, declaration dependencies, phantom edges and saturated summaries. Invalid recursive layouts still reject E1003. Valid source/generics/constraints_positive.aji and the nominal_queries/cycle AIR/source rejection pair remain conformance examples; raw and prepared own_array<Plain> arguments accept, while own_array<Owner> arguments retain the same E1001 envelope. Verifier rules, runtime ownership, authority, fuel and deterministic scheduling are unchanged. There is no new Aji allocation, code, trap, feature, flag, syntax limit or bundle text. Only the internal Zig allocator/error API changes.
Tests compare both raw and prepared queries against 9,216 independent shallow pre-repair derivations (18,432 comparisons). Twenty-seven deep queries cover plain, task-local and endpoint leaves with pending sibling fields. Every temporary allocation is failed in turn for all nine properties, checking OutOfMemory and complete cleanup; prepared/terminal reads succeed with an allocator that rejects its first request. Generic-argument metadata failure produces no semantic diagnostic. Units, format checks and test-extended pass. The full property-engine conformance snapshot passes all 1,791 cases; old/new CLI checks are byte-identical for all 370 AIR and 1,421 source files, as are all 506 accepted source lowerings. Final full conformance after the generic-argument call-site correction also passes all 1,791 cases, with exact corpus coverage.
Q-059 remains open for the closing public-call-path audit and source AST traversal inspection. The earlier full per-instruction collection suite is still running; no incomplete suite or unavailable Claude review is counted as a pass. Phase 6 and contract decisions remain open.
A subsequent read-only Claude review, relayed by the owner, examined the property diff against 897f538, including frontend/lower.zig. No defects were reported in the nine classifications, fixed-point preparation, cache preconditions, allocator/error lifetime or test construction. Nothing was built or run, and the expanded suite was not observed; this is code-review evidence only, not independent test confirmation or review of later source-parser work. The resultType/derivedType wording above is corrected, and query's API comment now directs repeated callers to prepare once rather than rebuilding the entire module for each nominal query.
Source type-syntax parser
At 3563560, an 82,013-byte monomorphic source file containing 16,384 nested length-one arrays aborts in typeExpr with 8,704 symbolized frames and exit -6. Depths 63, 64 and 4,096 accept. Spec 15 §15's depth-64 generic traversal guard is not a universal parser limit: specialization returns an unchanged module when there are no generic declarations or uses. Applying that guard to every parsed annotation would change existing acceptance. Only child core capture is disabled during probes; no timeout terminates them.
The source type parser now suspends array suffixes and argument lists in explicit frames, including nested static function arguments. Array lengths, argument order, wrapper classification, qualified names, cap/file paths, wrapper-arity errors and split >> positions retain their original behavior. Static function references remain argument syntax; no ordinary type synonym is added. Frame storage is released, AST argument/element storage retains the caller's arena lifetime, and host allocation errors propagate without exposing a partial AST. Spec/reference, verifier and runtime rules, diagnostics and bundles are unchanged; there is no new nesting limit, feature or semantic flag.
Unit tests inspect 32,768 mixed array/wrapper/applied-type levels with sibling arguments, 16,384 nested static function argument pairs and split-closer spans. Deep malformed input retains its leaf and wrapper-name failure positions. Failing each underlying parser arena allocation checks OutOfMemory and cleanup. All units, format checks and all 1,791 conformance cases pass, with exact corpus coverage. Hosted grammar and repair-advice suites pass 288 and 299 checks. Formatter integration passes 6,072 checks over 1,467 public files (1,412 parsed, 55 syntax errors and 782 identical AIR outputs). All 1,421 old/new source checks and 506 accepted lowerings are byte-identical; 156 additional constructor/argument/error probes retain exact outputs.
The formerly failing array input now formats successfully, producing 82,019 bytes; a second formatting pass is byte-identical. Full checking reaches a separate confirmed failure in generics.usesGenerics (20,002 symbolized frames, exit -6), without typeExpr frames. A second deep input, invalid mut slice<…>, previously aborts while speculative repair-advice parsing recurses; it now returns one E7001 at the original primary position with the exact slice_mut_type candidate. Passing parsing/formatting or this diagnostic does not establish complete checking for arbitrary source depth. Q-059 remains open for source AST traversal and closing call-path work. No fresh Claude review was available.
Source generic-use detection
The preceding 16,384-array source reproduces the usesGenerics failure again at cef944d (10,001 frames before the traceback limit, exit -6). The query now visits immutable AST storage through explicit work entries. Typed callbacks enqueue pointers to original struct fields, active union payloads, optional contents and slice/pointer children; no pointer to a copied temporary payload escapes. Reversed enqueue order retains the original depth-first field/element order. String bytes and scalar fields remain leaves. Temporary work storage is released on completion, early positive detection or allocation error.
The original generic-use markers are unchanged: applied/static-function types, explicit expression specialization, enum/struct expressions with type arguments and constructor patterns with type arguments. Generic declarations still take their preceding specialization path; monomorphic input is not assigned a new depth limit. OutOfMemory propagates as a host error rather than false or a source diagnostic. Syntax, nominal identity, effects, verifier acceptance, ownership/runtime/fuel rules and bundles are unchanged. The private host query gains an allocator/error result; no AIR feature, public diagnostic or semantic flag is introduced.
Unit tests compare 387 shallow type/expression/pattern/block/module queries against the independent pre-repair derivation, including empty arguments and optional fields. Positive and negative queries traverse 32,768 type, expression and nested-block levels. Every work-allocation request is failed in turn for both outcomes, checking error propagation and cleanup. All units and format checks pass; generic and static-function CLI integration passes 32 and 25 checks. All 1,791 conformance cases pass with exact corpus coverage. All 1,421 public source checks and 506 accepted lowerings retain byte-identical old/new exit/stdout/stderr.
The complete 4,096-array check still accepts before and after. The 16,384-array check now reaches a separate confirmed native-stack failure in lowering's resolveType (10,883 frames, exit -6), with no usesGenerics frames or diagnostic JSON. No timeout terminates these probes; only child core capture is disabled. This is progress through the pipeline, not full deep-source acceptance. Q-059's source lowering/remaining traversals and Phase 6 gates remain open. The earlier full per-step collection suite is still in progress. Claude's preceding property review does not cover this change.
Source annotation resolution
The 16,384-array source again aborts before this increment at 24a3876: the fresh traceback contains 5,440 resolveType frames, exit -6 and no diagnostic JSON. Lowering now records array/wrapper continuations, resolves the leaf and constructs the source Ty chain from inside outward. Array-length and known-wrapper checks remain before child resolution; array value-content and AtomicScalar checks remain after it, with the original spans, messages and fields. Nominal names still stop at their declaration index. The pending list is deinitialized on success, rejection or allocation error; its caller-arena buffers remain until arena destruction. Metadata and resulting type allocation failures propagate as host OutOfMemory. No source/AIR constructor, semantic limit, diagnostic code, runtime/fuel/effect/ownership rule or bundle is changed.
Tests compare 1,736 shallow leaf/array/wrapper combinations against the independent pre-repair derivation, including unknown names/constructors, array boundary lengths and competing error priority. A 32,768-level mixed annotation is constructed and inspected iteratively; unknown and nonvalue leaves retain their original diagnostics. Every allocator request is failed in turn, with arena cleanup checked. Type-position and Copy-content CLI integration pass 74 and 119 checks. All units and format checks pass. All 1,791 conformance cases pass with exact corpus coverage; all 1,421 public source checks and 506 accepted lowerings retain byte-identical old/new exit/stdout/stderr.
Complete checking still accepts the 4,096-array input. At 16,384 it now passes resolveType and aborts in type_properties.firstInvalid (10,001 symbolized frames, exit -6 and no diagnostic JSON). Only child core capture is disabled; no timeout ends a probe. Recursive diagnostic type text and other source property/query paths remain audit candidates. This is not arbitrary-depth source acceptance: Q-059, Q-060's closing validation and Phase 6 gates remain open. Claude's previous nominal-property review covers neither this increment nor the generic-use repair.
Source anonymous property scans
At b23f3e6, the ordinary 16,384-array source aborts in type_properties.firstInvalid (10,001 frames). A second source wraps the same array annotation in own_array; it aborts in linear (7,060 frames). Both exit -6 without diagnostic JSON. The repair makes firstInvalid follow array/wrapper syntax with constant traversal state, preserving outer-before-inner own_array checks and the island/frozen/arc stop. Its known-linearity helper peels only anonymous array chains; named declaration lookup, parameter binding/shadowing, memo generations, cyclic paths and fixed-point retries retain their original algorithm. No new allocation or error conversion is introduced by either loop.
Tests compare 2,160 shallow cases against the independent pre-repair anonymous traversal, including nominal/generic content, cycles with a positive witness, unknown parameters, parameter shadowing, nested own_array and graph stops; the nominal declaration algorithm is shared, not an independent nominal oracle. Deep array/mixed-wrapper queries cover 32,768 levels, positive/negative content and original failure spans, while an allocator failing at its first request verifies zero work allocations on these anonymous paths. Existing diamond/cycle tests, all units and format checks pass. Copy-content/generic CLI integration passes 119/32 checks; all 1,421 public source checks and 506 accepted lowerings retain exact old/new exit/stdout/stderr. All 1,791 conformance cases pass with exact corpus coverage.
Both previously aborting complete 16,384-level checks now accept without output, as does the 4,096-array input. Non-Copy content behind the deep own_array returns exactly one E7005 at 2:19, with constraint Copy and type_constructor own_array. Core capture alone is disabled and no timeout ends a probe. These process outcomes establish repairs for these inputs, not arbitrary-depth source acceptance. A separate 8,192-declaration source probe confirms remaining native recursion through named source types: before this repair, 3,326 linear and 3,325 declaration frames; afterward, 3,306 and 3,305, both exit -6 without diagnostic JSON. Source Ty equality/text/AIR conversion and other closing call paths also remain to audit. Q-059 and Phase 6 gates remain open; Q-060's full per-step validation remains separate. No syntax/feature/code/bundle growth, runtime/effect/ownership rule or acceptance limit changes. No fresh Claude review is claimed.
Source nominal property continuations
The independently reproduced 8,192-declaration linear/declaration failure is repaired by an explicit query/argument/member continuation machine. Static arguments finish in their parent environment/path before cache and cycle checks. Struct fields and enum payloads retain source order and positive short-circuiting. Cycle state remains the declaration name plus known-linear parameter flags; indexed path entries survive work-list growth. Negative entries retain the generation captured before argument evaluation, while positive completions invalidate provisional negatives in the original order. Memo keys remain in caller-arena storage across retries; temporary frame/path buffers are released on success, early result or OOM. Metadata allocation errors propagate, never become false or a diagnostic. Anonymous terminal paths still allocate no work storage.
The old recursive nominal declaration algorithm is now copied into the shallow oracle as well, removing the shared-nominal limitation of the preceding tests. Tests compare 4,613 roots over 128 generated six-declaration graphs and targeted nested-argument/parameter states, each queried three times with retained caches: results, lookup counts, complete entry order/keys/values/generations and final generation all agree. The existing 2,160 shallow syntax comparisons now use this independent nominal derivation too. Three 16,384-declaration mixed struct/enum queries cover negative content, positive leaves and a deep cyclic back-edge with a later positive witness. Six argument/cycle/result shapes fail every underlying arena allocation request in turn, checking OOM and full arena cleanup. Units/format checks, nominal/Copy-content/static-function CLI integration (110/119/25) and all 1,791 conformance cases pass with exact corpus coverage; all 1,421 source checks and 506 accepted lowerings preserve exact old/new exit/stdout/stderr.
The complete formerly failing Copy chain accepts with no output. Replacing its final field with own returns exactly one E7005 at 8194:19, with constraint Copy and type_constructor own_array. No timeout ends these probes; only child core capture is disabled. A separate 65,536-array invalid-atomic source now confirms source typeText native-stack exhaustion (10,001 frames, exit -6, no JSON), before any diagnostic is emitted. Source Ty equality/text/AIR conversion and closing query paths keep Q-059 open; Q-060 validation and Phase 6/contract gates remain separate. No syntax/feature/code/bundle growth, runtime/effect/ownership rule, generic traversal guard or accepted-depth limit changes. No fresh Claude review is claimed.
Source type text repair
The 65,536-array invalid-atomic source's confirmed typeText abort is repaired by an iterative prefix/leaf/suffix writer. One growing byte buffer replaces recursively copied ancestor strings; parent lists are deinitialized, while their buffers and failed output buffers retain caller-arena lifetime. Canonical spelling, array decimal lengths/spaces, source-versus-AIR nominal names and the resources feature side effect are preserved. The internal typeText/tyText/diagnosticTyText APIs now propagate host OutOfMemory at every caller, replacing the old array/borrow/cap fallback strings. Failed metadata allocation must not fabricate a found type or generated AIR; ordinary diagnostics, syntax, effects, ownership/runtime/fuel and acceptance rules are unchanged.
Independent shallow tests compare 3,696 canonical/diagnostic outputs and feature states against the old printer, covering every wrapper/leaf, nominal display-name fallbacks and zero/max-u64 array lengths. A 65,536-level mixed chain has independently assembled exact text in both modes. Allocation failures cover direct printing, diagnostics and local AIR emission, with arena cleanup and no fabricated diagnostic/partial instruction; constant leaves retain the allocation-free path. Units and format checks pass. Repair-advice/nonvalue/static-function CLI integration passes 299/635/25 checks; all 1,421 public source checks and 506 accepted lowerings preserve exact old/new exit/stdout/stderr. All 1,791 conformance cases pass with exact corpus coverage.
The formerly aborting invalid-atomic check now returns exactly one E7005 at 2:9 without stderr; its complete found type is byte-identical to the independent 655,362-byte expectation. A separate correct 65,536-array parameter check accepts without output. A struct field containing 16,384 arrays then confirms remaining native recursion in source-to-AIR type conversion: 4,425 airType frames, exit -6, no JSON. Only child core capture is disabled, and no timeout ends a probe. Source-to-AIR repair, Ty equality and closing query paths keep Q-059 open; Q-060 validation and Phase 6 gates remain separate. No syntax/feature/code/bundle growth, runtime/effect/ownership rule, generic guard or accepted-depth limit is introduced. No fresh Claude review is claimed.
Source-to-AIR type conversion
The confirmed 16,384-array struct-member airType failure is repaired by an iterative output-target cursor. Array/wrapper nodes are allocated in the original outer-to-inner order; each target is the local root or stable newly owned output storage, never source Ty storage. Only the completed root is returned. A failed allocation propagates host OutOfMemory without publishing a partial type/module; already allocated nodes remain in the caller's arena as before. There is no work buffer, new metadata allocation or API change. Leaf indices, wrappers, array lengths, feature/ownership effects and all source/verifier rules remain unchanged.
Independent shallow comparison covers 2,352 leaf/array/wrapper shapes, every registered capability and internal wrapper, plus allocation-free leaves. A 65,536-level mixed conversion is inspected and freed iteratively; exactly one output allocation per constructor proves no additional work allocation or borrowed source node. Per-node request lengths/alignments, OOM points, byte/allocation counts and cleanup match the old recursive derivation on a 64-level mixed type. Arena backing growth is deliberately not an equivalence oracle: in-place resize availability can differ between two arenas. Units/format checks, nominal/Copy-content/static-function integration (110/119/25), all 1,791 conformance cases with exact corpus coverage and old/new checks/lowerings (1,421/506) pass.
Complete checks of structs with 16,384 and 65,536 array levels now accept without output. A separate 65,536-level source return-equality input confirms the next native failure in Ty.eql (10,001 frames, exit -6, no JSON). Core capture alone is disabled; no timeout ends a probe. Source equality and closing query paths keep Q-059 open; Q-060 validation and Phase 6 gates remain separate. No normative/bundle/feature/code, runtime/effect/ownership or accepted-depth limit changes. No fresh Claude review is claimed.
Source type equality
The confirmed Ty.eql failure is repaired with two type cursors and no allocation or mutation. Tag checks still precede descent, each array length is checked before its element, integer/capability names compare string contents, and nominal types compare declaration indices without expanding their graph. All wrapper and leaf identities are unchanged. An independent shallow copy of the old comparator covers every pair of leaf/array/wrapper shapes, including equal names in different storage and zero/max-u64 lengths. Separate 65,536-level mixed trees test equality in both directions and differences at the leaf, interior array length, interior wrapper and outer tag.
Units/format checks and all 1,791 conformance cases pass with exact corpus coverage; all 1,421 public source checks and 506 accepted lowerings preserve exact old/new exit/stdout/stderr. Complete return-equality checks now accept at 16,384 and 65,536 array levels without output. Changing the deep return leaf to u16 yields exactly one E7005 at 2:655407, with independently verified full found/expected types (655,362/655,363 bytes) and no stderr. A separate deep Copy-array move probe yields E7006/move_copy at 65,536 levels with its complete type; no native failure is observed in that query path. Only child core capture is disabled; no timeout ends a probe. Closing source-query inventory and Q-060 validation remain open, as do the independent Phase 6 gates. No normative/bundle/feature/code, runtime/effect/ownership or accepted-depth limit changes; no fresh Claude review is claimed.
Remaining source linear queries
Call-path inspection finds native recursion in Lowerer.isLinear's array descent and needsLinearType's signature feature scan. The latter's existing guard depends on module cardinality (types.len + 32), so it is not a constant stack bound. Both now use explicit cursors without allocation. Whole-value linearity still follows arrays only and stops at a prepared nominal-cache entry or the original terminal classification. Feature discovery retains its exact guard, named-leaf handling, qualifying wrapper set and content-query-before-depth-increment order. This is an inspection-driven robustness change: the preceding 65,536-level Copy-move CLI probe did not reproduce a native failure in either query.
An independent shallow copy of both old queries covers all leaves/wrappers, array lengths, mixed shapes and initial depths around the guard. Deep helper tests traverse 65,536 arrays ending in Copy/linear nominal leaves and 65,536 ref edges under a complete property snapshot of 65,536 declarations. The feature scan retains true at initial depth 32 and false at 33, pinning its inclusive boundary. This constructed snapshot tests the helper stage, not complete CLI acceptance of that module. Units/format checks, source linear/nominal CLI integration (49/110) and all 1,791 conformance cases pass with exact corpus coverage. All 1,421 public source checks and 506 accepted lowerings preserve exact old/new exit/stdout/stderr.
The closing inventory separately confirms source SSA zero generation as a remaining failure: at 16,384 array levels above a Plain record, a var initialized with zero aborts with 10,001 Lowerer.zeroValue frames, exit -6 and no JSON (82,026 input bytes). The existing SSA lowering rejects record leaves with E7006/zero_not_zeroable; AIR's broader zeroability and the unresolved source policy Q-056 are separate. Only child core capture is disabled; no timeout ends the probe. Source zero emission and the remaining specialization/call-path inventory keep Q-059 open; Q-060 validation and Phase 6 gates remain separate. No normative/bundle/feature/code, ownership/runtime/effect or accepted-depth limit changes; no fresh Claude review is claimed.
Source SSA zero emission
The confirmed Lowerer.zeroValue failure is repaired by counting the array chain, classifying its leaf, then emitting through a single arena-owned table of immutable parent pointers. Unsupported leaves retain the implemented E7006/zero_not_zeroable before any traversal allocation or instruction emission; this does not resolve Q-056 or adopt broader source zeroability. Allowed leaves remain integers and bool. The original constant precedes array.splat instructions from inner to outer, retaining lengths, source type storage, names, spans, feature state and constant-group markers. The table adds only compiler metadata; its OOM propagates the existing host error. Completed private instruction prefixes may survive a later emission OOM as before, but the public lower wrapper returns that error rather than publishing partial AIR. Runtime/verifier rules, allocation authority, copies and fuel events are unchanged.
Independent shallow comparison with the old derivation covers all leaves/wrappers and array lengths including zero/max-u64, reserved SSA-name collisions and exact error objects. A 1,024-level supported helper emits independently assembled exact instructions, preserving the original outer type pointer. A 65,536-level unsupported helper rejects without allocating even with a failing allocator; emitted prefixes and arena cleanup are checked across allocation failures on a supported chain. Units/format checks, independent-error integration (234 checks), reason integration (229 checks over 113 public E7006 fixtures), and all 1,791 conformance cases pass with exact corpus coverage. All 1,421 public source checks and 506 accepted lowerings preserve exact old/new exit/stdout/stderr. Twelve generated source programs preserve byte-identical lowering and 46 old/new run records across zero/final fuel boundaries; their nested u8/bool values are independently checked through depth 512.
Complete checking of the previously failing 16,384-level source, and a 65,536-level counterpart, now returns exactly one E7006/zero_not_zeroable at 3:32 without stderr. Only child core capture is disabled; no timeout ends a probe. The supported deep-helper result is not a claim of complete CLI acceptance of its varying-length type. Specialization/call-path inventory keeps Q-059 open; Q-056 policy, Q-060 closing validation and Phase 6 gates remain separate. No normative/bundle/feature/code, ownership/runtime/effect or accepted-depth limit changes; no fresh Claude review is claimed.
Composed specialization identity
At f5e2af1, a recursive generic call adding 31 or 63 arrays around T aborts before the fixed active-expansion guard: the 272/432-byte sources produce no JSON and exit -6, with 1,851/2,340 identity frames and 61/39 instantiate frames. Adding one array instead reaches the existing depth-64 E7006; a single 64-array argument reaches the existing structural-traversal E7006. The guarded ty query can return an already composed environment argument, so it does not bound the subsequent recursive identity writer. These are executed failures, not a proposed wider source depth limit. Only child core capture is disabled; no timeout ends probes.
The identity writer now emits prefixes through a type cursor and stores suffix lengths/spans in explicit arena-owned frames. Its leaf checkpoint and each inner-to-outer closing checkpoint retain the original >16,384-byte test and exact offending span. Named defining-module identities, generated-type/function keys, capability/file spelling and punctuation are unchanged. It does not add a prefix checkpoint or alter expansion/structural/key/count limits, reuse, sorting or SHA-based AIR names. Host OOM propagates before a complete key/module is published; private prefix bytes retain their existing partial-output behavior, and caller-arena lifetime owns the metadata.
Independent shallow comparisons cover scalar/nominal/generated names, capabilities, file modes, static functions, all wrappers, array lengths and prefixes around the exact byte boundary, including complete error objects and intermediate bytes. Writer-only deep fixtures produce an independently assembled 4,095-array key (16,382 bytes), reject the next array at its outer closing span (16,386 bytes), and reject a 32,768-array prefix at the original leaf checkpoint. These helper fixtures are not full source acceptance claims. Failed allocations check propagated OOM, prefix bytes and arena cleanup. Units/format checks and generic/static-function CLI integration (42/25 checks) pass; both new conformance regressions pin code E7006, and hosted checks pin implementation_limit/name/call-site provenance and identical check/lower/report/run/explore diagnostics.
Both previously failing growth sources now reach one E7006/implementation_limit at 2:35 without stderr; the one-array and single-64-array results retain their prior behavior. All 1,421 pre-existing public source checks and 506 accepted lowerings retain exact old/new exit/stdout/stderr. The full 1,791-case snapshot plus the two added focused regressions cover all 1,793 current conformance files exactly, with every case passing. Closing call-path inventory keeps Q-059 open; Q-056, Q-060 validation and Phase 6 gates remain separate. No normative/bundle/feature/code, runtime/effect/ownership or accepted-depth limit changes; no fresh Claude review is claimed.
Best-effort field type lookup and closing inventory
The closing inspection finds native recursion in typeOfNoFail, called by
peekType/use inference. At d98ddbc, a shallow r.x.len expression over a
record's nested-array field accepts depth 4,096, but aborts at 16,384 and
65,536 with 10,001 typeOfNoFail frames, exit -6 and no diagnostic JSON.
Source arrays use [T; N]; the failing inputs are 65,662/262,270 bytes.
Only child core capture is disabled; no timeout ends a probe.
The query now validates the chain and resolves its leaf before allocating,
then constructs output with a fresh-node cursor. Its restricted name/array
classification and length rules are unchanged. OOM-to-null was retained at this historical checkpoint; the Q-061 host-OOM follow-up supersedes that error policy and renames the helper queryAnnotation.
Invalid/unknown leaves allocate nothing. Nodes are allocated outer-to-inner
instead of inner-to-outer; request counts, sizes and alignments match the old
query, and a partial private type is never returned. The caller arena owns
partial storage on failure. No verifier, runtime, ownership or syntax rule changes.
Independent shallow comparisons cover all recognized leaves, unsupported constructors and valid/invalid nested lengths. A 65,536-node output is inspected and freed iteratively; invalid deep leaves/lengths allocate nothing. Every one of 64 node-allocation failures retains null, no diagnostic and complete cleanup. Units/format checks and all 1,793 conformance files pass with exact coverage; all 1,423 public source checks and 506 accepted lowerings retain byte-identical old/new exit/stdout/stderr. Nominal CLI integration passes 130 checks, including deep formatting/lowering, source/AIR checks, report parity and scalar execution. The complete formerly aborting checks now accept without output. These tests do not materialize a deeply nested runtime value.
The production inventory closes Q-059's compiler type-traversal scope: loops/continuations cover unbounded type descent, and remaining recursive type predicates retain their pre-existing fixed guards. Expression/statement depth is a separate scope. Q-056 policy, Q-060's unfinished full per-step GC validation and Phase 6 exit gates remain open. No accepted-depth limit, normative/bundle/feature/code growth or fresh Claude review is claimed.