Skip to content

fix(rollback): preserve reconcile unit during checkpoint restoration - #106

Merged
Nickfost merged 9 commits into
mainfrom
t3code/next-step-planning
Oct 11, 2026
Merged

Nickfost merged 9 commits into
mainfrom
t3code/next-step-planning

Conversation

@Nickfost

@Nickfost Nickfost commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T06:50:02.552491Z 099fe11 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/install-worker-controller.sh Outdated
Comment thread scripts/install-worker-controller.sh Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/install-worker-controller.sh Outdated
Comment thread scripts/restore-reconcile-unit.sh

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/restore-reconcile-unit.sh
Comment thread scripts/restore-reconcile-unit.sh
@Nickfost
Nickfost merged commit b0d9028 into main Oct 11, 2026
2 checks passed
@Nickfost
Nickfost deleted the t3code/next-step-planning branch October 11, 2026 07:02
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.

fix(rollback): preserve the executing reconcile unit and its systemd timeout budget

1 participant