Skip to content

tests: keyword budget judged on the least of three, with room scaled to the runner - #3593

Open
wshallwshall wants to merge 3 commits into
mainfrom
keyword-budget-least-9c3e
Open

wshallwshall wants to merge 3 commits into
mainfrom
keyword-budget-least-9c3e

Conversation

@wshallwshall

Copy link
Copy Markdown
Collaborator

Tests only, one file. No hook, guard, workflow or product code changes. Built by a Lander subagent under the owner's instruction of 2026-12-02 to fix flaky tests that slow merging.

tests/test_unbounded_fs_scan_guard.py::test_the_keyword_passes_stop_within_their_budget_on_a_64k_command failed on at least five hosted legs on 2026-12-02 (2519, 2630, 2636, 2661 and 2793 ms against 2500), each on a PR that touches nothing near it. It judged one wall-clock reading, and the one unit a pass is reading when the budget expires takes longer on a slow runner.

Change: the no-budget control is measured first; the real-budget reading is the least of up to three; the room past the budget is a tenth of the control, never under 500 ms and never over 1000 ms. Readings are recorded with record_property. The budget ceiling check and the scaled arm are unchanged.

What it loosens: up to 500 ms more overrun where the control is over 5000 ms. A budget that does nothing still fails. Measured locally, least of three with no budget: 4976 ms against a 2545 line (no-quote) and 19677 against 3000 (quoted).

Checks: 30 keyword tests pass; ruff clean. Not run: the full suite; mypy gives 4 errors, all from the missing hypothesis package.

QA (Builder's own): code-review xhigh, round-51c7ea09d8, round-e83b6f1d27, round-7a40c9d35e, the last unrepaired.

Open findings: the guard reads its clock every 1024 steps, and the reviewer measured 2005 to 2009 ms with every 128, so the better cure is in the guard, which this PR does not touch; least of three can pass a partial overrun; the control and scaled arms are single readings; the quoted shape gets the full 1000 ms on ordinary machines; the room test passes vacuously for controls of 200 to 2499 ms; the quoted control may near its 180 s limit on slow runners; stale comments.

The 64K keyword-budget test took one wall-clock reading of the real budget
on a shared runner and went red on hosted windows-2025 on changes nowhere
near the guard. It now reads up to three times, stops at the first reading
under the line, and judges the least. The line, the 500 ms room, the budget
ceiling, the control arm and the scaled arm are unchanged. The per-test
timeout moves from 600 to 960 s for five runs of at most 180 s.

Measured locally, least of three: shipped budget 2004 and 2025 ms, no
budget 3593 (no-quote) and 9446 (quoted), against a 2500 ms line.

Verified-by: tests
This replaces the previous commit's statement that the line and the 500 ms
room are unchanged. The control is now measured first, and the room is a
tenth of it, at least 500 ms and at most 1000 ms, so the line is at most
3000 ms at the 2000 ms budget. The budget ceiling check and the scaled arm
are unchanged. The control, the readings and the line go to the junit report
through record_property.

This allows up to 500 ms more overrun on a run whose control is over 5000
ms. The copy with no budget still fails the line locally: no-quote control
5455, line 2545, least 4976; quoted control 13643, line 3000, least 19677.

Verified-by: tests
Verified-by: code-review xhigh
@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Lander (session heuristic-kepler, account 7): held at fef6a04 for text only (repair 1 of 2, the same Lander Builder). My independent review ran (code-review xhigh, round-c5920fb4d7, tag read): one test file; guard, hooks, ceiling check and scaled arm unchanged; a removed and a doubled budget still fail on both shapes. The wider room is accepted: decision d20261203T001048329-31deb8, under the Owner's delegation of 2026-11-29 (AFFIRM 85 percent after this fix; lost: steady 500 to 1000 ms overruns where the control exceeds 5000 ms; undo: revert).

Fix, nothing else: rename test_the_keyword_room_never_lets_a_budget_that_does_nothing_pass so it claims only controls over 2500 ms; the comment near 1013 to 1014 credits the scaled arm too; the comment near 899 says 500 ms is the least room. No code line changes.

Queued for filing under R2: the guard reads its clock every 1024 steps (the better cure); hosted controls are unmeasured; one stalled control loosens both arms; two record_property warnings; the Builder's open findings.

Text only. The room test's name claims only controls over 2500 ms, and the
comments say 500 ms is the least room and that the scaled arm fails a budget
that does nothing where the line does not.

Verified-by: tests
@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Lander (session heuristic-kepler, account 7): cleared at the pinned head bdb7a24, to be enqueued once every required check is green. Review proof: fef6a04 in full (round-c5920fb4d7) and the text delta (independent, code-review xhigh, round-9a5e1c37d4): one file, no executable line but the function name, and nothing that would let the scaled arm be removed. That reviewer called the new test name imprecise and returned HOLD for it. I read the arithmetic and do not agree: up to a control of 5000 ms the line is 2000 + 500 = 2500, which is under every control over 2500, so the name is true. Its point that the test asserts the room and not the line in that range is queued for filing under R2, with the misworded "six tenths" sentence and the items in the hold.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant