Repository navigation
test: unblock main: stale bytecode in the masked node id rerun, files sensor budget 7.0 us - #366
Merged
Merged
Conversation
…the masked node id tests pytest 8.2 (the lowest-direct resolution) validates its assertion-rewrite cache by source mtime and size; the rerun wrote a source of the same size within the same second and ran the first run's three-query test, so the baseline never saw the fix. Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Windows 3.14 runners measure every row about 1.33x slower since 2026-11-28, the sensor-free rows included, with the image, Python and sensor code unchanged; a 2-CPU sbx box also crosses 6.0 us in one round of six. The measurements are recorded in docs/development/overhead-budgets.md (Moved budgets). Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
ffroliva
marked this pull request as ready for review
November 30, 2026 14:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/pytest_plugin/test_plugin_masked_node_ids.py::test_masked_baseline_proves_a_real_fixfails on thelowestleg (Python 3.12,--resolution lowest-direct, pytest 8.2.0) on every run ofmainsince 2026-11-28, which turns every open pull request red, including the Dependabot updates.Cause
The test writes
test_a.pywith three queries per test, runs it in process, then rewrites it with one query and reruns it in a subprocess. The two sources have the same size (range(3)andrange(1)) and are written within the same second. pytest 8.2 validates its assertion-rewrite bytecode cache by source mtime and size only, so the rerun executed the cached three-query test and the baseline reportedexisting: 2, fixed: 0. Newer pytest releases inuv.lockdo not reuse the stale cache, which is why the locked legs pass.Fix
_rerunremoves the test directory's__pycache__before the rerun. Test-only change.test_masked_baseline_proves_a_real_fixAssertionError: assert 0 == 2(lowest-direct venv, pytest 8.2.0, before the fix);10 passedafterFiles sensor overhead budget 6.0 -> 7.0 us per event
tests/engine/test_sensors_overhead.py::test_the_sensors_overhead_budgets_by_event_countalso fails on Windows 3.14 since the same date (files sensor, matcher on, 32 values: 6.04 to 6.20 us/event against a 6.0 us budget). The runner image (win25-vs2026/20261123.321) and Python (3.14.10) are unchanged; every measurement on that leg, including the side with no sensor enabled and the bare audit hook, is about 1.33x slower than on the last green run (off-side minimum 0.554 -> 0.737 us/event). Hot-path inlining (audit delivery, journal append, matcher check) gained about 2.5 % in an alternating A/B againstorigin/main, not the 15 to 20 % needed, and was not kept. A dedicated 2-CPU sbx box also measured 5.01 to 6.27 us on the same row, one round of six over 6.0. The owner approved movingFILES_SENSOR_BUDGETto 7.0 us; the measurements are recorded indocs/development/overhead-budgets.mdunder Moved budgets. The other budgets are unchanged.