Repository navigation
Conversation
Add local-reference TOML rules, synthetic matching and sequence tests, presented-frame wiring, structured events and an automated retail-title input example. Assisted-by: Codex (GPT-6.1-Sol)
|
Just a simple testing framework to help with automation on test runs 🙂 |
luckyteagirl
left a comment
There was a problem hiding this comment.
A, wait 0.2, A is accepted, but each A pulse occupies a 0.2-second window, so the two windows touch: [0, 0.2) and [0.2, 0.4). Engine::buttons returns A across the boundary and can emit two pressed events, while GameInput's callback poller sees no button-up state and therefore one continuous hold. Could the parser reject or coalesce consecutive same-button presses with no release interval (or document that this sequence is a hold)? A small synthetic test polling at 0.19, 0.20, and 0.21 seconds would show the missing release. This is source review only; the default 0.8-second spacing and the supplied example are unaffected.
|
Test report: passes on NVIDIA. Exact head Tested
Not tested
Claude Code (Claude Opus 5.5) ran the tests and wrote this report. |
Head:
de2292ead5eebcae972a967d697d8e4dbbe84173, based on mainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. Includes eager host-path loading before VFS initialization, a 6.5-second warning countdown wait, and a three-second terms-screen transition wait in the local-reference example.Test runs of the retail title get through first-run and legal screens by timed presses. Cache state changes load time, so agents lose runs to stuck screens or toggled checkboxes. This adds frame-matched virtual-pad rules and JSON events that automated launch scripts can wait on.
What is in it
XCL_INPUT_RULES=<local TOML file>, with references resolved beside that file. Rules and reference thumbnails load once at host startup before VFS hooks remap host drive paths. RequiresXCL_FRAME_DUMP(use2for responsive matching). Uses the existing presented-frame readback and existing TOML/JSON dependencies.A 64×36 grayscale matcher, normalized region and mean absolute difference threshold. One active sequence; ordered rules; once or repeat with cooldown. Missing references disable their rule and fallback. No game image ships in the repository.
examples/retail-input-rules.tomland the README recipe: timed A through 54 seconds; fallback A from 57 seconds until the legal-screen match; DOWN, wait 6.5 seconds, DOWN, A, then privacy/terms/confirmation. The README also describes an optional second terms-frame rule to gate that transition. References and thresholds must be calibrated locally.Related: #609 (hold duration), #1765 (retain presses until read), #2449 (live input file); #42 supplied the test-report workflow. This retains the existing 200 ms pulse semantics and does not implement input acknowledgement.
Schema (TOML):
Automated use:
Capture with
XCL_FRAME_DUMP=2; keep your own Legal Notices frame with Copyright selected asreferences/legal-notices.bmp. Never commit game output.Copy the example rules file beside
references/. Check target/non-target distances locally; threshold 5 is a starting point, not a measurement of the new matcher on the title.Set
XCL_NETWORK=0,XCL_FRAME_DUMP=2,XCL_INPUT_RULES=<rules file>andXCL_PRESS_AT=6:A,9:A,12:A,15:A,18:A,21:A,24:A,27:A,30:A,33:A,36:A,39:A,42:A,45:A,48:A,51:A,54:A. Run with the usual timeout; parse JSON afterGameInput: input_ruleand wait forevent=completed,rule=legal-notices.Example event (illustrative, not a measured run):
Other events are
pressed(button),completed, anddisabled(reason). Pulses last 200 ms. An unmatched reference never starts a rule. Config errors disable all rules; an unreadable reference disables its rule and fallback. Frame dumping adds overhead, so comparison arms need identical settings.Tested
cargo +stable-x86_64-pc-windows-msvc build --workspacepassed.cargo +stable-x86_64-pc-windows-msvc test -p xcl --lib input_rules: 7 passed, 0 failed, 0 ignored, 0 skipped, 1336 filtered out. Tests were written before implementation; the first execution was deferred until the rig build window. No red test run has been claimed.cargo +stable-x86_64-pc-windows-msvc test --workspace --no-fail-fast -- --test-threads=4, withXCL_NETWORK=0: 1,438 passed, 4 failed, 47 ignored across 37 result blocks; 26 explicitSKIPPEDdiagnostics (subchecks, not additional test cases). Exit 101. Library: 1,312 passed, 4 failed, 27 ignored. Every other target passed. The four failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3, seeds 70/545/1019/1507,CreateComputePipelineStateout of memory (0x8007000E). They also fail onmainb49be18on this rig, tracked by #1905. Skips include unavailable wave64, unsupported f16 variants, no heap windows, and driver-cache disabling requiring Windows Developer Mode. Skipped checks are not coverage.Hardware available: Windows 11, Ryzen 7 9800X3D, 62 GB RAM, RTX 5090. Targeted tests use only synthetic data and do not initialize the GPU.
The workspace build, seven filtered tests and whole suite were repeated after the eager-load change: identical totals and the same four fuzz failures. Current head changes only the example TOML and README after that tested runtime revision.
Functional check (Claude Code, Claude Opus 5.5), run 3 with this head's example: passed. Frame dumps show Privacy checked at 101.6 s, Terms checked at 103.4 s, Confirm pressed at 104.8 s, and the title proceeding into loading. Host-path loading and frame matching worked. The 6.5-second wait accounts for Next becoming enabled only about 5.0–5.3 seconds after the first DOWN on this rig. TOML parsing and the exact sequence were checked without rebuilding (runtime unchanged). This is one successful functional run, not a guarantee across machines or frame rates.
Match differences in runs 1–3 were 0.76, 0.68 and 4.29, against threshold 5 (checked in each run's log). Earlier local-screen measurements put other screens at 26 or more; these are calibration observations, not synthetic-test results or a bound for all machines.
Tested by others (thank you):
de2292ea: whole suite 1442 passed, 0 failed, 47 ignored; the 7 new tests pass; skips the same as onmain. No title run. GameInput: match presented frames to scripted input rules #2637 (comment)Not tested
AMD/Intel, other resolutions/HDR, repeat-rule behavior in-title and the optional second frame-gated terms rule have not been tested. No references or output dumped from a title are included. Input still must be polled during the pulse, as with
XCL_PRESS_AT; the example's countdown timing can need adjustment on other rigs.Run 3 matched at 4.29, close to the threshold; if the rule does not fire on your machine, raise threshold toward 10 (other screens measured 26 or more in earlier local measurements). Check your own target and non-target screens before adopting that threshold.
Regression run
main:This PR (
de2292e):Both: the retail title,
-Seconds 200, the same scripted input, RTX 5090. These runs don't setXCL_INPUT_RULES, so they are a regression check of the default path; the rules were checked in the functional run under Tested.Edge cases we would like tested
Use a copy of the example rules file and your normal launcher with
XCL_NETWORK=0.| Scenario | Configuration / command before launching | What to look for |
| --- | --- | --- |
| Missing reference | Set
reference='missing.bmp'in the local rules file. |event=disabledfor that rule; no rule or fallback presses. ExistingXCL_PRESS_ATis independent. || Two rules match one frame | Duplicate a matching rule with a different name, both
once=true. | First rule in file starts alone. The second can start only on a later sampled frame after the first completes. || Never matches, fallback active | Use a valid reference from a different screen and
threshold=0.0. |$fallbackpressed events at start + n×interval, no rule completion; launcher timeout still applies. || Frame dumps off |
Remove-Item Env:XCL_FRAME_DUMP -ErrorAction SilentlyContinue|$configdisabled warning; no rule or fallback presses. || Different resolution / HDR | Capture references using the same launcher settings; compare with and without
XCL_FRAME_DUMP_FULL=1. | Matching on intended screens only; check diff and unsupported decoded formats. Recalibrate threshold if needed. || Slower or faster load | Repeat the same launcher/env recipe with different cache warmth and a suitable run timeout. | Match follows the intended screen rather than a fixed start time; all checkboxes and Confirm must be verified in frames. If the match occurs before 54 s, remaining independent
XCL_PRESS_ATpresses can overlap the sequence: shorten/remove that setup schedule for the faster run. A slower warning countdown may need a longer wait or further frame gating. |These are requested title-level checks, not results. Synthetic tests cover ordering, missing-reference fail-safe, cooldown, sequence timing, JSON events and BMP orientation/padding.
AI use
Codex (GPT-6.1-Sol) wrote the implementation, the tests, the docs and the description, and ran the workspace build, the filtered tests and the whole suite.
Claude Code (Claude Opus 5.5) reviewed the diff, ran the functional runs in the retail title and the regression runs, and checked the logs. No code was imported from another project.
🤖 Generated with Claude Code