interp: evaluate cache-free nominal sizes without recursion

This commit is contained in:
dev committed 2026-10-10 11:05:22 +03:00
1 parent c9064418bd
commit 897f538840
7 files changed
+218 -43

No files matched your search

+6
View File
@@ -433,4 +433,10 @@ The [Q-060 JSON increment](../design/runtime-value-depth-audit.md#runtime-value-
Units/format checks, test-extended and all 1,791 current ordinary conformance cases pass; the added pair also passes per-step collection in Debug. Forty-four old/new shallow records are byte-identical. The prior full Debug collector run has no completion result (785 passing records); its process disappeared, and a replacement full ReleaseSafe per-step run is in progress, retaining safety checks. No incomplete run is counted as a pass. There is no normative/bundle/feature/code change or new depth limit. Q-060's closing call-path audit and Q-059's uncached nominal queries remain open; the cache-free public runtime entry concern is inspection-only. Phase 6/contract gates remain open. No fresh Claude review was available.
## Cache-free nominal runtime size queries (2026-10-10)
The [Q-059 nominal size increment](../design/air-type-depth-audit.md#cache-free-nominal-accounted-size-queries) replaces recursive uncached sizing with temporary explicit continuations. The internal Zig query API now takes a host allocator and propagates metadata OutOfMemory separately from arithmetic overflow; runtime callers propagate it before authority charging. Cached reads, the static metric, quota/release behavior and instruction accounting are unchanged. The old direct 32,768-declaration query aborts; the new query returns one byte. Parsed, verified cache-free programmes at nominal depths 1,024 and 4,096 run successfully before and after, retaining six instructions; no old runtime failure at those depths is claimed.
Units/format checks, test-extended and all 1,791 ordinary conformance cases pass. Tests compare 7,168 shallow queries with an independent arithmetic oracle, fail every temporary metadata allocation and check cached success/null and partial-cache behavior. Fifty-four cached/cache-free quota/fuel/collection pairs (108 verified runs) have identical outcomes and instruction counts. All 370 public AIR checks preserve exact old/new exit/stdout/stderr. No normative/bundle/feature/code change or depth limit is introduced. The earlier full ReleaseSafe per-step suite remains in progress; Q-059's nominal property queries, Q-060's closing audit and Phase 6/contract gates remain open. No fresh Claude review was available.
Both new copy cases also pass with collection before every instruction; their shallow sharing-preserving GC behavior is covered separately from the retained deep collector failure.