Repository navigation
test(core): keep proptest's reject budgets per case and build non-whitespace names - #330
Merged
Merged
Conversation
…tespace names
The deep profile (PROPTEST_CASES=4096), measured on a runner for stage 3 of the Test phase, fails two thrust-core properties with proptest's "Too many rejects", though nothing about them is wrong: prop_accepted_blob_names_stay_inside_their_scope ("Too many global rejects", 1,024) and prop_names_longer_than_255_chars_are_rejected ("Too many local rejects", 65,536). proptest's limits are absolute, sized for its 256 cases (4 and 256 a case), while proptest_config scaled the cases and left the limits, so a test that discards a fixed share of its inputs fits at 256 and gives up at 4096. Reproduced on unchanged code before the fix.
Two changes, each held by a test that can fail.
non_whitespace filtered every character with prop_filter, which rejected about 7.7% of them (about 22 a case). It now builds the string: a whitespace draw becomes `x`, so it never rejects, as the rust-test-logic skill says to do. visible_names_are_built_not_filtered runs the strategy under a runner that allows no rejects at all, and a strategy that filters fails it on its first discarded draw.
The blob-name property keeps its prop_assume!: the validator is its oracle, the names it throws out are the point (a bare "." was once accepted and found this way), and an early return instead would count the discards as passes and cut the effective checks by about 30% at the default 256 cases. proptest_config now keeps the budgets per case through config_for: at least proptest's own limits, and 4 global and 256 local rejects a case, so at 256 cases or fewer the limits are proptest's own and the default loop is unchanged. config_for_keeps_the_reject_budgets_per_case checks twelve case counts from 0 to u32::MAX, and config_for_at_the_default_cases_is_proptests_own pins the default.
Other copies of proptest_config (14 crates, copied from the skill's template by design) are not changed: no property of theirs failed in the deep run.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
aRustyDev
temporarily deployed
to
preview-control-plane
November 19, 2026 04:35 — with
GitHub Actions
Inactive
aRustyDev
added a commit
that referenced
this pull request
Nov 19, 2026
One conflict, in docs/src/testing/status.md: #330 added a G-48 row (the `deep` nextest profile) while this branch added a G-48 row for the deep health check. Main's row keeps G-48, since it landed first and other files already cite it (`test_support.rs`, the ci-workflows plan). This branch's row is now G-49, and the one place this branch cites it (the contract test's doc comment) says G-49. Nothing else conflicted. Checked on the merged tree: fmt, 2456 tests of thrust-api, thrust-core and the two adapters, check-deps, check-cargo-lock, check-contract-counts and `cargo metadata --locked`. Refs: #42 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Merged
aRustyDev
added a commit
that referenced
this pull request
Nov 19, 2026
… and the numbers after the merge (#335) G-48 (the deep profile) is done as the owner decided on 2026-11-19: the two reject-heavy tests are fixed (#330) and the profile runs nightly as deep.yml (#331), not gated and without the oracle_ tests, red only for issue #114 in the two runs of the job itself. The phase document's stage table, findings and decisions say so, and running.md's runbook no longer says deep fails today. The numbers after the merge of #329, from three dispatches of the hermetic job on main once it had built the new cache (402 MiB against 651 MiB): the two runs that restored the cache took 126 s and 130 s (the nextest step 74 s and 72 s), against 153 to 172 s and 95 to 98 s before, which is the probe's result within a few seconds. The third restored no cache and built from scratch (129 s for the step, 200 s for the job); the cause is not known. Co-authored-by: Claude Sonnet 5.5 <[email protected]>
This branch was previously deployed
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
The first of the two steps you chose for G-48 (the
deepprofile, which #329 records): fix the two reject-heavy properties first, then the nightly advisory job.At
PROPTEST_CASES=4096twothrust-coreproperties fail with proptest's "Too many rejects", though nothing about them is wrong. I reproduced it on unchanged code before touching anything:prop_accepted_blob_names_stay_inside_their_scope: "Too many global rejects" (1,024)prop_names_longer_than_255_chars_are_rejected: "Too many local rejects" (65,536)proptest's limits are absolute, sized for its 256 cases (4 and 256 a case);
proptest_configscaled the cases and left the limits. A test that discards a fixed share of its inputs fits at 256 and gives up at 4096. The profile's own comment says "4096 or more", so a limit that only fits one count is the defect.The change (two files,
crates/core/usecases/src)non_whitespacebuilds its strings instead of filtering them, as therust-test-logicskill says to ("generate valid values by construction"). It filtered every character withprop_filterand rejected about 7.7% of them (about 22 a case). A whitespace draw now becomesx.proptest_configkeeps proptest's reject budgets per case (config_for): at least proptest's own limits, and 4 global and 256 local rejects a case. At 256 cases or fewer the limits are exactly proptest's, so the default loop is unchanged.Why the blob-name property keeps its
prop_assume!, and I did not build valid names for it: the validator is its oracle. The names it throws out are the point (a bare.was once accepted, and this property found it, which isregression_single_dot), so generating only valid names would blind it. I also did not turn the discard into an earlyreturn: that counts the discards as passes and cuts the effective checks by about 30% at the default 256 cases, which would weaken the test. Scaling the budget keeps every check.Controls (each can fail, each did)
PROPTEST_CASES=4096deepprofile ofthrust-coreat 4096prop_filterput backvisible_names_are_built_not_filteredfails: "the strategy rejected a draw: Too many local rejects"config_fornot scalingNew tests:
visible_names_are_built_not_filtered(the strategy under a runner that allows no rejects at all),config_for_keeps_the_reject_budgets_per_case(twelve case counts, 0 tou32::MAX) andconfig_for_at_the_default_cases_is_proptests_own. Also:cargo fmt --checkandclippy -D warningsclean, and all 1,649thrust-coretests pass at the default case count.Not changed, and one thing I did not look into
proptest_config(copied from the skill's template by design) are not changed: no property of theirs failed in thedeeprun. If one ever does, it is the same fix.nextestreported "2 leaky" in the 4096 run of this crate. They are not failures, and I did not look into which tests they are.docs/src/testing/status.mdG-48 (added in ci(test): build the hermetic job without debug info (Test phase, stage 3) #329, which is not merged yet) still says neither step is done. I will update it once ci(test): build the hermetic job without debug info (Test phase, stage 3) #329 lands, or with the nightly job's pull request.No closing keyword: part of a plan, not an issue.
🤖 Generated with Claude Code