Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
pro-boundaryPro/core boundary: Pro code moves to nodespace-sync (ADR-081..085)
Description
Summary
Core's side of ADR-084 §5 (proposed) for the Homebrew cask. scripts/update-homebrew-cask.ts generates Casks/nodespace.rb. This issue changes two things in what it generates.
- A
preflightblock. It abortsbrew install,brew upgradeandbrew reinstall --cask nodespacewhen#{appdir}/NodeSpace.appdeclares a product other thancommunity, with the same message as the.pkg.- If the
NodeSpaceProductkey is absent, the app counts asprowhenContents/MacOS/nodespaced-proexists.
- If the
- The
zap trashlist.~/.nodespace/databaseleaves the list, as~/.nodespace/modelsalready has. A zap then never deletes databases that another NodeSpace product may be using.
Context
- The generator. In
scripts/update-homebrew-cask.ts:CASK_FOOTER(181-197) rendersapp,binaryandzap trash(185-195).renderCask(211-229) assembles the cask.
- Its tests.
scripts/update-homebrew-cask.test.tshas:- a byte-for-byte test (line 72);
- a zap test (line 140), which today asserts that the database is zapped.
- When the change reaches users. The tap's live cask changes at the next release, when
release.yml'ssync-homebrew-caskjob runs this script with--push. This PR pushes nothing. - Homebrew DSL notes:
preflight do ... endruns Ruby before the artifacts are installed.- Raise
CaskErrorto abort. - Read the key with
system_command "/usr/bin/plutil", args: ["-extract", "NodeSpaceProduct", "raw", "-o", "-", plist], print_stderr: false. Treat a failure or empty stdout as "key absent". - Use
appdir, so--appdiris respected. brew stylechecks stanza order: putpreflightafterbinaryand beforezap.
- Verify the upgrade ordering. During
brew upgrade --cask, Homebrew may move the old version'sappartifact aside before the new version'spreflightruns. If so, the preflight cannot see a Pro app that replaced a cask-installed core.- Test this with a local tap (see Steps).
- If the preflight does not see the app, stop and raise it with the ADR-084 owner before merging.
- Ratchet exemptions. This generator is ADR-084's third recognition point. Its test's byte-for-byte fixture renders the same Pro-named text, so both files need exemptions.
Scope
CASK_FOOTER:- Add the
preflightblock afterbinary. - Remove
"~/.nodespace/database"fromzap trash. - Update the comment above
zap: neither models nor databases are zapped, and why.
- Add the
- Tests:
- Update the byte-for-byte expectation.
- Rename and rewrite the zap test: "zap trash removes both launchd agents but neither the database nor the models".
- Add a test that the rendered cask has a
preflightthat:- reads
NodeSpaceProduct; - compares it with
community; - has the
nodespaced-profallback; - raises the ADR message.
- reads
scripts/check-pro-boundary.ts:- Add per-file exemptions on
editionBranchingandproWordingforscripts/update-homebrew-cask.tsandscripts/update-homebrew-cask.test.ts, with the ADR-084 §5 recognition-point comment. - Paste
BASELINES.
- Add per-file exemptions on
Out of scope
- The
nodespace-cliformula. ADR-084's P2 check for its service is the Pro installer's job. - The
.pkg(Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349) and the CLI (Make nodespace uninstall refuse when the installed app is not the free NodeSpace #3351).
Steps
- Run the startup sequence, and assign the issue at pickup.
- Edit the generator and its tests.
- Check the rendered cask:
- Render a cask locally with a fake digest. The test helpers already do this.
- Run
brew style --caskon the rendered file. - If you can, also run
brew audit --caskon a local tap.
- Test with a local tap:
- Create a tap with
brew tap-new, holding a cask whoseurlpoints at a local.dmgof the current release. - Install it.
- Replace
/Applications/NodeSpace.appwith a fake bundle that declaresNodeSpaceProduct = pro. - Run
brew reinstall --cask. It must refuse. - Run
brew upgrade --caskto a bumped version. It must refuse. - Record the results in the PR.
- Create a tap with
- Add the exemptions and paste the baselines.
- Run
bun run test:scriptsandbun run quality:scripts:check, push, and open the PR.
Acceptance criteria
- The rendered cask has the
preflight, has no~/.nodespace/databaseinzap, and passesbrew style. - With the local tap, the cask refuses to install over:
- a bundle that declares
pro; - a bundle with no key and the Pro sidecar.
- a bundle that declares
- With the local tap, the cask proceeds over:
- a bundle that declares
community; - a bundle with no key and no Pro sidecar.
- a bundle that declares
- One of these holds:
brew upgradeis refused in the Pro-replaced case;- the PR documents that Homebrew's ordering prevents the refusal, and the ADR-084 owner has decided what to do.
-
bun run test:scriptsandbun run quality:scripts:checkpass. -
bun run scripts/check-pro-boundary.tspasses, withBASELINESpasted and the two exemptions in place.
Tests and verification
- Commands:
bun test scripts/update-homebrew-cask.test.tsbun run test:scriptsbrew style --cask <rendered file>
- Manual: the local-tap steps above.
Dependencies
- NodeSpaceAI/nodespace-docs#94 (ADR-084) (ADR-084 decision 5, proposed).
- Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299: the ratchet.
Risks and rollback
- A Ruby error in
preflightbreaks everybrew installof the cask.brew styleand the local-tap install must pass before merge. - Rollback: revert the PR, then re-run
bun run scripts/update-homebrew-cask.ts <version> --pushso the tap goes back to the previous render.
Plan key: C8.7 (pro-boundary DAG).
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
pro-boundaryPro/core boundary: Pro code moves to nodespace-sync (ADR-081..085)
Activity
mstomar125 commentedon Oct 1, 2026
Superseded by #3415 (umbrella against the final ADR-081–085)