Browse Source
A word rejected by an OPTIONAL argument's allocation screen (G-071 restricted-choice screen, or the basic int/double/bool/number/dict type screen) that subsequently overflows the argument list now reports the specific rejection instead of "Received more values than can be assigned": - choiceviolation naming the word and allowed choices, with -badarg/-badval and the final-validation message template (Leading/Trailing argument attribution), for choice-screen rejections - typemismatch naming the declared (normalized) type, with -badarg/-badval, for basic-type screen rejections Mechanism: private::get_dict_can_assign_value returns a 'rejection' record (single-member clauses only; literal-category mismatches deliberately not recorded); get_dict_form collects first-rejection-per-word from the three allocation call sites (leader/value split trial, leaders loop, values loop) into a per-form store; the two toomanyarguments raise sites prefer a recorded rejection for the unassignable word. Genuinely-surplus words still report toomanyarguments; words consumed by later slots parse unchanged; multiform selection (rank_form_failures) untouched. errorselection.test _GAP pins flipped to the pointed expectations (pre-fix behaviour pinned in the previous commit). punk::args buildversion 0.12.0 -> 0.12.1. Closeout: G-082 flipped achieved + archived (index -> GOALS-archive.md, detail -> goals/archive/ with mechanism/verification/residue recorded); G-073 note updated to point at the new rejection-record seam; src/modules/AGENTS.md authoring-ergonomics bullet re-documented (-optional 0 workaround no longer needed on >= 0.12.1; make.tcl keeps it - it runs against the bootsupport 0.12.0 snapshot). Project version 0.12.28 + CHANGELOG. Verified: full punk/args suite 228/224/0-failed (4 intended skips) and punk/ns 57/57 under Tcl 9.0.3; errorselection.test 7/7 under Tcl 8.7; make.tcl frobnicate still pointed; goals_lint clean. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.commaster
10 changed files with 192 additions and 27 deletions
@ -1,4 +1,4 @@
|
||||
[project] |
||||
name = "punkshell" |
||||
version = "0.12.27" |
||||
version = "0.12.28" |
||||
license = "BSD-2-Clause" |
||||
|
||||
Loading…
Reference in new issue