Repository navigation
Prove the class-split bound without a clock - #199
Merged
Merged
Conversation
A_page_with_many_headings_is_read_in_bounded_time failed once in CI when the runner stalled: 12 s for a page that reads in 7 to 16 ms. The test now proves the R127 bound by behaviour: with a cancelled token, sixty titles return null (no window read) where three titles throw.
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.
What changed
One test in
tests/ImportWorker.Tests/ClassSplitBoundsTests.cs. No product code.A_page_with_many_headings_is_read_in_bounded_timeasserted that a 60-heading page is read in under 10 seconds of wall-clock time. It is replaced byA_page_with_many_headings_is_not_split_and_reads_no_window, which proves the R127 bound without a clock:SplitClassesis called with a token that is already cancelled.OperationCanceledException, because the split checks the token before every window it reads.null. It gave up atMaxSplitClassesbefore reading any window.Why
The old test failed once in CI (run 44956465891, 2026-11-21) and passed on re-run. It took 12 s on the runner and 7 to 16 ms locally. Three test assemblies went silent for 32 s and resumed in the same half second, so the runner stalled; the page was not slow to read. A wall-clock bound cannot tell those apart.
How it was checked
MaxSplitClassesraised to 100 locally, the new test fails withOperationCanceledException. The change was reverted.dotnet test tests/ImportWorker.Tests -c Release: 307 passed, 0 failed.What this does not fix
The CI failure surfaced as a
RegexMatchTimeoutException: the 1,000 ms detection regex timeout is wall-clock too, so a runner that stalls for over a second during a match can still fail any detection test. That is by design in the product (R151) and was 1 failure in the last 100 CI runs. Nine other tests in the suite still assert on elapsed time with 2 to 30 s bounds.