You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three issues surfaced by the pre-merge review:
* Parser-constructed attr nodes were never source-stamped. Both the inline
`@`-attr path (`_build`) and the typed attr-child path (`_parse_attr_child`)
called `parent.set_attr(...)` which constructs a fresh MetaAttribute via
`MetaData.set_attr` (meta_data.py:61-69) without copying provenance — so
every parser-created attr node wore `CodeSource.DEFAULT` instead of a
`JsonSource`. Now: locate the just-set attr via `own_meta_attr` and call
`set_source(_current_envelope(...))`. Mirrors C# Parser.cs:1039
(`attrModel.SetSource(st.CurrentSource())`). Two regression tests cover
both call sites.
* `_parse_source` carved out a `<inline>` case and fell back to
`CodeSource.DEFAULT` while the parser's `_current_envelope` built a
`JsonSource(files=("<inline>",), ...)`. Two same-source errors carried
inconsistent envelope formats. Drop the carve-out — match C# Parser.cs:140
which only checks `Source is null`. No tests relied on the old behavior.
* `ERR_PROVIDER_ATTR_CONFLICT` was the only one of 29 MetaError sites that
omitted `envelope=`. Thread the current node into `_effective_schemas` and
attach `envelope=node.source`. Mirrors C# ValidationPasses.cs:593-596.
Test count: 494 → 496 (2 new tests; all pass).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments