[PR #2934] [CLOSED] fix(package-verifier): compare client backups to the original snapshot #5501

Closed
opened 2026-10-31 01:07:09 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2934
Author: @CodeAlex52
Created: 10/13/2026
Status: ❌ Closed

Base: main ← Head: fix/package-verifier-backup-original


📝 Commits (3)

  • 59bab52 fix(package-verifier): compare client backups to the original snapshot
  • 587495f fix(package-verifier): use fixture-owned client snapshots
  • e669c4f test(package): assert setup preserves fixture snapshots

📊 Changes

4 files changed (+36 additions, -18 deletions)

View changed files

📝 scripts/verify-package-environment.d.mts (+2 -0)
📝 scripts/verify-package-environment.mjs (+7 -2)
📝 scripts/verify-package-setup.mjs (+25 -16)
📝 scripts/verify-package.mjs (+2 -0)

📄 Description

Summary

Fixes #2526.

The Claude Desktop backup assertion now compares the retained backup against the known original snapshot, so a backup holding the post-setup configuration is rejected.

Problem and expected behavior

assertClientConfig (scripts/verify-package-setup.mjs:418-430) accepted any backup containing the text existing. The post-setup configuration contains that text too, so a backup that did not preserve the first snapshot passed the retention check; Cursor already receives an exact comparison later, Claude Desktop did not.

Expected (per the issue's restoration check): the retained original backup is accepted, a backup containing the post-setup configuration is rejected, a backup without existing is rejected, and a wrong live registration is still rejected.

Change and scope

scripts/verify-package-setup.mjs: added CLIENT_CONFIG_ORIGINAL (the fixture's original client snapshot) next to CODEX_ORIGINAL, used it for the exact backup comparison in assertClientConfig, and reused it for the two Cursor comparisons that previously inlined the same literal. No other assertion or lane changes.

Verification

I ran the issue's diagnostic (extracting the assertion from the modified source with new Function, as the report does) against disposable fixtures:

1. original backup: accepted
2. post-setup backup differing from original: rejected
3. backup without existing: rejected
4. wrong live registration: rejected

As a control, the same diagnostic against the unmodified scripts/verify-package-setup.mjs fails case 2 with AssertionError: Missing expected rejection, which is the reported false acceptance. I did not run the packaged setup lane or the repository's static checks in this environment.


🔄 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/2934 **Author:** [@CodeAlex52](https://github.com/CodeAlex52) **Created:** 10/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/package-verifier-backup-original` --- ### 📝 Commits (3) - [`59bab52`](https://github.com/morluto/rea/commit/59bab5269fef4c722d47f21dbc1d96704b7c856b) fix(package-verifier): compare client backups to the original snapshot - [`587495f`](https://github.com/morluto/rea/commit/587495ffd2ba09645e972e77bc537e600046cee2) fix(package-verifier): use fixture-owned client snapshots - [`e669c4f`](https://github.com/morluto/rea/commit/e669c4f2074257ff1f5ffa0fa1a3d265fc9e47be) test(package): assert setup preserves fixture snapshots ### 📊 Changes **4 files changed** (+36 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `scripts/verify-package-environment.d.mts` (+2 -0) 📝 `scripts/verify-package-environment.mjs` (+7 -2) 📝 `scripts/verify-package-setup.mjs` (+25 -16) 📝 `scripts/verify-package.mjs` (+2 -0) </details> ### 📄 Description ## Summary Fixes #2526. The Claude Desktop backup assertion now compares the retained backup against the known original snapshot, so a backup holding the post-setup configuration is rejected. ## Problem and expected behavior `assertClientConfig` (`scripts/verify-package-setup.mjs:418-430`) accepted any backup containing the text `existing`. The post-setup configuration contains that text too, so a backup that did not preserve the first snapshot passed the retention check; Cursor already receives an exact comparison later, Claude Desktop did not. Expected (per the issue's restoration check): the retained original backup is accepted, a backup containing the post-setup configuration is rejected, a backup without `existing` is rejected, and a wrong live registration is still rejected. ## Change and scope `scripts/verify-package-setup.mjs`: added `CLIENT_CONFIG_ORIGINAL` (the fixture's original client snapshot) next to `CODEX_ORIGINAL`, used it for the exact backup comparison in `assertClientConfig`, and reused it for the two Cursor comparisons that previously inlined the same literal. No other assertion or lane changes. ## Verification I ran the issue's diagnostic (extracting the assertion from the modified source with `new Function`, as the report does) against disposable fixtures: ```text 1. original backup: accepted 2. post-setup backup differing from original: rejected 3. backup without existing: rejected 4. wrong live registration: rejected ``` As a control, the same diagnostic against the unmodified `scripts/verify-package-setup.mjs` fails case 2 with `AssertionError: Missing expected rejection`, which is the reported false acceptance. I did not run the packaged setup lane or the repository's static checks in this environment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:07:09 +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#5501
No description provided.