cli: query field annotations iteratively and close type-depth audit
This commit is contained in:
1 parent
d98ddbc073
commit
46bd29953f
6 files changed
+291
-10
No files matched your search
@@ -455,6 +455,8 @@ Compatibility impact is explicit: oversized values/frames formerly accepted now
|
||||
|
||||
## Q-059 — AIR type-syntax nesting and native recursion
|
||||
|
||||
**Resolved, 2026-10-10, for the compiler type-traversal scope in the [closing inventory](type-traversal-inventory.md).** The final inspection found another unguarded type walk: `typeOfNoFail`, reached by shallow `r.x.len` expressions with deep field annotations. At d98ddbc, 16,384/65,536 levels abort with 10,001 query frames and no diagnostic JSON; the iterative repair accepts both. All production paths in the inventory now use loops/continuations or their unchanged fixed-depth guards. Units, format checks, all 1,793 conformance files with exact coverage and deep source/AIR CLI integration pass. This adds no syntax-depth limit or semantic rule. Expression/statement recursion, fabricated cyclic host pointers and Q-060's runtime validation are outside this resolution. The following paragraphs retain the historical investigation states.
|
||||
|
||||
Source inspection during Q-058 finds recursive `parseType` in `src/air/parse.zig` without an explicit syntax-nesting bound. Size/property traversals also use native recursion over finite anonymous type syntax. **Unverified:** no parser stack-exhaustion reproducer has been run; syntactic finiteness alone does not establish a bound on native stack use.
|
||||
|
||||
2026-10-09 [executed audit](air-type-depth-audit.md): a 36,971-byte input with 4,096 length-one nested arrays aborts with a traceback containing thousands of parseType/parseCompoundType frames, rather than a diagnostic. The iterative parser repair accepts that input and unit-tests 32,768 levels, preserving old/new output on 364 public AIR files and constructor/error probes. A subsequent 16,384-depth check still aborts in verifier sizeQuery/sizeValue; that remaining failure is now verified. The original unverified note describes the state before these probes. No syntax-depth acceptance limit is introduced; Q-059 remains open for size, property, validity, equality and formatting traversal audits.
|
||||
@@ -512,3 +514,9 @@ The [runtime value-size increment](runtime-value-depth-audit.md#runtime-value-si
|
||||
The [runtime value JSON increment](runtime-value-depth-audit.md#runtime-value-json-repair) removes recursive value serialization and bypasses the outer stringify's fixed nesting table for internal payloads. Exact encoding/options, outer-container state, writer/allocation failure and deep returned-payload lifetimes are tested; the formerly failing CLI now emits a complete record in deterministic and hosted profiles. All five confirmed Q-060 failure paths have repairs, without a new limit or trap. Q-060 remains open for closing call-path checks, including the inspection-only cache-free public verification/runtime entry path and its connection to Q-059's uncached nominal queries; no verified failure on that path is claimed yet.
|
||||
|
||||
The [cache-free runtime increment](runtime-value-depth-audit.md#cache-free-runtime-size-query-path) removes the recursive accounted-size fallback available through public verification/runtime entry. All runtime size callers propagate temporary metadata OOM before authority charging, retaining quota, fuel and ownership behavior. The deep query-only failure is independently reproduced and repaired; verified library entry and cache equivalence are separately tested. Q-060 remains open for closing traversal checks and full per-step validation; no new normative limit, trap or diagnostic is introduced.
|
||||
|
||||
## Q-061 — Source expression/statement nesting and native recursion
|
||||
|
||||
Inspection during Q-059's closing inventory finds native recursion through source expression parsing (`binary`/`unary`), expression queries (`peekType`/`useIn`) and generic expression transformation (`expression`/`walk`). The fixed generic type/instantiation guards do not establish a bound on arbitrary expression or statement nesting. **Unverified:** no expression/statement stack-exhaustion probe has been run in this audit; this entry records inspection risk, not an observed failure or a new acceptance rule.
|
||||
|
||||
Audit these paths separately with finite public/generated source inputs before claiming whole-frontend bounded native-stack processing. Prefer explicit continuations preserving existing syntax, evaluation/query order, diagnostics and OOM behavior. A new depth rejection requires a normative decision; Q-059's type-traversal resolution does not authorize one.
|
||||
Reference in new issue
Block a user