Skip to content

fix(cask): zap real @memry userData and updater caches - #898

Merged
h4yfans merged 3 commits into
mainfrom
cask-zap-real-userdata-paths
Jul 23, 2026
Merged

fix(cask): zap real @memry userData and updater caches#898
h4yfans merged 3 commits into
mainfrom
cask-zap-real-userdata-paths

Conversation

@h4yfans

@h4yfans h4yfans commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

brew uninstall --zap only trashed aspirational MemryNote paths and left all real app state behind: userData is keyed by package.json name (@memry/desktop) because electron-builder never writes productName into the asar package.json.

Makes the cask zap trash list the full union across all three naming eras (existing entries kept — harmless):

Today's real dirs (verified on disk):

  • ~/Library/Application Support/@memry — real userData parent (Chromium profile, crdt-store, models, config, secure-secrets)
  • ~/Library/Caches/@memrydesktop-updater — electron-updater download cache (app.name with / sanitized)
  • ~/Library/Caches/com.memrynote.memry.ShipIt — Squirrel.Mac update staging
  • ~/Library/HTTPStorages/com.memrynote.memry
  • ~/Library/Logs/@memry — where prod logs actually live today

Post-identity-rename dirs (PR #897 moves userData/logs/updater cache to memrynote):

  • ~/Library/Application Support/memrynote
  • ~/Library/Caches/memrynote-updater
  • ~/Library/Logs/memrynote

Also adds five selfcheck regression asserts pinning the @memry, updater-cache, and memrynote entries.

Deliberate decisions, for review:

  • Vault content is NOT zapped. Notes and both SQLite DBs live inside the vault (<vault>/.memry/data.db|index.db, default ~/Documents/Memry) — casks don't touch Documents. Zap removes app state only, which is the zap convention (--zap is an explicit opt-in; plain brew uninstall still preserves everything).
  • The existing Caches/com.memrynote.memry entry was already correct: macOS-level Caches/HTTPStorages/Preferences/ShipIt are keyed by bundle id (rename-independent), while Chromium's session cache lives inside userData (sessionData defaults to it). There is no ~/Library/Caches/@memry.
  • This list is a superset of PR feat(app): rename the runtime identity to memrynote (logs, userData, Safe Storage) with legacy migration #897's cask edit — when the two branches conflict in the zap array, resolve by taking this block. @memry* entries stay for not-yet-migrated installs; feat(app): rename the runtime identity to memrynote (logs, userData, Safe Storage) with legacy migration #897's log migration deletes the emptied @memry Logs parent anyway.
  • Keychain items can't be trashed by path and remain after zap (standard cask leftover).
  • No tap-repo change needed: memrynote/homebrew-tap is fully generator-owned (publish-release overwrites Casks/memry.rb each release), so this propagates on the next release.

Release note

Homebrew: brew uninstall --zap now fully removes app data (settings, caches, logs, local sync state). Notes in your vault folder are never touched.

Test plan

  • node scripts/generate-homebrew-cask.mjs --selfcheck — green, including the five new asserts
  • Rendered the full cask and eyeballed the zap stanza
  • Verified every current-era path exists under ~/Library on a machine running prod builds; confirmed Application Support/MemryNote does not exist; memrynote entries match PR feat(app): rename the runtime identity to memrynote (logs, userData, Safe Storage) with legacy migration #897's rename targets (app-identity.ts)
  • Confirmed the setPath('userData') override is --device dev-profile-only (apps/desktop/src/main/index.ts:163) — prod path is stable
  • pnpm docs:impact --base origin/main --strict — no docs-relevant changes

brew uninstall --zap only trashed aspirational MemryNote/ paths; real app
state lives under Application Support/@Memry (userData is keyed by
package.json name — electron-builder never writes productName into the
asar). Add the verified-on-disk dirs: @Memry userData parent,
@memrydesktop-updater electron-updater cache, ShipIt staging, and
HTTPStorages. Vault content (~/Documents/Memry incl. .memry/*.db) is
deliberately not zapped; Logs entries are owned by the electron-log dir
rename change.
Copilot AI review requested due to automatic review settings July 23, 2026 16:59

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the bug Something isn't working label Jul 23, 2026
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

PR #897 renames the runtime identity (setName + userData) from
@memry/desktop to memrynote, which also renames the electron-updater
cache. Add the memrynote userData/logs/updater-cache entries so the cask
stays correct after that lands, plus ~/Library/Logs/@Memry which is
where prod logs actually live today. @Memry* entries remain for
not-yet-migrated installs; bundle-id entries are rename-independent.
This makes the zap list the full union — resolve #897's cask conflict
by taking this block.
Copilot AI review requested due to automatic review settings July 23, 2026 18:10

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Union of both lists; drop Logs/MemryNote following main's deliberate
removal (path never existed and the memrynote identity supersedes it).
Copilot AI review requested due to automatic review settings July 23, 2026 18:14

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@h4yfans
h4yfans marked this pull request as ready for review July 23, 2026 18:15
@h4yfans
h4yfans merged commit 1a2e7ad into main Jul 23, 2026
15 of 16 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants