cli: convert source types to AIR iteratively
This commit is contained in:
1 parent
f18b41dd3d
commit
936d65359c
4 files changed
+240
-24
No files matched your search
@@ -164,3 +164,11 @@ The 65,536-array invalid-atomic source's confirmed typeText abort is repaired by
|
||||
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.
|
||||
@@ -487,6 +487,8 @@ The [source nominal property increment](air-type-depth-audit.md#source-nominal-p
|
||||
|
||||
The [source type text increment](air-type-depth-audit.md#source-type-text-repair) repairs the confirmed diagnostic printing failure with iterative prefix/suffix output and exact canonical/source naming. Host OOM propagates instead of supplying fabricated type strings. The deep invalid atomic now returns E7005 with its complete found type, and a correct 65,536-array parameter accepts. A 16,384-array struct member independently confirms the remaining airType native-stack failure. Source-to-AIR repair, Ty equality and closing query audits still keep Q-059 open. No semantic limit or rule changes.
|
||||
|
||||
The [source-to-AIR conversion increment](air-type-depth-audit.md#source-to-air-type-conversion) repairs airType using a constant-state target cursor with the same constructor allocations and host-error behavior. Deep struct-member checks now accept; an independent return-equality probe confirms Ty.eql native-stack exhaustion at 65,536 array levels. Source equality and closing query work keep Q-059 open; no accepted-depth limit or semantic rule changes.
|
||||
|
||||
## Q-060 — Native recursion while materializing runtime values
|
||||
|
||||
The [executed runtime audit](runtime-value-depth-audit.md) confirms that a verified one-byte value with 32,768 length-one nested arrays aborts inside zeroValue under `aji run --fuel 8`, rather than producing a run record. The instruction has not exhausted fuel. Iterative runtime traversal must preserve initialization, value shape, allocator/root lifetimes, collection safety and instruction accounting; adding a depth trap/acceptance limit needs a normative decision. At that baseline, recursive copying, value sizing, collection and serialization were additional audit candidates with unverified failure paths; the increment below records subsequent executed failures. Compiler type repairs in Q-059 do not resolve Q-060.
|
||||
|
||||
@@ -484,3 +484,9 @@ Units/format checks, nominal/Copy-content/static-function integration (110/119/2
|
||||
The [Q-059 source text increment](../design/air-type-depth-audit.md#source-type-text-repair) removes recursive and repeatedly copied ancestor strings, preserving exact spelling/source nominal names and resource feature discovery. Its internal fallible APIs propagate host OOM instead of generating shortened type facts or AIR. The formerly aborting deep invalid-atomic check returns one E7005 with the complete 655,362-byte found type.
|
||||
|
||||
Units/format checks, 3,696 independent shallow comparisons, deep mixed output and failed-allocation/cleanup tests pass. Repair-advice/nonvalue/static-function integration (299/635/25) and old/new source checks/lowerings (1,421/506) pass; all 1,791 conformance cases pass with exact corpus coverage. A correct 65,536-array parameter accepts; a 16,384-array struct member independently confirms remaining airType native-stack failure. Source-to-AIR repair, Ty/query closing checks, Q-060 validation and Phase 6 gates remain open. No normative/bundle/feature/code change or accepted-depth limit is introduced; no fresh Claude review is claimed.
|
||||
|
||||
## Source-to-AIR type conversion (2026-10-10)
|
||||
|
||||
The [Q-059 conversion increment](../design/air-type-depth-audit.md#source-to-air-type-conversion) replaces native recursion with an output-target cursor, preserving source/AIR type shape, constructor allocation order and error publication. Structs with 16,384/65,536 array levels now pass complete checking. Tests cover 2,352 independent shallow comparisons, 65,536-level construction without work allocation, and per-node OOM/order/cleanup equivalence.
|
||||
|
||||
Units/format checks, nominal/Copy-content/static-function integration (110/119/25), all 1,791 conformance cases with exact coverage and old/new checks/lowerings (1,421/506) pass. A separate return-equality input confirms the next failure in Ty.eql at 65,536 array levels. Equality/closing query checks, Q-060 validation and Phase 6 gates remain open. No normative/bundle/feature/code change or accepted-depth limit is introduced; no fresh Claude review is claimed.
|
||||
Reference in new issue
Block a user