cli: evaluate source nominal properties with continuations

This commit is contained in:
dev committed 2026-10-10 14:18:14 +03:00
1 parent 53907ecf25
commit 4aad95c4a8
4 files changed
+390 -62

No files matched your search

+8
View File
@@ -148,3 +148,11 @@ At b23f3e6, the ordinary 16,384-array source aborts in type_properties.firstInva
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<u8> 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.
+2
View File
@@ -483,6 +483,8 @@ The [source annotation resolution increment](air-type-depth-audit.md#source-anno
The [source anonymous property increment](air-type-depth-audit.md#source-anonymous-property-scans) removes confirmed recursion from firstInvalid and the array-chain portion of known linearity. Both 16,384-array and own_array checks now accept, while non-Copy content retains E7005 at its original span. A separate 8,192-declaration probe confirms remaining linear/declaration native-stack exhaustion before and after this increment. Named-declaration repair and source Ty/query closing checks remain open; no acceptance limit or semantic rule changes.
The [source nominal property increment](air-type-depth-audit.md#source-nominal-property-continuations) repairs the confirmed linear/declaration failure with explicit argument/member continuations, retaining cache generations and known-parameter cycle states. An independent recursive nominal oracle checks ordered cache records; complete checking accepts the 8,192-Copy chain and rejects linear content with E7005. A separate 65,536-array invalid-atomic source confirms typeText native-stack exhaustion. Source Ty text/equality/AIR conversion and closing call-path work keep Q-059 open; no semantic limit or 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.
+6
View File
@@ -472,3 +472,9 @@ The complete 4,096-array check still accepts; 16,384 now reaches the next confir
The [Q-059 source-property increment](../design/air-type-depth-audit.md#source-anonymous-property-scans) makes syntax scanning and anonymous-array linearity iterative, retaining own_array priority, graph stops and nominal fixed points. The two complete 16,384-level source checks that previously aborted now accept; deep non-Copy content returns the original E7005. Tests cover 2,160 independent shallow anonymous comparisons, 32,768-level queries and zero work allocations on anonymous paths.
Units/format checks, Copy-content/generic CLI integration (119/32) and byte-identical old/new checks/lowerings (1,421/506) pass; all 1,791 conformance cases pass with exact corpus coverage. A separate 8,192-declaration source confirms the remaining linear/declaration stack failure before and after this increment. Named-source repair, source 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 nominal property continuations (2026-10-10)
The [Q-059 nominal-source increment](../design/air-type-depth-audit.md#source-nominal-property-continuations) replaces native argument/declaration recursion with explicit continuations, retaining environment/path binding, ordered fields/payloads and cache generation rules. The previously crashing 8,192-Copy declaration check accepts; linear content returns E7005. Independent ordered-cache comparisons cover 4,613 roots (three queries each), while deep mixed/cyclic graphs and allocation-failure cleanup pass.
Units/format checks, nominal/Copy-content/static-function integration (110/119/25), all 1,791 conformance cases with exact coverage and byte-identical old/new checks/lowerings (1,421/506) pass. A separate invalid-atomic source confirms typeText stack failure at 65,536 array levels. Source 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.