Skip to content

fix(precompute): make activation generation-safe - #600

Merged
zzylol merged 3 commits into
mainfrom
fix/596-generation-safe-activation
Sep 4, 2026
Merged

zzylol merged 3 commits into
mainfrom
fix/596-generation-safe-activation

Conversation

@zzylol

@zzylol zzylol commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Closes #596.

Makes runtime activation generation-safe:

  • an in-flight window remains owned by its current immutable config;
  • replacement configs are staged and promoted only after Tick/Drain closes the old generation;
  • old state is therefore serialized with old family/grouping/encoding semantics rather than being relabeled;
  • promotion resets delta bases so the new generation begins with a full checkpoint;
  • config slice/map/monitor fields are deep-copied before atomic publication.

Updates transition tests to prove scope and same-scope changes drain the old generation and promote at the boundary. Race validation included.

Stacked on #599.

@zzylol

zzylol commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up review fix: config publication and window ownership now share a generation RW barrier. Observe holds a shared generation lease; Tick/Drain/activation hold the exclusive lease, preventing an old-config observation from entering a newly activated window.

@zzylol
zzylol force-pushed the fix/596-generation-safe-activation branch from c0cac2b to afae724 Compare September 4, 2026 12:08
@zzylol
zzylol force-pushed the fix/591-envelope-series-cap branch from ad9b411 to 1e8d619 Compare September 4, 2026 12:09
@zzylol
zzylol force-pushed the fix/596-generation-safe-activation branch from afae724 to 6ec19d3 Compare September 4, 2026 12:09
@zzylol
zzylol changed the base branch from fix/591-envelope-series-cap to main September 4, 2026 12:35
@zzylol
zzylol merged commit 5ca3807 into main Sep 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

asap-precompute-go: make plan activation generation-safe at window boundaries

1 participant