verify: refuse to stage a build that predates its sources #538

Merged
csj0oe merged 1 commit from upstream-pr/538 into main 2026-11-29 21:27:38 +00:00
csj0oe commented 2026-11-29 21:08:16 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by csj0oe on 2026-11-29T21:08:16Z.


What

verify stages a suite's prebuilt Windows binary without checking it against the sources. After a merge that changes only runtime/xg-layout/, check --no-gpu never runs build.py, so an older DLL stays in build/ and the gates compare new guests against it.

This adds an explicit freshness table for the suites whose inputs are a single crate: the newest input modification time is compared with each staged binary, and a stale one stops the run naming the suite, the binary, the newer input and python build.py <target>.

Tests

tests/test_verify.py::BuiltSuiteTests builds a temporary tree and sets mtimes directly, so no Windows binary is needed: a current binary passes, a binary older than one input raises with the input path and the rebuild command in the message. With the guard removed the second test reaches the gate body, which is the failure it now prevents.

python tuxbox.py check --no-gpu: all steps pass.

<!-- greyfinch-sync:brcly/TuxBox:issue:5555137401 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/538). Originally posted by [csj0oe](https://github.com/csj0oe) on 2026-11-29T21:08:16Z. --- ## What `verify` stages a suite's prebuilt Windows binary without checking it against the sources. After a merge that changes only `runtime/xg-layout/`, `check --no-gpu` never runs `build.py`, so an older DLL stays in `build/` and the gates compare new guests against it. This adds an explicit freshness table for the suites whose inputs are a single crate: the newest input modification time is compared with each staged binary, and a stale one stops the run naming the suite, the binary, the newer input and `python build.py <target>`. ## Tests `tests/test_verify.py::BuiltSuiteTests` builds a temporary tree and sets mtimes directly, so no Windows binary is needed: a current binary passes, a binary older than one input raises with the input path and the rebuild command in the message. With the guard removed the second test reaches the gate body, which is the failure it now prevents. `python tuxbox.py check --no-gpu`: all steps pass.
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
brcly/TuxBox!538
No description provided.