fix: insert VALUES between-values hint points at comma not close-paren
The ambient-hint fallback in ambient_hint_core_in_mode parsed schemalessly, so the type-blind grammar closed an `insert … values (…)` tuple after the first value and the "Next:" hint pointed at `)`. With a schema available the walk knows the remaining columns and the correct next token is `,`. Parse the fallback with the schema cache so the expected-token prose matches the rest of the (already schema-aware) hint ladder. Also corrects wrong-arity closed tuples where the schemaless parse accepted the input and the hint said "submit with Enter" for a command the schema-aware parse rejects — the hint now surfaces the accurate error. Three typing-surface snapshots updated to match. Docs: ADR-0022 Amendment 3 (+ README index) records the schema-aware fallback; requirements.md H1a cites the hint-accuracy improvement.
This commit is contained in:
@@ -535,7 +535,15 @@ handoff-14 cleanup; 449 after B2/C2.)
|
||||
value-count class (`insert.form_b_positional_count_mismatch_note`),
|
||||
plus a walker-level `diagnostic.insert_arity_mismatch_form_b`
|
||||
ERROR that lights the `[ERR]` validity indicator at typing
|
||||
time). A systematic pass is still pending.
|
||||
time; **issue #2 / ADR-0022 Amendment 3, 2026-05-29** made the
|
||||
ambient-hint fallback rung schema-aware so the "Next:" prose
|
||||
names the schema-correct next token (`,` between values, `)`
|
||||
after the last) instead of the type-blind close-paren, and so a
|
||||
wrong-arity closed tuple surfaces the real parse error rather
|
||||
than a misleading "submit with Enter"). A systematic pass is
|
||||
still pending; simple-mode wrong-count tuples still get a generic
|
||||
expected-token message rather than the friendly arity diagnostic
|
||||
advanced mode shows (issue #17).
|
||||
- [ ] **H2** `hint` provides contextual help for the current
|
||||
input or the most recent error.
|
||||
- [ ] **H3** `help` provides general reference and per-command
|
||||
|
||||
Reference in New Issue
Block a user