Skip to content

fix(backup): recover interrupted revert without certifying empty data - #1580

Merged
frahlg merged 1 commit into
masterfrom
codex/stable-revert-crash-followup-20261012
Oct 12, 2026
Merged

frahlg merged 1 commit into
masterfrom
codex/stable-revert-crash-followup-20261012

Conversation

@frahlg

@frahlg frahlg commented Oct 12, 2026

Copy link
Copy Markdown
Member

A kill during ftw-backup revert can leave an empty active root while both retained directories have complete records. Retrying must recover the complete original without certifying that empty root. Treat a remaining rejected directory as an unfinished revert, independent of its valid record. Also refuse a new import over interrupted activation, even when the original safety point is complete.

After an extraction-only retry succeeds, retain the old extraction copy under a distinct internal name. It no longer blocks a normal revert and switch back. Its bytes remain available for inspection.

These address the P1 and P2 findings on #1579. Both targeted regressions fail before the fix and pass afterward. A real subprocess SIGKILL test now covers preservation, activation and the empty-root revert window; it checks both retained records and all original/new files. Full make verify also runs before handoff. These are source tests, not published package, physical power-loss or installation-cutover evidence.

The owner expanded this release work to preserve data and config across old installation paths, including Home Assistant. Mark that new offline exporter capability as a minor change, as the version review requires. Version Packages must consume it with these backup fixes, producing native 0.141.0. The separate HA exporter release remains ha-export-v1-beta.1; its bytes do not change.

Holds #1554 and #1556 remain. This does not explain the first history writer delay. A new exact beta and a fresh 48-hour field trial are required; guide #1530 will follow the qualified version.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T06:12:14.240294Z b000734 PR opened
ℹ️ 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.

@frahlg
frahlg merged commit 9618f8f into master Oct 12, 2026
17 checks passed

@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: b000734ffe

ℹ️ 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".

}
staging := hasRestoreStaging(entries)
for _, entry := range entries {
if strings.HasPrefix(entry.Name(), ".ftw-rejected-restore-") || (staging && strings.HasPrefix(entry.Name(), ".ftw-pre-restore-")) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Distinguish older safety points from the interrupted restore

If a site already has a complete safety point from an earlier successful restore and a later restore is killed during extraction, the resulting staging directory has no safety point of its own. This condition nevertheless treats the older .ftw-pre-restore-* directory as evidence of interrupted activation, so every retry is refused even though the active root and prior point are both verified. Associate staging with its restore transaction, or otherwise allow this extraction-only retry without weakening the partial-activation check.

AGENTS.md reference: AGENTS.md:L24-L25

Useful? React with 👍 / 👎.

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