cli: parse qualified constructor paths iteratively
This commit is contained in:
1 parent
d39a422b2b
commit
371329f3f0
5 files changed
+227
-12
No files matched your search
@@ -385,20 +385,60 @@ No normative, source/AIR format, feature, code, bundle, acceptance-limit,
|
||||
ownership, runtime instruction or model result changes. Q-061 remains open;
|
||||
this generic increment has no external review yet.
|
||||
|
||||
## Parser qualified constructor paths
|
||||
|
||||
The generic follow-up identified a separate recursive Parser.exprPath, called
|
||||
for qualified enum variants and struct literals. A frozen pre-repair CLI
|
||||
(`aji-before-parser-path`, production at d39a422) independently aborts at
|
||||
16,384 fields for both forms, with empty stdout. Raw inputs and output are
|
||||
`parser-path-before-probes.json` and `parser-path-*.before.stdout/.stderr` in
|
||||
the ignored evidence directory.
|
||||
|
||||
Parser.exprPath now validates the root, computes the complete byte length and
|
||||
fills one owned spelling iteratively. Direct names and invalid roots allocate
|
||||
nothing. Grammar, generic arguments, constructor classification, token cursor,
|
||||
spans and syntax/error priority are unchanged. Checked size arithmetic and
|
||||
allocation failure propagate as host OOM, without a source diagnostic or
|
||||
public partial AST. The final string has caller-arena lifetime; allocation
|
||||
requests and failure-index outcomes need not match the former prefix copies.
|
||||
|
||||
The copied shallow recursive path oracle checks both named and invalid roots.
|
||||
Separate tests exercise 65,536 fields, exact component bytes, a single output
|
||||
allocation, zero-allocation answers and host OOM. Public parser tests check
|
||||
qualified enum/struct forms with and without type arguments, exact spans and a
|
||||
missing variant name at 65,536 fields. Every backing-allocation failure in a
|
||||
smaller constructor fixture propagates host OOM and releases its arena.
|
||||
Repaired CLI probes return E7002 with the complete name at line 2, column 38,
|
||||
for both forms through 65,536 fields (`parser-path-after-probes.json` and
|
||||
`parser-path-*.after.stdout/.stderr`).
|
||||
|
||||
Build, unit and Zig format checks pass. All 1,793 ordinary conformance cases
|
||||
pass with terminal exit 0 and exact unique corpus coverage
|
||||
(`parser-path-conformance.jsonl` and its audit). The expression-depth and grammar
|
||||
CLI suites pass 577 and 312 checks. Constructor regressions cover generic and
|
||||
nongeneric forms with exact E7002 records across check/lower/run/report/explore.
|
||||
Frozen old/new CLIs retain exact exit/stdout/stderr on all 1,423
|
||||
public source checks and 506 accepted lowerings
|
||||
(`parser-path-cli-compatibility.json`).
|
||||
|
||||
No normative, source/AIR format, feature, code, bundle, acceptance-limit or
|
||||
runtime/ownership rule changes. This repairs one callback; Q-061 remains open
|
||||
and no external review covers this increment yet.
|
||||
|
||||
## Remaining work
|
||||
|
||||
Current follow-up checks accept 16 parenthesized/mixed-call levels but abort
|
||||
Follow-up checks accept 16 parenthesized/mixed-call levels but abort
|
||||
with empty stdout at 1,024. A qualified enum variant returns E7002 at 16
|
||||
components but aborts in Parser.exprPath at 16,384. Raw evidence is
|
||||
`generic-followup-depth-probes.json` and `generic-followup-*.stdout/.stderr`.
|
||||
Generic transformation and its path callback above are repaired; the remaining
|
||||
inventory includes these observed parser failures and inspection-only risks:
|
||||
Generic transformation, its path callback and Parser.exprPath above are now
|
||||
repaired; the remaining inventory includes the other observed parser failures
|
||||
and inspection-only risks:
|
||||
|
||||
| Production path | Evidence and next scope |
|
||||
|---|---|
|
||||
| Parser `postfix`/`primary` through parenthesized `expr` | Confirmed failure at 1,024 levels; preserve grouping, precedence and spans. |
|
||||
| Parser `callArgs`, array/index/struct initializers, `ifExpr`, block/statement and match/arm expression entry | Mixed `1i64 + id(...)` calls have a confirmed parser abort at 1,024. Other callback depth behavior is unverified; include alternating forms, not only homogeneous spines. |
|
||||
| Parser `exprPath` | Confirmed qualified enum-variant abort at 16,384; preserve named-root classification, spelling, syntax/error priority and spans. |
|
||||
| Lowerer non-scalar `expr` callbacks: calls, fields/indices/places, arrays/structs, if/match/arms and blocks/statements | Native re-entry remains outside the repaired scalar driver; deep behavior unverified, including alternating scalar/non-scalar expressions. |
|
||||
| Lowerer use-after-region/liveness and assignment scans (`After`, first-use/read scans, `blockAssigns`/`stmtAssigns`/`exprAssigns`, match/select helpers) | Recursive AST walks inspected; audit their callers and finite deep inputs separately. |
|
||||
|
||||
|
||||
Reference in new issue
Block a user