Skip to content

Refuse to install the cask over another NodeSpace product; keep databases out of zap - #3380

Closed
mstomar125 wants to merge 2 commits into
mainfrom
issue-3350-cask-preflight
Closed

mstomar125 wants to merge 2 commits into
mainfrom
issue-3350-cask-preflight

Conversation

@mstomar125

@mstomar125 mstomar125 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3350

Core's side of ADR-084 §5 (proposed) for the Homebrew cask. It changes what scripts/update-homebrew-cask.ts generates. Nothing is pushed to the tap: the live cask changes at the next release, when release.yml's sync-homebrew-cask job runs this script with --push.

HOLD: needs the ADR-084 owner before merging

The issue says to stop and raise it if the preflight cannot see a Pro app that replaced a cask-installed core. Testing found it cannot, in a way that goes past the upgrade case the issue anticipated. The cask now protects every reinstall and upgrade from a cask installed with this change or later. It cannot protect the first reinstall or upgrade off a cask installed before it (details under "Residual gap"). That needs a decision, so this PR is a draft.

What it generates

Two install-steps stanzas after binary and before zap, preflight_steps and uninstall_preflight_steps, running the same check when an app is already at #{appdir}/NodeSpace.app:

  • read NodeSpaceProduct from the bundle's Info.plist with /usr/bin/plutil;
  • if the key is absent or empty, the app counts as pro when Contents/MacOS/nodespaced-pro exists, otherwise community;
  • if the product is not community, exit non-zero with the .pkg's message: "NodeSpace Pro is installed. To switch back to the free NodeSpace, uninstall Pro first (NodeSpace → Uninstall NodeSpace Pro…). Your databases stay on this Mac."

It is a static read; nothing inside the bundle is run. appdir is used, so --appdir is respected. ~/.nodespace/database leaves zap trash, as ~/.nodespace/models already had, with the comment above zap rewritten to say why.

Deviations from the issue, with evidence (Homebrew 7.0.4)

  1. preflight_steps, not preflight do ... end. The legacy block is deprecated in Homebrew 7: every install prints Warning: Calling preflight is deprecated! Use preflight_steps instead., and brew style reports Cask/InstallSteps: Casks must use preflight_steps instead of preflight. The acceptance criterion needs brew style to pass, which the legacy block cannot do. Cask install steps arrived in Homebrew 5.1.14, but this stanza also needs if_path_exists and {{appdir}} (6.0.12) and the run step's print_stderr (6.0.13, 2026-07-26). The cask therefore needs Homebrew 6.0.13 or newer; on an older one it fails to load, so brew install and brew upgrade of nodespace error for every free user, not only Pro users. brew update also updates Homebrew itself, so the exposure is a pinned or rarely-updated brew; the rollout note should say so.
  2. A second stanza, uninstall_preflight_steps, with the same check. With only a preflight (legacy or steps), brew reinstall and brew upgrade both bypassed the guard and destroyed the Pro app. Homebrew backs the old app up, removes it, installs the new one, then purges the backup, all before the new version's preflight runs. The installed version's uninstall-phase block runs first, so the check is repeated there. Step 3.4 of the issue ("brew reinstall --cask must refuse") is only achievable this way.
  3. A side effect of (2). A plain brew uninstall --cask also refuses while a non-community app is in place (even with --force), rather than deleting the other product's app. The message tells the user to uninstall Pro first.
  4. The refusal is noisy. The steps DSL has no "abort with this message" step, so the check is a run step whose script exits 1. Homebrew's error prints the full escaped command line, then the message. The message cannot be passed through env: (Homebrew shell-escapes it into the output). The legacy raise CaskError printed the message cleanly; that is the price of (1).
  5. Pre-existing brew style failures fixed. The render on origin/main already fails brew style under Homebrew 7.0.4 with 3 offenses: depends_on arch must precede depends_on macos, and the zap entries must be alphabetical. Both are fixed so the criterion holds.
  6. must_succeed: false is deliberately not used, and a test guards it: run defaults to must_succeed: true, which is what makes the refusal fail the install.

Local-tap results

Scratch tap (brew tap-new), a cask rendered from this generator (only token, version, url, sha256 and the binary stanza changed), a tiny fake .dmg per version, and --appdir/--no-binaries pointed at a scratch directory. The real /Applications/NodeSpace.app, /opt/homebrew/bin/nodespace and the installed nodespace cask were never touched. A fake dmg was used instead of the real release because the check reads only the app already in the appdir. Fixtures replace the installed app the way another product's installer would.

Operation pro key no key + Pro sidecar community key no key, no sidecar
brew install over an existing app refused refused proceeds past the check* proceeds past the check*
brew install --force refused refused installs installs
brew reinstall (installed from this version) refused refused proceeds proceeds
brew upgrade 0.2.0 to 0.2.1 (installed from this version) refused refused proceeds proceeds
brew uninstall refused refused proceeds proceeds

Every refusal printed the message and left the other product's app byte-for-byte in place. *Homebrew's own "It seems there is already an App" applies without --force; the refusal fires first for pro, even with --force.

The same matrix with the legacy preflight do block: brew install refuses, but brew reinstall and brew upgrade proceed and replace the Pro app in every fixture.

  • brew style --cask on the render: no offenses. brew audit --cask and brew audit --cask --strict: exit 0.

Residual gap (needs the ADR-084 owner)

Homebrew runs the installed version's stored definition (the copy in the Caskroom metadata) for the uninstall phase. A cask installed before this change has no guard in that copy, so the first brew reinstall or brew upgrade off it still replaces a Pro app (backed up, then purged). Tested: it proceeds and the Pro app is gone. Nothing in the cask can close this. Options: accept it (no Pro users, and protection starts from the next version); or have the Pro installer take over the cask's record so a later brew upgrade no longer targets the same app. That choice belongs to the ADR-084 owner. Also for the owner:

  • The zap change lags the same way. brew uninstall --zap and brew reinstall --zap run the installed definition's zap, and every existing install still lists ~/.nodespace/database. Until a user's cask is reinstalled onto this definition, a zap still trashes their database, including one shared with another product. The "a zap never deletes databases" goal holds from the next version onward only.
  • What a refused Pro user experiences. The cask stays outdated. Every brew upgrade downloads the whole dmg (the fetch precedes the old app being touched), then fails with the script-dump error, and the overall brew upgrade exits non-zero. brew uninstall, --zap and --force are refused too, so the only ways out are uninstalling Pro or deleting the Caskroom entry by hand.
  • No override. The .pkg keeps NODESPACE_FORCE_COMMUNITY=1 for scripted installs; the cask has none, because the issue specifies none and Homebrew passes no environment to install steps. Say if one is wanted.
  • Known limits, low confidence and not exercised: if HOMEBREW_CACHE is outside $HOME, Homebrew's step sandbox denies reading all of $HOME, so with --appdir=~/Applications the if_path_exists guard would see no app and skip the check; and an appdir containing [ ? * { is treated as a glob.

Ratchet (check-pro-boundary.ts is not on main; #3376 is open)

Nothing to lower: this change adds markers rather than removing them. Measured with #3376's script on this tree against origin/main: editionBranching 122 to 127 (+5) and proWording 312 to 321 (+9), all in the two files below; every other marker is unchanged. With the two per-file exemptions the issue calls for, both return to their baselines and BASELINES need no edit:

{ file: "scripts/update-homebrew-cask.ts", markers: ["editionBranching", "proWording"],
  reason: "ADR-084 §5 recognition point: the transitional fallback names the other product's daemon, and the refusal names the product" },
{ file: "scripts/update-homebrew-cask.test.ts", markers: ["editionBranching", "proWording"],
  reason: "ADR-084 §5 recognition point: the fixture renders the same text as the generator" },

Conflict to resolve in #3376: its exemptionProblems rejects an exemption on a non-test file ("only test files (TEST_PATH) may be exempted. Use fragments in anything else."), and update-homebrew-cask.ts is not a test file. The same applies to the .pkg issue's preinstall and build-pkg.sh. Either #3376 must allow the ADR-084 recognition-point files, or these sources must build their markers from fragments. Whichever lands second needs the entries above (or a baseline refresh of +5/+9).

Tests

bun test scripts/update-homebrew-cask.test.ts: 26 pass. The byte-for-byte expectation is updated and the zap test is rewritten as "zap trash removes both launchd agents but neither the database nor the models". New tests parse the rendered cask, run the real script from it against real fixture bundles through /bin/sh and plutil (darwin only; includes a binary plist, a bundle with executables that record if they run, and no app), and run ruby -c on the whole cask. The fixtures live under a directory with a space in its name, so an unquoted expansion in the script is caught by a behavioral case, not only by the snapshot.

Mutation checks (each applied to the generator, tests run, generator restored). All 23 killed:

  • drop the uninstall stanza; compare against pro instead of community; drop the sidecar fallback; change the message; must_succeed: false; stanzas after zap; database or models back in zap; plutil stderr not silenced; run the bundle's CLI; a # in the script; read the plist with grep instead of plutil; drop the appdir guard; hard-code /Applications; invalid Ruby; the two stanzas run different scripts;
  • sidecar decides even when the key is present; an absent or empty key is never fallen back on; refuse when there is no app;
  • the plutil path unquoted; the sidecar-test path unquoted; a {{token}} in the script.

Also run: bun run test:changed (scripts tier), bun run quality:scripts:fix, bun run scripts/check-code-references.ts (71 / 0, unchanged).

Risks and rollback

A broken stanza would break every brew install of the cask, so brew style, brew audit and the local-tap runs above must stay green. Rollback: revert, then bun run scripts/update-homebrew-cask.ts <version> --push to put the tap back on the previous render.

🤖 Generated with Claude Code

…ases out of zap

The generated cask gains two install-steps stanzas that run one check when an
app is already at the appdir: read NodeSpaceProduct from its Info.plist (or,
when the key is absent, look for the other product's daemon beside the CLI)
and exit non-zero with the .pkg's refusal message unless the product is
community. The check is a static read; nothing inside the bundle is executed.

The check appears twice. preflight_steps covers `brew install`; on
`brew reinstall` and `brew upgrade` Homebrew removes the old app before the new
version's preflight_steps run, so the check is repeated in
uninstall_preflight_steps, which the installed version runs first.

`~/.nodespace/database` leaves the zap trash list, as `~/.nodespace/models`
already had: a zap no longer deletes databases another NodeSpace product may
be using.

Homebrew 7 rejects the previous render under `brew style`: depends_on arch now
precedes depends_on macos, and the zap entries are sorted.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@mstomar125

Copy link
Copy Markdown
Contributor Author

Pragmatic Code Review: PR #3380 (closes #3350)

Review Type: Initial Review (medium depth)

Verdict: COMMENT. No code blocker. The ordering claims check out against the Homebrew 7.0.4 source, and the shell check behaves correctly on every fixture I ran. Two statements in the PR description are inaccurate or incomplete (minimum Homebrew version, and the zap change not reaching existing installs), and one test gap should be closed before undrafting. The draft/HOLD for the ADR-084 owner is the right call and stays.

What I verified myself: bun test scripts/update-homebrew-cask.test.ts (26 pass), eslint + tsc -p scripts/tsconfig.json on scripts (clean), check-code-references.ts (71/71, 0/0), ruby -c on a fresh render, and the Homebrew source (cask/installer.rb, cask/upgrade.rb, cask/artifact/*, install_steps.rb, cask/dsl.rb, sandbox.rb) plus the Homebrew git history for feature availability. I did not re-run brew style/brew audit (they need a tap) or the local-tap experiments (barred on this machine); those results are the author's.


Requirements Check (issue #3350 acceptance criteria)

Criterion Status Notes
Rendered cask has the preflight, no ~/.nodespace/database in zap, passes brew style Met (style not re-run by me) Uses preflight_steps, not preflight do. Deviation is justified: in cask/dsl.rb the legacy preflight calls odeprecated ... "preflight_steps". Zap list verified in the render; ruby -c OK.
Refuses over a pro bundle and over no-key + Pro sidecar Met per PR table I ran the extracted script against 16 bundle variants (below); consistent.
Proceeds over community and over no-key, no sidecar Met per PR table Same.
brew upgrade refused in the Pro-replaced case, or documented + ADR owner decided Partially met, blocked on owner Refused only when the installed record already carries uninstall_preflight_steps (see Finding 1). Owner decision is still outstanding, so the second branch is not satisfied.
test:scripts and quality:scripts:check pass Met for this file I ran the file's tests, eslint, tsc. Full test:scripts not re-run. Note there is no PR CI in this repo (.github/workflows has no PR workflow), so these are local gates only.
check-pro-boundary.ts passes with exemptions and BASELINES Not verifiable / deferred, documented The script is not on main (#3376 open). The PR's conflict claim is accurate: exemptionProblems in the #3299 worktree (scripts/check-pro-boundary.ts:308) rejects an exemption on any non-TEST_PATH file.

Scope items (footer comment above zap rewritten, byte-for-byte fixture updated, zap test renamed, new preflight test) are all done.


Verified claims (the ones the author's track record says to distrust)

  1. Ordering on reinstall/upgrade: TRUE, from source.

    • AbstractArtifact#sort_order puts PreflightSteps, UninstallPreflightSteps at indexes 0 and 1, before Uninstall and App. ArtifactSet#each iterates to_a.sort, so uninstall_artifacts runs UninstallPreflightSteps#uninstall_phase before the App artifact's uninstall/move-back.
    • UninstallPreflightSteps#uninstall_phase calls run_steps(command) with the default :install phase, so guards are evaluated and the run executes. By contrast PreflightSteps#uninstall_phase runs with phase: :uninstall, where run_uninstall_step ignores everything except symlink ... uninstall: true. So a plain preflight_steps is a no-op on uninstall, which is why the second stanza is needed.
    • Upgrade: upgrade_cask calls old_cask_installer.start_upgrade (= uninstall_artifacts then backup) before new_cask_installer.stage and install_artifacts. The new version's preflight_steps therefore runs after the old app is gone and the backup purged. Confirmed.
    • The refusal raises inside start_upgrade, before started_upgrade = true, so nothing has been moved when it fails. upgrade_casks! catches it per cask (ofail), continues with other casks, and exits non-zero at the end.
    • Reinstall: Installer#install runs uninstall_existing_cask (which goes through uninstall) before stage/install_artifacts.
  2. Which definition runs in the uninstall phase: the installed one, as claimed. Installer#uninstall and #zap call load_installed_caskfile!; upgrade builds old_cask from the installed caskfile (cask/upgrade.rb:200). The artifacts come from the receipt's uninstall_artifacts. The real cask on this machine confirms it: /opt/homebrew/Caskroom/nodespace/.metadata/INSTALL_RECEIPT.json (v0.3.0) records app, binary and a zap whose trash list still contains ~/.nodespace/database.

  3. Escaping layers hold. I evaluated the rendered cask under a stub DSL in Ruby and compared the <<~SH string to the script the test extracts textually: byte-identical, for both stanzas, argv0 sh, path {{appdir}}/NodeSpace.app, print_stderr: false. The message halves assemble to exactly the .pkg wording (msg=HEAD, then msg="$msg TAIL").

  4. Shell behavior (run with env -i PATH=/usr/bin:/bin /bin/sh -c, in a path containing a space):

    Bundle Result
    community proceed
    pro, Community (case), community (trailing space), whitespace-only refuse (strict equality, same as the .pkg)
    integer, bool, real, date, data, array refuse
    empty string, no key, <dict/> fall back to sidecar test, so proceed when none

    A plutil failure of any kind (missing or corrupt plist) falls through to the sidecar test. That is the deliberate fail-open the .pkg also has. Nothing in the bundle is executed: the only external programs are /usr/bin/plutil (parse-only, -o - so it never rewrites the plist) and the builtin [ -e ]. -e follows a symlinked app or sidecar; a dangling sidecar symlink reads as absent.

  5. False positives for free core. A free bundle built before the key exists has no NodeSpaceProduct and no Contents/MacOS/nodespaced-pro (tauri.conf.json bundles only binaries/nodespaced; the sidecar is in tauri.pro.conf.json), so it is always treated as community. I found no way to falsely refuse a free install other than a future free build declaring a value other than exactly community, which is a contract to keep in step with Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349.


Code Review Findings

[Improvement] 1. PR description understates the minimum Homebrew version (5.1.14 claimed; it is 6.0.13).
scripts/update-homebrew-cask.ts:218-226 (rendered stanza). The PR says a Homebrew older than 5.1.14 cannot load the cask. From the Homebrew git history in /opt/homebrew: preflight_steps/uninstall_preflight_steps arrive in 5.1.14, but if_path_exists guards arrive in 6.0.12, the {{appdir}} token in step content in 6.0.12, and run with print_stderr in 6.0.13. The cask as rendered needs 6.0.13 or later (2026-07-26). On anything older, the cask fails to load (brew install/upgrade of nodespace errors for every free user, not only Pro). It is realistically narrow (a user who gets the new cask via brew update also gets a new brew, unless auto-update and brew update are both skipped, e.g. a pinned CI image that taps directly), but the PR is explicit that this deviation is the price of passing brew style, so the number should be right and the rollout note should say it. Principle: state the real blast radius of a change that can make the cask unloadable.

[Improvement] 2. The zap change does not reach existing installs; the PR's residual-gap section covers only the preflight.
Installer#zap runs the installed record, the same mechanism as the residual gap. Every existing user's receipt (see the real receipt above) still lists ~/.nodespace/database, so after this ships, brew uninstall --zap nodespace (and brew reinstall --zap) still trashes the database, including one shared with another NodeSpace product, until that user's cask is reinstalled or upgraded onto the new definition. The issue's stated goal ("a zap then never deletes databases that another NodeSpace product may be using") holds only from the next version onward. Add this to "Residual gap" so the ADR owner decides with both halves in view. Principle: don't overstate what a fix guarantees when the mechanism (recorded artifacts) defers it.

[Improvement] 3. Residual gap: say what a "refused" Pro user actually experiences.
The description says "refuse", which is accurate, but for a machine where Pro replaced a cask-installed core the outcome is: the cask stays outdated forever, every brew upgrade downloads the whole new dmg (fetch happens before start_upgrade), fails with the script-dump error, and the overall brew upgrade exits non-zero (upgrade.rb: failed = true per cask). brew uninstall/--zap/--force are also refused, so the only exit is uninstalling Pro (as the message says) or deleting the Caskroom entry by hand. That is acceptable, but the owner deciding between "accept" and "Pro installer takes over the cask record" should see it. Also note the .pkg (#3349 branch) has a NODESPACE_FORCE_COMMUNITY=1 escape hatch that the cask does not; worth confirming that difference is intended.

[Improvement] 4. Tests: script quoting is protected only by the byte-for-byte snapshot; no behavioral case has a space in the app path.
scripts/update-homebrew-cask.test.ts:293-336 (bundle()/check()). I mutated a copy of the generator to plutil ... -o - $plist (unquoted). Only renders the full expected cask byte-for-byte failed; all 8 table-driven behavioral cases still passed, because the temp path has no spaces. With a real --appdir containing a space, that mutation makes plutil misread the path, the product comes back empty, and a Pro app is waved through (fail-open). Cheap fix: create the fixtures under a directory name with a space (e.g. join(tmp, "My Apps")). The -e "$1/..." quoting is pinned textually (toContain) rather than behaviorally, which is brittle.

[Nit] 5. Skipped describe still creates its temp dir and never removes it.
scripts/update-homebrew-cask.test.ts:293-295. Verified with Bun 1.4.2: inside describe.skipIf(true), the body runs (so mkdtempSync executes) but afterAll does not. On a non-darwin host each run leaks an empty cask-preflight-* directory. Move the mkdtempSync into a beforeAll. (setDefaultTimeout is file-scoped in Bun, so that call does not leak into other files; I checked.)

[Nit] 6. Undocumented constraint: Homebrew expands {{token}} in every run argument, including the script.
scripts/update-homebrew-cask.ts:186,195. The comments list what to avoid (", \, $, backtick, #), but expand_template_tokens also rewrites any {{identifier}} in the script. No current line contains one; mention it next to the other restrictions. (The "no #" rule is stricter than Ruby needs, only #{, #$, #@ interpolate, but it is a safe and tested rule.)

[Nit] 7. Optional stronger test for the Ruby layer.
scripts/update-homebrew-cask.test.ts:261. The test proves the text has no #/\; it does not prove what Ruby hands to sh. My stub-DSL evaluation (about 15 lines of ruby -e) showed the two are identical today; folding that into the darwin-gated ruby -c test would make the equivalence enforced rather than assumed.

[Nit] 8. Refusal wording on brew uninstall.
"To switch back to the free NodeSpace, uninstall Pro first" reads oddly when the user ran brew uninstall. Reusing the .pkg wording is a defensible choice (one message everywhere); just be aware.

Low-confidence, not verified by running: a possible fail-open in Homebrew's sandbox. Steps run inside Sandbox with deny_read_home. In the default configuration (Homebrew cache under $HOME) only a list of credential and personal-data directories is denied, so ~/Applications is readable. If HOMEBREW_CACHE is outside $HOME, the sandbox denies reading all of $HOME, and with --appdir=~/Applications the if_path_exists guard (evaluated in the sandboxed child) would see no app and skip the check. Also expand_path_glob treats an appdir containing [ ? * { as a glob. Both are rare; mentioned for completeness, not a request for change.


Answers to the specific review questions

  • Refusal-on-uninstall (item 3): acceptable and the direction is right (never delete another product's app). It is documented in the generator comment (update-homebrew-cask.ts:226-233) and the PR body, but not for users; the message is the only user-facing explanation. See Finding 3. A user who deleted the app by hand is unaffected (the if_path_exists guard skips the run).
  • Zap-removal consistency (item 6): grep of the repo (scripts, README, packages incl. packages/skill, .claude/skills) found nothing else documenting or relying on brew uninstall --zap deleting the database. scripts/uninstall.sh:4,86 already says the data at ~/.nodespace/database/ is preserved, so the new behavior makes the cask consistent with it. The only inconsistency is the existing-install lag in Finding 2. I could not check the website/docs repos from here.
  • CLAUDE.md compliance (item 7): no issue-number references in code comments (check-code-references.ts unchanged at 71/0), no lint suppression, comments explain why. The nodespaced-pro fallback is transitional and mandated by the issue/ADR-084, not gratuitous backward-compat.
  • Draft/HOLD accuracy (item 8): accurate about the mechanism and the outcome for installs from this version onward, and honest that legacy preflight do was tested and bypassed. It understates (a) the true minimum Homebrew version, (b) that zap is also unchanged for existing installs, (c) the repeated-failure experience and lack of an escape hatch for a Pro user. The Local-tap table and mutation list are plausible and consistent with my source reading, but they are the author's evidence, not re-run here.

Recommendation: COMMENT

Keep the PR as a draft pending the ADR-084 owner's decision on the residual gap. Before undrafting: correct the Homebrew minimum (Finding 1), add the existing-install zap lag and the repeated-failure behavior to the residual-gap section (Findings 2 and 3), and add a space-in-path behavioral test (Finding 4). Findings 5-8 are optional polish.

Automated review by the Principal Engineer Reviewer sub-agent.

@mstomar125 mstomar125 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Automated pragmatic-code-review: COMMENT (posted as a comment, GitHub blocks self-approval). Full findings in the review comment above.

The behavioral fixtures now live under a directory with a space in its name,
so an unquoted expansion in the check script lets a refusal pass and a test
fails; before, only the byte-for-byte snapshot noticed. The fixture directory
is created in beforeAll rather than at collection time, so a skipped describe
off macOS no longer leaves one behind.

The script-safety test also rejects `{{`, which Homebrew expands in every run
argument, and the generator comment names that restriction.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@mstomar125

Copy link
Copy Markdown
Contributor Author

Address-review summary (responds to the review above)

Pushed 4aeefee1. The rendered cask is byte-for-byte unchanged, so the local-tap results and brew style / brew audit results in the description still describe what the generator produces. bun test scripts/update-homebrew-cask.test.ts passes (26), quality:scripts:fix is clean.

Addressed (5 of 8)

  • 1 (Improvement), minimum Homebrew. Verified from Homebrew's history: if_path_exists and {{appdir}} arrived in 6.0.12 and the run step's print_stderr in 6.0.13. The description now says 6.0.13 (it said 5.1.14) and notes that older brews fail to load the cask for every free user.
  • 2 (Improvement), zap lag. Added to the residual-gap section: existing installs still zap the database until their cask is reinstalled onto this definition.
  • 3 (Improvement), the refused-Pro-user experience. Added to the residual-gap section for the ADR-084 owner: repeated dmg downloads and a non-zero brew upgrade, uninstall/zap/force also refused, and no NODESPACE_FORCE_COMMUNITY equivalent (the issue specifies none). The draft/HOLD stays.
  • 4 (Improvement), quoting test gap. Fixtures now live under a directory with a space in its name. Mutation-checked: an unquoted $plist is now killed by four behavioral cases and an unquoted sidecar path by three, where before only the snapshot noticed.
  • 5 (Nit), leaked temp dir off macOS. The directory is created in beforeAll. Confirmed with a scratch test that a skipped describe runs its body but not its hooks.
  • 6 (Nit), {{token}} restriction. Named in the generator comment, and the script-safety test now rejects {{ (isolated mutation killed).

Skipped (2 of 8)

  • 7 (Nit), stub-DSL Ruby test. The existing test proves the script text has no #, backslash or {{, which are the only inputs that could make Ruby or Homebrew alter it, and the reviewer's stub run confirmed equivalence today. A 15-line Ruby harness in the test suite is disproportionate. Revisit if the heredoc form ever changes.
  • 8 (Nit), refusal wording on brew uninstall. The wording is the .pkg's on purpose, so a user meets one message whichever installer they use.

Re-Review Decision

Decision: NO RE-REVIEW NEEDED

Rationale: This round changed no product behavior: the generated cask is identical, and the code changes are test-hardening the reviewer prescribed (each mutation-checked), a moved beforeAll, one comment, and description corrections. The reviewer's verdict was COMMENT with no code blocker; the remaining open item is the ADR-084 owner's decision on the residual gap, which is why this stays a draft.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Held as draft (coordinator): not needed for the core-only release — it guards Pro installs (no Pro users yet), needs an ADR-084 owner decision on the Homebrew ordering limitation, and raises the minimum Homebrew to 6.0.13 for every free user. Revisit after ADR-084 is accepted.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Superseded by #3606, which carries all of the coexistence work for the issue in one PR, reworked to the accepted ADR-084: every check compares NodeSpaceProduct with community, with no fallback for bundles without the key and no wording that names another product.

🤖 Generated with Claude Code

@mstomar125 mstomar125 closed this Oct 5, 2026
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.

Add a Homebrew cask preflight for other NodeSpace products; keep databases out of zap

1 participant