Reject duplicate state ID attributes in the script state probe #123
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!123
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/123/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Vonsek on GitHub · 2026-11-21 16:39 UTC · original
Vonsek:script-duplicate-state-ids→main· +13 −2 · 3 files · 2 commits · merged 2026-11-21 17:20 UTCChange
Follow-up to #102.
inspect_treeintools/script_state_probe.pylet the last of severalidattributes on one state node win silently, whilestate_indexintools/script_path_replay.pyraisesDuplicate state ID attribute. The probe now raises the same error for a state node with more than one label-kindidattribute, so both tools treat duplicate state IDs the same way. A sentence in the state-probe section ofdocs/experiments.mddescribes this for contributors who run the probe.Verification
python -B tests/script_state_check.py: 4 tests, OK. The newDuplicateStateIdTestscase fails without the probe change and passes with it. It merges cleanly with #102.Windows: at
3a24823on Windows 11 build 26200.9974, VS Build Tools 2022 17.14 (MSVC 14.44.35207), Windows SDK 10.0.26100, Python 3.12:python -B tests/script_state_check.pyran 4 tests, OK, andctest --preset dev --no-tests=error -R script_state_literals -Vpassed (1/1).Evidence and follow-up
The regression is a synthetic node and attribute list built in the test, with no external fixture and no local data. Assumption: only label-kind (5)
idattributes count as state IDs, matching the replay and #102. Duplicates of other kinds are ignored, as in the replay.