test(scripts): the pipeline tour check's stale snapshot is older than calm's tolerance #627

Open
zeldaootr wants to merge 1 commit from zeldaootr/Longshot:fix-pipeline-tour-check-stale-snapshot into main
Contributor

Type: test · Risk: low · Tested on: Linux, no GPU (game-free check) · Needs: none

Why

tests/test_pipeline_tour.py has failed on main since the pipeline tour merged (#111), so main is red before a release candidate. The tour is right: calm takes a snapshot as current when it is at most STALE_FRAMES (10) presents older than its reply, as docs/control.md allows for a snapshot made at Link's update, and #111's description says so. The check's fake bridge kept a "stale" snapshot only one frame old, which calm rightly took. No open pull request or claim covers it.

How to reproduce

Seen on: Linux (Ubuntu 24.04), no GPU
Settings and switches: none
Steps: on main aa95d35f, run python -I -B tests/test_pipeline_tour.py
Expected: pipeline tour: source, route, presses, command line, lists, bridge, memory guard, worth and renderer profile ok
Actual: pipeline tour: calm took a stale snapshot (game.frame 2635, reply 2637) for control

What changed

Test-only: the fake bridge's kept snapshot is STALE_FRAMES + 1 frames older than the frame it starts at, past what fresh accepts, so the case tests what it says: a snapshot kept from before a load is not taken for control. No product file changes.

  • tests/test_pipeline_tour.py: fake.stale_from = fake.frame - tour.STALE_FRAMES - 1 (was fake.frame - 1). A calm that ignores fresh still fails it (tried: calm took a stale snapshot (game.frame 2625, reply 2637)).

Measurements

Verdict: passes: the check fails on main and passes on this branch in two interleaved rounds.

Hardware: Linux (Ubuntu 24.04, kernel 6.8), x86-64, no GPU used; Python 3.15
Scene: no game: the game-free check and its fake bridge
Method: the check run alone, round 1 on main then this branch, round 2 the same again
How to reproduce: python -I -B tests/test_pipeline_tour.py on each commit

Before: main @ aa95d35f After: this PR @ 18281d3e
Check result, round 1 / round 2 fail / fail pass / pass
main@aa95d35f r1 test_pipeline_tour.py none rc=1 | pipeline tour: calm took a stale snapshot (game.frame 2635, reply 2637) for control
main@aa95d35f r2 test_pipeline_tour.py none rc=1 | pipeline tour: calm took a stale snapshot (game.frame 2635, reply 2637) for control
fix-pipeline-tour-check-stale-snapshot@18281d3e r1 test_pipeline_tour.py none rc=0 | pipeline tour: source, route, presses, command line, lists, bridge, memory guard, worth and renderer profile ok
fix-pipeline-tour-check-stale-snapshot@18281d3e r2 test_pipeline_tour.py none rc=0 | pipeline tour: source, route, presses, command line, lists, bridge, memory guard, worth and renderer profile ok

Flags and settings

None

Testing

Tested: on Linux, the check failing on main aa95d35f and passing here in two interleaved rounds (before this rebase, the same on main 6c9edffe at 63ae6d3b), and failing again with calm's st["fresh"] taken out. It arrived red with #111 (6c9edffe), whose description says the fake bridge's stale-snapshot case was read, not run. The full suite (python -I -B tests/run_all.py, Linux, LONGSHOT_VULKAN_HEADERS set) on main 6c9edffe with this and the six other red-check repairs from the same sweep merged locally (1ba90202, not pushed): 525 passed, 4 failed, 51 skipped. Three of the failures fail on main too and have their own pull requests: tests/test_walk_key.py (#497), tests/test_cpm_discovery.py (#561), tests/test_make_game_cache.py (#592). The fourth, tests/test_crash_record.py, timed out waiting 10 s for a signalled child under load and passes alone, twice. Rebased since onto main aa95d35f, the commit re-authored under the forge's noreply address: its change is identical to before by git patch-id; on aa95d35f the check also ran through the runner with g++ 13.3 and with clang 23.1.5, failing on main and passing here.

Not tested: Windows: the check is skipped there (RUN_ALL_SKIP: the tour runs on Linux).

Must be tested: None

Risks

What could break: only this check.

Turning it off: revert the commit

Compatibility: Nothing changes

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main. Onto main aa95d35f with no conflict; the change is identical to before by git patch-id.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). The full run is the one in Testing, on main 6c9edffe; after the rebase onto aa95d35f, the changed check through the runner with g++ and clang, as above.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
**Type:** test · **Risk:** low · **Tested on:** Linux, no GPU (game-free check) · **Needs:** none ## Why `tests/test_pipeline_tour.py` has failed on `main` since the pipeline tour merged (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/111), so `main` is red before a release candidate. The tour is right: `calm` takes a snapshot as current when it is at most `STALE_FRAMES` (10) presents older than its reply, as docs/control.md allows for a snapshot made at Link's update, and #111's description says so. The check's fake bridge kept a "stale" snapshot only one frame old, which `calm` rightly took. No open pull request or claim covers it. ## How to reproduce **Seen on:** Linux (Ubuntu 24.04), no GPU **Settings and switches:** none **Steps:** on `main` aa95d35f, run `python -I -B tests/test_pipeline_tour.py` **Expected:** `pipeline tour: source, route, presses, command line, lists, bridge, memory guard, worth and renderer profile ok` **Actual:** `pipeline tour: calm took a stale snapshot (game.frame 2635, reply 2637) for control` ## What changed Test-only: the fake bridge's kept snapshot is `STALE_FRAMES + 1` frames older than the frame it starts at, past what `fresh` accepts, so the case tests what it says: a snapshot kept from before a load is not taken for control. No product file changes. - `tests/test_pipeline_tour.py`: `fake.stale_from = fake.frame - tour.STALE_FRAMES - 1` (was `fake.frame - 1`). A `calm` that ignores `fresh` still fails it (tried: `calm took a stale snapshot (game.frame 2625, reply 2637)`). ## Measurements **Verdict:** passes: the check fails on `main` and passes on this branch in two interleaved rounds. Hardware: Linux (Ubuntu 24.04, kernel 6.8), x86-64, no GPU used; Python 3.15 Scene: no game: the game-free check and its fake bridge Method: the check run alone, round 1 on main then this branch, round 2 the same again How to reproduce: `python -I -B tests/test_pipeline_tour.py` on each commit | | Before: main @ aa95d35f | After: this PR @ 18281d3e | |---|---|---| | Check result, round 1 / round 2 | fail / fail | pass / pass | ``` main@aa95d35f r1 test_pipeline_tour.py none rc=1 | pipeline tour: calm took a stale snapshot (game.frame 2635, reply 2637) for control main@aa95d35f r2 test_pipeline_tour.py none rc=1 | pipeline tour: calm took a stale snapshot (game.frame 2635, reply 2637) for control fix-pipeline-tour-check-stale-snapshot@18281d3e r1 test_pipeline_tour.py none rc=0 | pipeline tour: source, route, presses, command line, lists, bridge, memory guard, worth and renderer profile ok fix-pipeline-tour-check-stale-snapshot@18281d3e r2 test_pipeline_tour.py none rc=0 | pipeline tour: source, route, presses, command line, lists, bridge, memory guard, worth and renderer profile ok ``` ### Flags and settings None ## Testing **Tested:** on Linux, the check failing on main aa95d35f and passing here in two interleaved rounds (before this rebase, the same on main 6c9edffe at 63ae6d3b), and failing again with `calm`'s `st["fresh"]` taken out. It arrived red with #111 (6c9edffe), whose description says the fake bridge's stale-snapshot case was read, not run. The full suite (`python -I -B tests/run_all.py`, Linux, `LONGSHOT_VULKAN_HEADERS` set) on main 6c9edffe with this and the six other red-check repairs from the same sweep merged locally (1ba90202, not pushed): 525 passed, 4 failed, 51 skipped. Three of the failures fail on main too and have their own pull requests: `tests/test_walk_key.py` (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/497), `tests/test_cpm_discovery.py` (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/561), `tests/test_make_game_cache.py` (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/592). The fourth, `tests/test_crash_record.py`, timed out waiting 10 s for a signalled child under load and passes alone, twice. Rebased since onto main aa95d35f, the commit re-authored under the forge's noreply address: its change is identical to before by `git patch-id`; on aa95d35f the check also ran through the runner with g++ 13.3 and with clang 23.1.5, failing on main and passing here. **Not tested:** Windows: the check is skipped there (`RUN_ALL_SKIP`: the tour runs on Linux). **Must be tested:** None ## Risks **What could break:** only this check. **Turning it off:** revert the commit **Compatibility:** Nothing changes ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. Onto main aa95d35f with no conflict; the change is identical to before by `git patch-id`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). The full run is the one in Testing, on main 6c9edffe; after the rebase onto aa95d35f, the changed check through the runner with g++ and clang, as above. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
the pipeline tour's stale snapshot is older than STALE_FRAMES
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
63ae6d3bbc
Assisted-by: Claude

#111's fake bridge kept a snapshot one frame behind its reply, which `fresh` takes as current (up to `STALE_FRAMES`, 10, as docs/control.md allows for a snapshot made at Link's update), so `calm` rightly took it. The kept snapshot is now 11 frames old; a `calm` that ignores `fresh` still fails the check.
zeldaootr force-pushed fix-pipeline-tour-check-stale-snapshot from 63ae6d3bbc
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to 18281d3eb2
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 4s
2026-11-15 17:13:03 +00:00
Compare
Author
Contributor

Rebased onto main aa95d35f (head 18281d3e); the commits are re-authored with the forge's noreply address: no code change, the same patches by git patch-id.
Test re-run: test_pipeline_tour fails on main aa95d35f (calm took a stale snapshot) and passes here, two interleaved rounds, and through the runner with g++ and clang; the description names the new commit.

Rebased onto `main` aa95d35f (head 18281d3e); the commits are re-authored with the forge's noreply address: no code change, the same patches by `git patch-id`. Test re-run: `test_pipeline_tour` fails on main aa95d35f (calm took a stale snapshot) and passes here, two interleaved rounds, and through the runner with g++ and clang; the description names the new commit.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 4s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix-pipeline-tour-check-stale-snapshot:zeldaootr-fix-pipeline-tour-check-stale-snapshot'
git switch 'zeldaootr-fix-pipeline-tour-check-stale-snapshot'
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!627
No description provided.