Repository navigation
fix(backup): recover interrupted revert without certifying empty data - #1580
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: 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-")) { |
There was a problem hiding this comment.
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 👍 / 👎.
A kill during
ftw-backup revertcan 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 verifyalso 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.