reshuffle-sim: model confirmation & portal catch-up lag (multistep)#48
Open
define-null wants to merge 1 commit into
Open
Conversation
The multistep path confirmed every assignment the instant it published it, so a superseded copy drained the same step it was replaced — reshuffles looked free. That is the "0 confirmation percent" case: the scheduler never waits for workers. Add two uniform step-delay knobs that hold back the storage's confirmation watermark, so superseded copies keep occupying capacity until the fleet+portal catch up: - confirm_lag_steps — steps the fleet takes to download a published assignment. - portal_lag_steps — extra steps for the portal to route it before the old copies may drain. run_cycle records each publication and confirms only the id (confirm_lag_steps + portal_lag_steps) cycles back (clamped to the baseline). Both default to 0, which confirms the just-published assignment — the previous behaviour, byte-identical. The overhang surfaces in the existing Stale/used-% columns; a higher lag inflates them and can bring a capacity shortage forward. Multistep only (the stateless path has no watermark); validated as such. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 is this PR about?
stacked on top of #46
The reshuffle-sim's multistep path confirmed every assignment the instant it published it, so a superseded copy was cleared to drain the same step it was replaced — reshuffles looked free. That's the "0 confirmation percent" case: the scheduler never waits for workers to download the new copies, nor for the portal to route to them, before removing the old ones. In production both take time, during which old and new copies coexist and occupy capacity.
This adds two knobs (multistep only) that model that lag as whole simulation steps by holding back the storage's monotonic confirmation watermark:
run_cycle now records each publication in order and confirms only the id confirm_lag_steps + portal_lag_steps cycles back (clamped to the baseline), instead of pinning the watermark to the newest assignment. Everything else — stale accumulation, drains, capacity — falls out of the existing MVCC storage, which already handles delayed confirmation (that's what the property tests exercise).
Both knobs default to 0, which confirms the just-published assignment — the previous confirm-immediately behaviour, byte-identical. The overhang surfaces in the existing Stale (% cap) / used % columns, so no report plumbing changed. The stateless path has no watermark, so the knobs are validated as multistep-only.