Issue #2495: A failed typed read names where in the value it failed (at $.contacts[1].mail)

Open and answer this issue on GitHub.

ready, json · opened 2026-11-21 · updated 2026-11-22 · 0 comments

Part of #1019

What it is

A failed typed read (members[S] and lists inside a grammar entry that takes a type) names where in the value it failed: the ParseError stack carries the field names and list indices as a path, so a message reads at $.contacts[1].mail after the excerpt. Decided by ADR-grammar-2 D3-D5 (now in ADR-grammar-typed-read-v1) and Part II 10.8, which already says it (architect, 2026-10-31). This is step 3d of #1019. A first run was blocked because winnow-grammar 4f8e6691 drops the item N frame on a Cut; the architect decided that the backend numbers a Cut error in a repetition as it numbers a Backtrack one, and j8 built that in winnow-grammar e9de602c (then local, for the main session to push upstream; the backend’s clippy failure at src/rt.rs:711 was to be fixed before the push).

To build

  1. If the winnow-grammar pin does not yet hold the Cut numbering (e9de602c or its upstream equivalent), move the pin to a revision that does.
  2. The path on the ParseError stack: field marker rules, and list markers __nikaia_list_first / __nikaia_list_elem read with the item k frame outside them; the __nikaia_* frames are not listed; the path is recorded on the failure’s return path only. Test: a .nika in tests/compiler/tests/ reading a nested struct with a bad field in the second list element, its .stdout showing at $.contacts[1].mail after the excerpt.

Done when

A typed read that fails inside a nested field of a list element reports the path (at $.contacts[1].mail) after the excerpt, with no __nikaia_* frame in the message, and the test above passes; the commit that builds item 2 says Fixes #N.

Split from #1019 by Claude Code

Back to Open Issues