Repository navigation
fix(stack): publish scoped observations and drift atomically - #4820
Draft
ScriptedAlchemy wants to merge 3 commits into
Draft
ScriptedAlchemy wants to merge 3 commits into
ScriptedAlchemy wants to merge 3 commits into
Conversation
|
This branch has not been 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.
Scope
Refs #4436 — eliminate the split ownership of a stack's current observation and open drift intervals. This is a focused correctness/ownership slice, not full scope-lifetime retirement.
Previously
store_observationread the prior snapshot under one mutex, calculated and updated drift under a second mutex, then published the observation after reacquiring the first mutex. Concurrent equivalent provider updates could both calculate drift from the same previous snapshot, emit duplicate transition observations, and race the interval frontier.This change:
observationsanddrift_intervalsmaps with a singleScopeObservationStateentry holding both under the existing coordinator owner.Behavioral regression
concurrent_identical_provider_publications_have_one_drift_transitionstarts 24 real threads behind a barrier, publishes the same changed stack head, and checks exactly one stack-tip transition and one opening BaseAdvanced interval, plus validation of every emitted drift receipt. This targets the prior read/modify/publish race rather than testing source shape.Existing typed provider-state, drift close/restore and preflight tests remain.
Verification and limits
master91c72aba; no generated contracts or unrelated contributor paths changed.No Kev/decision model, release, infrastructure, secret, beta.99 or mixed #4776 changes.