[BUG](cli) `validate` reports a mistyped `theme` as a segment subtype error
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start in cli/error_formatting.py, especially select_most_likely_errors and _suppress_sibling_tag_noise, and trace how the DivisionArea and empty-model error groups are ranked. Reproduce with the division_area/region_land.yaml example after changing its theme as described. Done when validation reports the theme error instead of hiding it behind the segment union tag error; the payload names no specific test.
Written by the indexing model from the issue text.
Description
overture-schema validate does not report a wrong theme on a division_area. Copy reference/examples/divisions/division_area/region_land.yaml to typo.yaml, change theme: divisions to theme: division, and run COLUMNS=80 overture-schema validate typo.yaml. With #837 applied it exits 1 and prints:
(root)
→ Input tag 'region' found using get_discriminator_value() does not match
any of the expected tags: <SegmentSubtype.ROAD: 'road'>, <SegmentSubtype.RAIL:
'rail'>, <SegmentSubtype.WATER: 'water'>
Before #837 the same command printed the theme error, behind an "Ambiguous" warning:
⚠ Ambiguous: Data matches multiple types equally. Consider:
• Specifying --tag or --type to narrow validation
• Adding discriminator fields to clarify intent
─ Validation Failed ──────────────────────────────────────────────────────────
...
geometry MultiPolygon
theme "division" ← Input should be 'divisions'
type "division_area"
...
──────────────────────────────────────────────────────────────────────────────
The error now printed comes from the segment union, which is discriminated on subtype. region is the division area's subtype, and no segment takes it. The feature's real mistake, theme, is missing from the output.
The CLI groups each item's errors by the model that produced them, and select_most_likely_errors (cli/error_formatting.py) shows the best group. Here there are two groups. The DivisionArea group has the literal_error on theme. The other has the segment union's union_tag_invalid, which no model produced, so its group key is empty. _suppress_sibling_tag_noise keeps both: the tag error is not one it treats as redundant, because region is no segment's subtype. #837 ranks each group by a pair, (tag fields among theme, type and subtype that the group's model rejected, error count), lowest first. DivisionArea rejected theme and scores (1, 1). The empty group has no model, so it rejects nothing and scores (0, 1), and its tag error is shown alone.
Before #837 the groups were ranked by error count alone. They tied at one error each, which produced the "Ambiguous" warning, and the panel showed the theme error.
The same happens for any feature whose subtype no segment takes. Copying each of reference/examples/base/land-sand-example.yaml (subtype: sand, theme: bas), buildings/building-polygon.yaml (subtype: transportation, theme: building) and divisions/division/capital_of.yaml (subtype: locality, theme: division) with that one-line theme edit prints the segment union's Input tag '<subtype>' error. Before #837 each printed its theme error under the same warning.
This came up in review of #837, and this issue follows up on it.
- Dominant language
- Python
- Stars
- 219
- Forks
- 20
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 37
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OvertureMaps/schema
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OvertureMaps/schema#867 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
OvertureMaps/schema#694 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OvertureMaps/schema#693 ·
Maintainers usually reply within 1 day
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OvertureMaps/schema#675 ·
Maintainers usually reply within 1 day
-
[BUG](ci) `main` fails `make check` on unused `type: ignore` commentsPossibly taken @sethfitz claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
OvertureMaps/schema#899 ·
Maintainers usually reply within 1 day
All issues in OvertureMaps/schema
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
auto-reported bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
needs-triage type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
pollen-robotics/reachy_mini_conversation_app#631 ·
Maintainers usually reply within 7 days
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100