Skip to content

os update: a failed switch undo keeps the trial marker - #584

Merged
onel merged 2 commits into
devfrom
fix/os-switch-undo-marker
Oct 6, 2026
Merged

onel merged 2 commits into
devfrom
fix/os-switch-undo-marker

Conversation

@onel

@onel onel commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Greptile found this on the 0.16.0 release PR (#583, comment 4195158466). When an os-switch job stops after mark-active other and then cannot put the booted slot first again, it still removed the new slot's trial marker. The new slot could then boot next with no trial, so no safety net and no revert.

Now the marker goes only after the booted slot is first again. If the old slot boots after all, Boot already removes a marker for a switch that never took effect (TestMarkerWithoutActivationIsNoRevert).

  • New test TestFailedUndoKeepsTheTrialMarker. It fails without the fix.
  • UPDATES.md # 1 and a progress entry, os-switch-undo-marker.md.

Part of #486.

Found by Greptile on the 0.16.0 release PR (#583). The marker is removed only
after the booted slot is first again, so a new slot that may still boot next
boots on trial.
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Fixes OS update switch undo to preserve trial safety marker.

The PR appears safe to merge; the earlier trial-boot test gap is closed.

What we checked:

  • Trial boot without a marker: No. The reboot harness clears earlier marks. Without the marker, Boot marks B good, so the test cannot see the bad mark it requires.

Reviews (2) · Last reviewed commit: "fixup: the test boots slot B and wants a..."

Comment thread internal/hostagent/osupdate/osupdate_test.go
@onel
onel merged commit 398fa41 into dev Oct 6, 2026
7 checks passed
@onel
onel deleted the fix/os-switch-undo-marker branch October 6, 2026 13:00
@onel onel mentioned this pull request Oct 6, 2026
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.

1 participant