Add synthetic (id, type) state dispatch fixture #132

Merged
MarlomMedeiros merged 2 commits from upstream-pr/133 into main 2026-11-21 17:56:07 +00:00
MarlomMedeiros commented 2026-11-21 16:48:19 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MarlomMedeiros on 2026-11-21T16:48:19Z.


Summary

Follow-up to #19. Adds tests/script_dispatch_check.py, a self-contained synthetic fixture that demonstrates how a candidate (id, type) pair selects a state, while preserving the observation's documented limits.

  • Synthetic 16-node states library mirroring the serialized pattern: a default state, a sibling id collision split cleanly by type (item vs weaponitem), and a deeper location -> vehiclesize -> angle branch pair ending in distinct camera leaves.
  • Synthetic shopcomponents-style carrier: a kind-5 weapon attribute supplies id, the carrier node's name supplies type.
  • filter_siblings_by_type is a caller-side pre-filter; script_path_host.cpp stays untouched and its id-only -2 answer remains the conservative result.
  • Positive case (trigger_a, item) resolves node 4 -> preview-offset leaf; the nearby input (trigger_a, weaponitem) resolves node 6 -> deeper state -> camera leaf. Dropped siblings are asserted unreachable.
  • No game data: every digest is joaat of a synthetic label.

Limits preserved in the module docstring: (id, type) dispatch is inferred from serialized structure (not runtime code), the reference resolver is id-only, and the native event supplying the pair is still unidentified.

Test plan

  • python -B tests\script_dispatch_check.py out\build\dev\script_path_host.dll -v -> 5/5 OK
  • tests\script_path_check.py -> 3/3 OK
  • tests\script_state_check.py -> 3/3 OK
  • registered as script_dispatch_pairs in CTest; verified passing in the Windows CI run on this branch
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6531648788 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/133). Originally posted by [MarlomMedeiros](https://github.com/MarlomMedeiros) on 2026-11-21T16:48:19Z. --- ## Summary Follow-up to #19. Adds `tests/script_dispatch_check.py`, a self-contained synthetic fixture that demonstrates how a candidate `(id, type)` pair selects a state, while preserving the observation's documented limits. - Synthetic 16-node `states` library mirroring the serialized pattern: a `default` state, a sibling `id` collision split cleanly by `type` (`item` vs `weaponitem`), and a deeper `location -> vehiclesize -> angle` branch pair ending in distinct camera leaves. - Synthetic `shopcomponents`-style carrier: a kind-5 `weapon` attribute supplies `id`, the carrier node's name supplies `type`. - `filter_siblings_by_type` is a caller-side pre-filter; `script_path_host.cpp` stays untouched and its id-only `-2` answer remains the conservative result. - Positive case `(trigger_a, item)` resolves node 4 -> preview-offset leaf; the nearby input `(trigger_a, weaponitem)` resolves node 6 -> deeper state -> camera leaf. Dropped siblings are asserted unreachable. - No game data: every digest is `joaat` of a synthetic label. Limits preserved in the module docstring: `(id, type)` dispatch is inferred from serialized structure (not runtime code), the reference resolver is id-only, and the native event supplying the pair is still unidentified. #### Test plan - [x] `python -B tests\script_dispatch_check.py out\build\dev\script_path_host.dll -v` -> 5/5 OK - [x] `tests\script_path_check.py` -> 3/3 OK - [x] `tests\script_state_check.py` -> 3/3 OK - [x] registered as `script_dispatch_pairs` in CTest; verified passing in the Windows CI run on this branch
upstream-sync closed this pull request 2026-11-24 06:41:28 +00:00
copilot-pull-request-reviewer[bot commented 2026-11-24 06:41:28 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-21T16:48:31Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6006681611 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/133#pullrequestreview-6006681611). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/copilot-pull-request-reviewer%5Bbot%5D) on 2026-11-21T16:48:31Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
R0Y00 commented 2026-11-24 06:47:40 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T17:17:20Z.


The synthetic dispatch case is helpful for #19. Please register it in CTest next to script_path_check, pass the built script_path_host target, and verify the registered test runs on Windows CI.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7066361435 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/133#issuecomment-7066361435). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T17:17:20Z. --- The synthetic dispatch case is helpful for #19. Please register it in CTest next to script_path_check, pass the built script_path_host target, and verify the registered test runs on Windows CI.
MarlomMedeiros commented 2026-11-24 06:47:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MarlomMedeiros on 2026-11-21T17:54:34Z.


Done. Registered as script_dispatch_pairs next to script_path_links, passing $<TARGET_FILE:script_path_host>. Verified green in the Windows CI run on this branch (61/61 tests).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7066851817 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/133#issuecomment-7066851817). Originally posted by [MarlomMedeiros](https://github.com/MarlomMedeiros) on 2026-11-21T17:54:34Z. --- Done. Registered as `script_dispatch_pairs` next to `script_path_links`, passing `$<TARGET_FILE:script_path_host>`. Verified green in the Windows CI run on this branch (61/61 tests).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!132
No description provided.