Repository navigation
[TS PBT] Charge adapter startup to the generation allowance - #691
Open
CaelmBleidd wants to merge 2 commits into
Open
CaelmBleidd wants to merge 2 commits into
CaelmBleidd wants to merge 2 commits into
Conversation
CaelmBleidd
marked this pull request as ready for review
December 4, 2026 05:10
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.
Based on #594. The JVM's supervised process timer starts before Node worker, module and example preparation, but the previous soft interruption timer starts only when fast-check begins. Startup could therefore consume the time intended for writing native receipts and coverage.
Pass the caller's soft generation deadline to Node. The adapter reduces the relative fast-check allowance by the time spent before generation. If preparation consumes the entire allowance, return the existing timeout and empty capture metadata before entering fast-check. That path preserves an explicit seed and emits a signed 32-bit placeholder when the request supplied none. The JVM hard deadline, cleanup behavior and the format of complete results remain unchanged.
A deterministic test loads a module that outlasts the soft deadline and configures fast-check's random generator to throw if entered. The result is a timeout with zero runs and no captured inputs despite an out-of-range global seed. The old path entered fast-check and ran the predicate after the deadline.
A single real Mailbox A/B used the exact same PBT-only 24-second request. Both runs returned input exports, so that check did not reproduce the previously recorded transport failure. The new run returned earlier and preserved source statements, with exact branch conversion marked incomplete. This change does not recover buffered data once the supervisor has terminated a process.
Validation includes 221 Node tests, focused Kotlin campaign/deadline tests, and FastCheck Detekt on JDK 11 and Node 22.