Repository navigation
fix(rollback): preserve reconcile unit during checkpoint restoration - #106
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 772a40b8e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eedbc90bbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc5d3c02e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Rollback deletes the running reconcile service unit and reloads systemd before restoring its checkpoint. This can replace its configured timeout budgets with the manager defaults during recovery.
Stage checkpointed units and replace them atomically before one reload. Keep the live reconcile definition while the service executes, including when an older checkpoint lacks its current timeout settings. An ordered transient systemd service restores that unit, or removes it if absent from the checkpoint, after reconciliation exits. It uses the installer lock and checks the pending request, installed state, manager pointer, and preserved unit before applying the change. Later transactions supersede stale requests. Queue restoration before other recovery steps, so timer failures still permit eventual unit cleanup while rollback remains unverified. Explicit uninstall retains its existing unit-removal behavior.
Coverage includes unit contents at every reload, timer enabled/active states, older timeout definitions, missing checkpointed units, execution after service exit, repeated requests, installer handoff with identical unit bytes, staging/replacement/lookup/reload/dispatch failures, retained deferred-failure evidence, and uninstall. Installer integration also checks the parent unit during automatic and manual rollback.
The timing regression models 128 seconds of recovery against the 90-second manager default and existing 2h/15min budgets. This is modeled evidence, not a real systemd timing proof. The focused regression fails on the original implementation. Focused rollback and installer tests, 34 reconciliation tests, ShellCheck, syntax, documentation links, and secret scanning passed locally. The local installer fixture mocks only host load, because the shared development host exceeded the health threshold. Hosted CI must pass the full installer suite and container builds before merge; Docker is unavailable locally.
Deferred finalization has a fifteen-minute budget. Execution failure retains staged files and reports an error in the transient service journal. Completion after process death or reboot is outside this fix's guarantee. No host rollout or live fault injection has occurred.
Closes #93.