Repository navigation
Remove a generation when its activation is refused - #85
Merged
Merged
Conversation
applyProfileRealization creates the new system generation, then activates it. The service policy check runs inside activation, so a refused transition, for example an uninstall that would remove a running service, left the new generation on disk. It is higher than the current generation and has no GC root. GC retention keeps the newest generations by number and does not check whether a generation was ever activated, so it counted among them. With the default retention of two it displaced an earlier generation: with generations 1 to 3 and 3 current, GC would delete gen-1, and with an unactivated gen-4 it would delete gen-1 and gen-2. Remove the generation this call created when activation fails, unless it has become the current generation. A failure to remove it is logged and does not replace the activation error. Add a test that refuses an uninstall and checks the created generation is gone and the history is intact, and one that checks the current generation is never removed. The activation test fixtures are made public so the install tests can use them. A fixture generation now carries a realization, which a child generation reads from its parent.
jhuntwork
force-pushed
the
discard-unactivated-generation
branch
from
November 3, 2026 04:19
2b0ed73 to
d261ec7
Compare
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.
applyProfileRealization creates the new system generation, then activates it.
The service policy check runs inside activation, so a refused transition, for
example an uninstall that would remove a running service, left the new
generation on disk. It is higher than the current generation and has no GC
root. GC retention keeps the newest generations by number and does not check
whether a generation was ever activated, so it counted among them. With the
default retention of two it displaced an earlier generation: with generations
1 to 3 and 3 current, GC would delete gen-1, and with an unactivated gen-4 it
would delete gen-1 and gen-2.
Remove the generation this call created when activation fails, unless it has
become the current generation. A failure to remove it is logged and does not
replace the activation error. Add a test that refuses an uninstall and checks
the created generation is gone and the history is intact, and one that checks
the current generation is never removed.
The activation test fixtures are made public so the install tests can use
them. A fixture generation now carries a realization, which a child generation
reads from its parent.