Browse Source
G-152 punk::args form-failure suffix-viability verdict: a candidate form
is marked viable iff every supplied word is a valid prefix and the
failure is pure exhaustion - fixing the witnessed false positive
(parse {frobnicate} classes the info form 'incomplete' identically to
parse {info}), documenting the noformmatch errorcode/formstatus class
vocabulary as a stable consumer contract, and marking viability in the
rendered per-form report. Enabler for G-044 completion; runtime
counterpart of the achieved G-074 static formcheck. Probe evidence in
the detail file. goals_lint clean.
Assisted-by: harness=claude; primary-model=claude-opus-5[1m]; api-location=anthropic.com
master
2 changed files with 23 additions and 0 deletions
@ -0,0 +1,19 @@
|
||||
# G-152 punk::args form-failure suffix-viability verdict (completion-grade classification) |
||||
|
||||
Status: proposed |
||||
Scope: src/modules/punk/args-999999.0a1.0.tm (multiform failure classification + noformmatch errorcode/formstatus consumer contract + render marking); src/tests/modules/punk/args/testsuites/args/ |
||||
Goal: A multiform parse failure reports a SOUND suffix-viability verdict per candidate form - a form is marked viable if and only if every supplied word was validly consumed as a prefix of that form and the failure is pure exhaustion at end-of-input (nothing already supplied contradicts the form) - exposed through a documented, stable machine-readable contract (the noformmatch errorcode classes / formstatus records) so consumers (cmdhelp narrowing, make.tcl help, G-044 completion) can select the still-satisfiable form, and marked distinguishably in the rendered per-form failure report. |
||||
Acceptance: against a tool-shaped multiform definition (literal action leaders; the info form requiring a value), parse of {info} reports form info viable and list/build/test non-viable; parse of {frobnicate} reports NO form viable (today's false 'incomplete' on the info form is gone); parse of {build -bogus} reports no form viable; the class vocabulary and errorcode/formstatus shape carrying the verdict are documented as a consumer contract in the module's own argdoc/doc surface; the rendered noformmatch output visibly distinguishes viable form(s) from impossible ones; existing args-suite pins pass unchanged apart from deliberately updated classification pins; the new verdicts are pinned in the args testsuite. |
||||
|
||||
## Context |
||||
|
||||
Raised by user review of 'make.tcl help tool info' output (2026-08-02, during the G-143 follow-on session): the one form still on track to be satisfied by supplying MORE args should be differentiable from forms that are impossible regardless of what is appended - feeding form selection and command-line completion. Probes (bootsupport 0.13.0 and dev module) found the channel largely present: the noformmatch throw carries `-errorcode {PUNKARGS VALIDATION {noformmatch forms {...} classes {...}}}` with forms RANKED best-first plus full -argspecs in the return options; the dev module adds per-form formstatus records (status/failureclass/badarg/message), rank_form_failures (literal-affinity + incomplete-first ordering) and the non-throwing parse_status surface. The GAP is semantic soundness, witnessed: parse {info} classes the info form 'incomplete' (correct - exhaustion), but parse {frobnicate} produces the identical classes, also granting info 'incomplete' although no suffix can satisfy it (the wrong word occupies the required leader slot). 'incomplete' today means "a required element was missing when parsing stopped", not "the supplied words are a valid prefix" - the classifier can grant it after mis-seating a contradicting word. Secondary gaps: the class vocabulary is not documented as a stable contract, and the rendered report differentiates only in prose kind, without marking viability. |
||||
|
||||
## Notes |
||||
|
||||
- Related: G-044 (proposed) - punk::args-driven interactive completion; this verdict is its core enabler (viable forms -> what tokens may come next). |
||||
- Related: G-150 (proposed) - cmdhelp form narrowing; a narrowing consumer of the same verdict for failed/incomplete lines (its accepted-line narrowing needs only parse success). |
||||
- Related: G-050 (proposed) - synopsis argument-validity marking; sibling status-aware render surface for the marking half. |
||||
- Related: G-074 (achieved 2026-07-13 - goals/archive/G-074-punkargs-multiform-ambiguity-lint.md) - static form-overlap analysis (formcheck); this goal is the RUNTIME per-invocation counterpart over supplied words, sharing the parse_status machinery. |
||||
- Overlap survey 2026-08-02: goals_xref paths src/modules/punk/args-999999.0a1.0.tm - the punkargs family as recorded in G-149's survey (G-044 G-050 named above; G-053 G-056 G-069 G-072 G-073 G-075 G-083 G-084 G-088 are unrelated parser/spec/render mechanisms); session siblings G-149/G-151 are render-surface work, this is parse-classification. |
||||
- Probe evidence (2026-08-02, bootsupport 0.13.0): {info} -> `classes {incomplete invalid invalid invalid}` over ranked `forms {info list build test}`; {frobnicate} -> identical (the false positive); {build -bogus} -> all invalid. Dev classifier: rank_form_failures orders by form_literal_affinity then incomplete-first. |
||||
Loading…
Reference in new issue