[PR #1204] [MERGED] fix(setup): preserve initial backups and Codex comments #2717

Closed
opened 2026-10-17 21:09:26 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1204
Author: @N0zoM1z0
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/setup-initial-backup-retention


📝 Commits (1)

  • 99fe64a fix(setup): preserve initial backups and Codex comments

📊 Changes

6 files changed (+221 additions, -46 deletions)

View changed files

📝 docs/installation.md (+3 -2)
📝 scripts/verify-package-setup.mjs (+17 -10)
📝 src/application/ClientConfigurationDocument.ts (+29 -25)
📝 src/application/Uninstall.ts (+10 -7)
📝 tests/boundary/filesystem/clientConfigurationTransactions.test.ts (+139 -0)
📝 tests/boundary/filesystem/clientLifecycle.test.ts (+23 -2)

📄 Description

Follow-up to #1163 and #1178. Uninstall still discarded comment-only Codex configuration and overwrote the original .rea.backup with the installed registration, making the first configuration snapshot unavailable.

Preserve Codex comments when removing or replacing REA tables and keep the first backup across setup, uninstall, and later setup. A failed uninstall restores the captured current configuration while retaining that original backup. Other TOML clients keep their existing editing behavior.

Validation:

  • Latest-main reproduction: seven regression cases fail before this change; four controls pass.
  • 125 focused tests pass, including quoted/dotted/inline TOML, BOM/CRLF, malformed input, idempotency, adjacent client formats, and failed-write recovery with an older backup.
  • npm run build:cached and npm run check:fast pass.
  • Full node scripts/verify-package.mjs passes against the installed tarball: CLI/MCP, four clients, exact Codex text round trip, initial backup retention, symlinks, and failure recovery; no surviving verifier descendants. Run with a temporary root outside the repository and no injected Ghidra/IDA configuration.

Configuration-only change. Real Hopper/Ghidra execution was not performed for this PR; packaged provider checks use the existing verifier fixtures.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1204 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/setup-initial-backup-retention` --- ### 📝 Commits (1) - [`99fe64a`](https://github.com/morluto/rea/commit/99fe64ac4897157489bb889b9234c92c23bea99d) fix(setup): preserve initial backups and Codex comments ### 📊 Changes **6 files changed** (+221 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `docs/installation.md` (+3 -2) 📝 `scripts/verify-package-setup.mjs` (+17 -10) 📝 `src/application/ClientConfigurationDocument.ts` (+29 -25) 📝 `src/application/Uninstall.ts` (+10 -7) 📝 `tests/boundary/filesystem/clientConfigurationTransactions.test.ts` (+139 -0) 📝 `tests/boundary/filesystem/clientLifecycle.test.ts` (+23 -2) </details> ### 📄 Description Follow-up to #1163 and #1178. Uninstall still discarded comment-only Codex configuration and overwrote the original `.rea.backup` with the installed registration, making the first configuration snapshot unavailable. Preserve Codex comments when removing or replacing REA tables and keep the first backup across setup, uninstall, and later setup. A failed uninstall restores the captured current configuration while retaining that original backup. Other TOML clients keep their existing editing behavior. Validation: - Latest-main reproduction: seven regression cases fail before this change; four controls pass. - 125 focused tests pass, including quoted/dotted/inline TOML, BOM/CRLF, malformed input, idempotency, adjacent client formats, and failed-write recovery with an older backup. - `npm run build:cached` and `npm run check:fast` pass. - Full `node scripts/verify-package.mjs` passes against the installed tarball: CLI/MCP, four clients, exact Codex text round trip, initial backup retention, symlinks, and failure recovery; no surviving verifier descendants. Run with a temporary root outside the repository and no injected Ghidra/IDA configuration. Configuration-only change. Real Hopper/Ghidra execution was not performed for this PR; packaged provider checks use the existing verifier fixtures. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:09:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2717
No description provided.