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

Manually merged
github merged 2 commits from gh-pr/133/head into gh-pr/133/base 2026-11-26 21:29:13 +00:00
Owner

@⁠MarlomMedeiros on GitHub · 2026-11-21 16:48 UTC · original
script-dispatch-fixture → main · +441 −0 · 2 files · 2 commits · merged 2026-11-21 17:56 UTC

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
**@⁠MarlomMedeiros** on GitHub · 2026-11-21 16:48 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/133) `script-dispatch-fixture` → `main` · +441 −0 · 2 files · 2 commits · merged 2026-11-21 17:56 UTC ## 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
Issue #19 follow-up: serialized state libraries split sibling id
collisions by 'type', so a caller-side type pre-filter lets the
id-only reference resolver demonstrate a positive case and a nearby
input selecting a different state. The fixture models the pattern
with synthetic trees only and keeps the documented limits: dispatch
is inferred from structure, the runtime caller is unidentified, and
-2 remains the resolver's conservative answer.
Adds script_dispatch_pairs alongside the script state checks and passes
the built script_path_host target, so the fixture runs under the Windows
CI ctest invocation.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:29:11 +00:00
github manually merged commit 8c774edf29 into gh-pr/133/base 2026-11-26 21:29:13 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-21 17:17 UTC · original

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.

**@⁠R0Y00** on GitHub · 2026-11-21 17:17 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/133#issuecomment-7066361435) 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.
Author
Owner

@⁠MarlomMedeiros on GitHub · 2026-11-21 17:54 UTC · original

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).

**@⁠MarlomMedeiros** on GitHub · 2026-11-21 17:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/133#issuecomment-7066851817) 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).
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-21 16:48 UTC · original · reviewed

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.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-21 16:48 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/133#pullrequestreview-6006681611) · **reviewed** 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.