Conversation
Add tests that trigger the AssertionError in can_merge reported in #63. The root cause is that find_large_integer assumes can_merge is monotonic, but it's not when the interestingness test is non-deterministic (as with real subprocess tests). The mechanism: 1. can_merge(to_merge) evaluates is_interesting -> False (cached) 2. Successful intermediate merges during find_large_integer clear the cache 3. Re-evaluation of the same content returns True (non-determinism) 4. find_large_integer probes past to_merge, hitting the assertion Two tests added: - Hypothesis property test: generates random configs with a flaky is_interesting function that simulates non-deterministic subprocess behavior (~50% first-call failure, always-pass on re-evaluation) - Concrete test: iterates seeds with autojump_clock to reliably trigger the assertion in a deterministic scheduling environment Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Merged
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.
If patches came in while we were merging, we would sometimes run into problems where we successfully merged more than
to_mergeworth of patches and kept going. This would trigger some internal assertions.The fix is just to not try to do that and to only ever merge as many patches as we intended to at the start. There are some slight inefficiencies here, but I struggle to imagine they'll ever matter in practice.
Fixes #63