Repository navigation
Fix what the 0.20 release PR's full suite found - #517
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V339RzRHo8RS8Cz3uSbQgP
- A merged or sharded run kept each simulation's time down unplanned only from its first chunk: merge adds the other's times, and a chunk's dict carries them, so unplanned_downtimes survives threads, shards and chunks as uptimes do. - least_spend_for_downtime is refused where availability is: a diagram with capacities too meshed for its reduced diagram. - Tests that predate other 0.20 changes: a number is now a task's duration (a negative one is refused); the cost categories gained crews and capital; surpyval 0.29's Hypoexponential takes stage rates all but equal; the compiled engine refuses shutdowns, which auto runs in Python. - The shutdowns guide's Opportunities example defines its diagram. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V339RzRHo8RS8Cz3uSbQgP
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 full suite on the 0.20 release PR (#516) failed in every test job, and lint failed too. Every failure is fixed here, and no seed, tolerance or sample size changes.
Lint: black 26.3.1 formatting in
rbd/_plan_actual.py.Code fixes:
unplanned_downtimeswas lost on threads, shards and chunks._Tally.mergepassed the other tally's exact total where each simulation's times belong, so the per-simulation list lost its alignment withuptimes. The result then gave None. Merge now extends the list in order, and a chunk's dict carries it. This fixestest_a_simulation_is_the_same_however_the_run_is_cut_up, the shard tests, the held nested RBDs and the numba-threadsengine cases. It also matters forleast_spend_for_downtime, which reads these times.least_spend_for_downtimeis now refused whereveravailabilityis. On a diagram with capacities that is too meshed,analysis_routessaid it was simulated, but the call raised.Tests that predate other 0.20 changes:
crewsandcapital, so the expected dict lists them at 0.Hypoexponentialaccepts stage rates that are all but equal. The test now checks that the route is exact and that the answer is all but cold, instead of insisting on the Markov chain.test_compiled_shuts_are_priced_as_in_pythoncould never pass, and it skips without numba. Its instant renewal cost is deliberately refused, and the compiled engine refuses shutdowns. It becomestest_shuts_are_simulated_in_python: numba refuses with its message, andautogives the Python runs.Docs: the shutdowns guide's Opportunities example now defines its diagram (
edgeswas undefined).Tests run (surpyval 0.29 from PyPI):
🤖 Generated with Claude Code
https://claude.ai/code/session_01V339RzRHo8RS8Cz3uSbQgP