Repository navigation
test: regexes over pinned and in-test input carry no wall-clock match timeout (#426) - #428
Merged
Merged
Conversation
… timeout UpstreamClientContract's ten regexes and HandWrittenDoorRemarksTests' one read the pinned upstream client, the repository's own remarks, and test constants: never untrusted input. They match in time linear in it (RouteCall: about 1 ms over the 81 KB pinned client, 10.6 ms over 40 times that). A 1000 ms wall-clock timeout guarded nothing there and failed three tests on a stalled macOS merge-group runner, over a 1.1 KB constant that matches in microseconds. A new row parses a client forty times the pinned size and reads its first and last route. Closes #426
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.
The 11 test-side regexes that read pinned or in-test input no longer carry a wall-clock match timeout. A 1000 ms timeout there guarded nothing, and on a stalled macOS runner it failed three tests that match in microseconds.
Closes: #426. The same flake class at the tool-side sites, which this PR leaves out on purpose, is tracked in #427.
Root cause (measured, not assumed)
The macOS merge-group leg of #424 (run 39012584027) failed three
UpstreamClientContractTestswithRegexMatchTimeoutExceptioninParseRoutes. The first suspect was backtracking inRouteCall's lazy wildcards. Measurement rules that out. I timed the exact pattern, compiled and with the same options:Clientconstantclient.tsWhat changes
UpstreamClientContract's ten regexes andHandWrittenDoorRemarksTests' one usematchTimeoutMilliseconds: Timeout.Infinite. Each file carries the reason in one line: the input is the pinned upstream client, the repository's own remarks, or a test constant, never untrusted, and a wall-clock timeout only adds runner-load failures. The analyzer wall accepts it, with 0 warnings.Parse_Should_Read_The_First_And_Last_Route_Of_A_Client_Forty_Times_The_Pinned_Sizeparses a 3.3 MB client of 3,000 distinct route copies (about 40 times the pinned client). It reads the exact type of the first route and of the last. It holds the input-scale claim deterministically, rather than with a time limit.DriveManifestTests(Tool-side regexes over pinned input carry a 1000 ms wall-clock match timeout (same flake class as #426) #427), which are production tool code where a timeout is a separate decision;protocol-and-generation.md~:88), which runs over untrusted input at runtime.Local check
At this head, on dev-01, after a root Release build: slopwatch 0 issues; the Release build with 0 warnings; both format passes;
verify-clonespassing;--help;generate --verifycurrent; the whole Tools.Tests project (guards included) at 1996/0. Bun 1.4.3, off the 1.4.2 pin. CI is the full gate, including the macOS leg.After merge: #424 re-enters the queue.
Need help on this PR? Tag
@codesmith-botwith what you need.