Skip to content

Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct - #3381

Closed
mstomar125 wants to merge 4 commits into
mainfrom
issue-3349-pkg-preinstall-guard
Closed

mstomar125 wants to merge 4 commits into
mainfrom
issue-3349-pkg-preinstall-guard

Conversation

@mstomar125

@mstomar125 mstomar125 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3349

Core's side of ADR-084 §5 (proposed) for the .pkg: the app bundle declares which product it is, and the guard against installing over another NodeSpace product moves from postinstall (after the payload is written, executing the installed nodespaced as root, and never firing) to two pre-install checks that read only static data.

What changed

  • NodeSpaceProduct = community in the bundle. packages/desktop-app/src-tauri/Info.product.plist holds the one key; tauri.conf.json names it under bundle.macOS.infoPlist. The file is deliberately not called Info.plist, which Tauri auto-merges and a build config cannot un-merge.
  • New scripts/pkg-resources/preinstall (git mode 100755, picked up by the existing pkgbuild --scripts). It locates the app through $3, reads the key with /usr/bin/plutil, and falls back to "is the other product's daemon in Contents/MacOS" only when the key is absent. It refuses with the ADR message and exit 1 unless NODESPACE_FORCE_COMMUNITY=1. It runs nothing under the bundle or /usr/local/bin.
  • Distribution installation-check in build-pkg.sh. Same decision in Installer JS, refusing with my.result.type = 'Fatal' so the GUI shows the real message instead of a generic "installation failed". It honours the override through system.env. An unreadable Info.plist degrades to the daemon-file check exactly as preinstall does; any other exception fails open and logs, because preinstall makes the same decision (added beyond the issue text).
  • postinstall: guard block, NODESPACED, and the header bullet removed, remaining bullets renumbered. Everything else, including the launchd-bootstrap block, is byte-identical.
  • release.yml: verify_layout requires the installed bundle's NodeSpaceProduct to read community, and after the two installs the build fails if /var/log/install.log contains the check's failure line, so a throwing check cannot silently turn the GUI refusal off (a missing log passes; a test runs the extracted block under bash -eo pipefail against temp logs, using the real log lines both catches produce).
  • One stale comment in scripts/check-version-sync.ts claimed the installer's postinstall queries nodespaced --version. It never did, and now runs no daemon at all.

postinstall no longer touches nodespaced --edition, so this is independent of the flag removal in the daemon.

Tests and mutation checks

scripts/pkg-preinstall.test.ts (19 tests) runs the real script against fixture bundles under a temp volume with a scrubbed environment: the issue's full matrix, plus key-beats-fallback, override only for 1, and the exact refusal text. Every fixture bundle's executables write a sentinel file, and every case asserts it was never created. It also covers the static facts: postinstall has no edition flag, no override variable, and every line naming the daemon is a chmod/chown; tauri.conf.json's infoPlist names an existing plist that isn't Info.plist and declares community.

scripts/pkg-installation-check.test.ts (17 tests) renders the actual distribution.xml heredoc out of build-pkg.sh under bash, extracts the generated JS and runs it in a vm context with a mocked system/my. It checks the decision matrix (including the two catch levels), that the shell did not mangle the script, that productbuild accepts the XML, and that the refusal text equals preinstall's stderr.

Mutation checks: 40 mutations applied one at a time to the real files (fallback dropped, override dropped or loosened to any value, refusal always allowed, exit 0 on refusal, a daemon run under the bundle, /usr/local/bin reached into, old probe re-added to postinstall, wrong infoPlist name / missing file / wrong product, installation-check element dropped, unguarded system.env, fail-closed or rethrowing catches, message and tripwire-text drift, a $ in the heredoc, broken XML, and others). 39 were caught. The survivor, removing the JS early return for "no app installed", is an equivalent mutant: plistAtPath returns null, the fallback finds no daemon and the result is still community. One test I first wrote (trailing slashes on $3) could not fail if the strip loop were removed, since //Applications resolves fine, so I deleted it rather than keep a placebo.

bun run test:changed (every tier, because .github/ is an unrecognized path: frontend 5356, browser 136, skill 95, scripts 780, Rust 4098), bun run quality:scripts:check and bash -n on both scripts pass, and scripts/postinstall-bootstrap.test.ts is unchanged and green.

Verification outside the test suite

  • The key lands in a built bundle. I did not build the full app (shared machine, cold llama.cpp build). Instead I ran the real Tauri CLI 2.11.4 (tauri bundle --bundles app) on a scratch crate whose bundle.macOS section is copied from this config, using the real Info.product.plist, from both the src-tauri directory and its parent (CI runs it from the package directory): the resulting Info.plist has NodeSpaceProduct => community either way. Tauri's compile-time plist embedding only reads a file named Info.plist, so infoPlist doesn't affect the Rust build.
  • Installer JS. On macOS 27.0.1, using query-only installer -volinfo -pkg on scratch packages (no -target, nothing installed): system.env exists and exposes the installer process's environment (NODESPACE_FORCE_COMMUNITY=1 was visible); plistAtPath returns null for a missing file and undefined for a missing key; fileExistsAtPath behaves as the check assumes; literal → and … survive in the JS string. So the Distribution check can and does honour the override, and the "leave it out" fallback in the issue was not needed.
  • release.yml lines. The plutil lines run against the Tauri-built scratch bundle (pass) and against pro and no-key fixtures (fail with a clear message). The tripwire block was run against a clean log, a log containing the marker, and a missing log (pass, fail, pass).

Not verified

  • No .pkg was installed, so the real refusal (Fatal dialog in the GUI, exit 1 from installer) was never observed end to end, and neither was the CI double install. The logic is covered by the tests above; the Installer API shapes they mock were checked on a real Installer.
  • Whether NODESPACE_FORCE_COMMUNITY=1 reaches the preinstall script under sudo NODESPACE_FORCE_COMMUNITY=1 installer ... needs a real install. The Distribution check sees the variable (above), but installer scripts run in a separate environment, so the script may not. The Installer app has no way to set the variable at all. Worth a manual check on a spare user or VM, and if it doesn't reach the script, the ADR-084 owner should know (the issue's manual step 4).

Pro-boundary ratchet (#3299 / #3376 not on main yet)

Issue step 6 (per-file exemptions and BASELINES) is not in this PR: scripts/check-pro-boundary.ts does not exist on main. Separately, #3376's exemptionProblems only admits test files, so exemption entries for scripts/pkg-resources/preinstall and scripts/build-pkg.sh as the issue describes would be rejected; the tests here use fragments instead, and product code names the markers plainly (fragments in product code hide the code).

I ran #3376's checker against this branch and against clean origin/main at the same base (dac00a70):

marker main this PR delta
editionBranching 113 114 +1
proWording 294 290 -4
all others 0

editionBranching rises because the two recognition points name the other daemon and the override variable (4 lines: preinstall 47, 54; build-pkg.sh 235, 241) against 3 removed from postinstall. proWording falls: the only new hits are the refusal message (3 lines) against 7 removed. This is accepted raise class 1 (the installer guard ADR-084 assigns to core). If #3376 merges first, BASELINES.editionBranching must be 114 in this diff (its test:scripts check fails otherwise); the PR that merges second should reconcile. That step is the one acceptance item of the issue this PR does not meet, so Closes is only earned once the baseline is in.

The acceptance line about nodespaced-pro / NODESPACE_FORCE_COMMUNITY appearing under scripts/ only in preinstall and build-pkg.sh holds for everything this PR adds. scripts/refresh-pro-proto.ts also contains nodespaced-pro (a path into the sibling repo), which predates this change and goes with the vendored proto.

Recommended follow-up

An end-to-end guard test on the ephemeral macOS release runner: set NodeSpaceProduct to the other product in the installed Info.plist, assert sudo installer -pkg ... -target / fails and leaves the bundle untouched, then repeat with sudo NODESPACE_FORCE_COMMUNITY=1 to settle whether the override reaches preinstall. It was left out of this PR because it would put untested logic in the live release pipeline (installer exit-code behaviour for a Fatal check is unobserved). Until then the override under sudo installer should be treated as unproven: if it does not reach the script, the Distribution check would let the install through only for preinstall to refuse it with the generic error.

Risk

Merging before the Pro GUI builds from a pinned core rev means a Pro build taken from core HEAD would declare community and pass this guard. Per the standing decision that sync-side dependencies are ignored, that is accepted here; the Pro build has to override the key when it bumps past this commit.

🤖 Generated with Claude Code

@mstomar125

Copy link
Copy Markdown
Contributor Author

Automated pragmatic-code-review (initial review, medium depth). Verdict: COMMENT (posted as a comment; GitHub blocks self-approval). No blocking defect found; three open decisions are listed below.

Review Type: Initial Review

Requirements Check (issue #3349 acceptance criteria)

  • ⚠️ Built app's Info.plist has NodeSpaceProduct = community. The config and plist are correct. The PR verified this only on a scratch crate with a copied bundle.macOS section, not on the real app. The reviewer read tauri-cli 2.11.4 (the locked version): build.rs does set_current_dir(dirs.tauri) before rust.rs merges config.macos.info_plist, so the relative Info.product.plist resolves against src-tauri/ even though tauri-action runs with projectPath: packages/desktop-app. tauri-build 2.6.2 only reads a file named exactly Info.plist. The first verify_layout on a release build is the first real check.
  • ✅ preinstall is executable, refuses per the matrix, and never runs a binary. Git mode is 100755. About 25 hostile fixtures were run; every path exits 0 or 1 as intended and nothing from the bundle is executed or evaluated.
  • ⚠️ Distribution check refuses in the GUI with the ADR message. Code, message (byte-identical to the issue and ADR text) and unit tests are right. Nobody has seen a real Installer refuse (installer -target needs an install, which was forbidden).
  • ✅ postinstall has no guard. git grep -F -e --edition -e FORCE_COMMUNITY -- scripts/pkg-resources/postinstall prints nothing. Diffed against origin/main: only the header bullet, NODESPACED and the guard block were removed; the rest is byte-identical. postinstall-bootstrap.test.ts passes.
  • ✅ Under scripts/, nodespaced-pro and NODESPACE_FORCE_COMMUNITY appear only in preinstall and build-pkg.sh, apart from the pre-existing scripts/refresh-pro-proto.ts hit that the PR discloses. The two new test files carry none of the markers.
  • ⚠️ release.yml checks the key. Shell is correct; the two back-to-back installs are unchanged by analysis but no CI run was possible. If Tauri did not merge the key, the first verify_layout fails loudly with a clear message.
  • ✅ bash -n passes on both scripts, shellcheck on preinstall is clean, and the pkg-* and postinstall-bootstrap tests pass.
  • ❌ check-pro-boundary.ts passes with BASELINES lowered. Not done; the PR explains why. editionBranching is 115 against Add the Pro-boundary ratchet check and the Pro/sync placement rule #3376's baseline of 113 (+2).

Findings

🔴 Critical

  • None. No path where a legitimate community install is blocked, and none where a pro bundle slips past both guards.

🟡 Important

  1. The override probably works in the Distribution check but not in preinstall. 📁 scripts/build-pkg.sh:233-236, scripts/pkg-resources/preinstall:22-24,54. system.env in the real Installer JS exposes the caller's NODESPACE_FORCE_COMMUNITY=1 (confirmed with a probe pkg). man installer documents only COMMAND_LINE_INSTALL; nothing is known to forward caller variables to preinstall (inference, unproven; the PR flags the same doubt). If it doesn't reach the script, sudo NODESPACE_FORCE_COMMUNITY=1 installer passes the JS check, then preinstall exits 1 with the generic "installation failed". Suggested fix: settle this before merge or the next release, using the ephemeral macOS runner in release.yml; if it does not reach the script, drop the override from both places or move it to a channel installers forward (e.g. a root-owned marker file). Tell the ADR-084 owner either way.
  2. Nothing in CI can observe the guard, and the JS catch fails open silently. 📁 .github/workflows/release.yml:569-573, scripts/build-pkg.sh:241-246. If an Installer API changes, or the JS has a mistake the mocks miss, catch returns true and the GUI guard is off with nothing flagging it. Fail-open is defensible since preinstall is the backstop, but it needs a tripwire. Suggested: (a) after the two installs, fail if /var/log/install.log contains NodeSpace installation check failed (system.log output lands there, prefixed JS:); (b) on the ephemeral runner, set NodeSpaceProduct to pro in the installed Info.plist and assert sudo installer -pkg "$PKG" -target / exits non-zero and leaves the bundle untouched; (c) optionally repeat with sudo NODESPACE_FORCE_COMMUNITY=1, which answers finding 1 empirically. Or file a follow-up; (a) is two lines.
  3. Closes #3349 is not fully earned, and the issue is still blocked. Acceptance item 8 (ratchet baselines) is unmet; the issue is blocked-by Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299 (PR Add the Pro-boundary ratchet check and the Pro/sync placement rule #3376, open) and nodespace-docs#94. The deviation is reasonable (Add the Pro-boundary ratchet check and the Pro/sync placement rule #3376's exemptionProblems accepts only TEST_PATH files; the PR names accepted raise class 1). Either hold the merge until Add the Pro-boundary ratchet check and the Pro/sync placement rule #3376 lands and put BASELINES.editionBranching (about 115) in this diff, or change Closes to Refs. This PR's bun run test:scripts will fail on editionBranching once Add the Pro-boundary ratchet check and the Pro/sync placement rule #3376 is on main and this branch has not raised its baseline.

🟢 Suggestions
4. Narrow the JS try/catch to the plist read, to match preinstall. 📁 scripts/build-pkg.sh:217-246. In preinstall, a plutil failure gives an empty value and falls back to the daemon-file check; in the JS an exception from plistAtPath skips the fallback and returns true. A Pro bundle with a corrupt Info.plist plus the other daemon gets a generic failure from preinstall instead of the dialog. Wrap only the plistAtPath call and let the rest fall through to the same decision as the shell; update the "unreadable bundle" test.
5. Nit: the strip loop in preinstall cannot change behaviour (//Applications/... resolves to the same path). 📁 scripts/pkg-resources/preinstall:28-34. Optional; the issue prescribed stripping.
6. Nit: the header comment repeats the variable name that line 54 already names; every literal NODESPACE_FORCE_COMMUNITY line counts toward editionBranching. 📁 scripts/pkg-resources/preinstall:22.
7. Nit: the test name overclaims ("whatever is at the running system's /Applications" cannot be exercised). 📁 scripts/pkg-preinstall.test.ts:112. Rename to "no app on the target volume proceeds".
8. Nit: for non-string plist values the two guards can disagree (String(['community']) is "community" in JS while preinstall refuses). 📁 scripts/build-pkg.sh:223. Pathological; only worth knowing.

What was verified

  • bun test of the three pkg-related test files: 39 pass, 0 fail; neighbouring build-pkg-*, check-version-sync, gate-scope, update-homebrew-cask tests: 49 pass. bunx eslint on the new tests clean; bash -n and shellcheck on preinstall clean. No lint/type suppressions added; no issue numbers in added code comments. Worktree stayed clean.
  • preinstall against about 25 fixtures under env -i. Refused (exit 1): integer, bool, array, dict, data and real values; "community "; "Community"; "pro\ncommunity"; a symlinked app pointing at a pro bundle; binary-format and JSON-format pro plists; no Info.plist plus the other daemon; empty key plus the other daemon; a path with a space. Allowed (exit 0): empty-string key; "community\n"; no Info.plist and no daemon; malformed Info.plist; Info.plist being a directory; dangling symlink app; empty volume; no arguments; empty $3; $3 of //. A plist value of $(touch PWNED) plus backticks created nothing.
  • Mutation spot-check, 11 mutants, all caught except dropping String() in the JS (mocks use primitive strings; the real Installer returned a string, so harmless).
  • Real Installer API shapes via query-only modes (installer -pkginfo, -dominfo, -volinfo; nothing installed): plistAtPath returns an object with a string value, null for a missing file, undefined for a missing key; system.env shows an exported NODESPACE_FORCE_COMMUNITY=1; system.log lands in /var/log/install.log. The refusal itself stays unobserved, as the PR says.
  • Heredoc: the only $ in the block are ${BUILD_DIR}, ${DIST_XML} and the two ${PKG_VERSION}; the JS has no $, backtick or backslash. release.yml: shell: bash, local product declared before the assignment, plutil at /usr/bin.
  • Ratchet (a scratchpad copy of Add the Pro-boundary ratchet check and the Pro/sync placement rule #3376's checker): 5 editionBranching hits and 3 proWording hits, all in build-pkg.sh and preinstall; matches the PR's table.
  • Not verified: a real tauri build of the app, CI double install, real refusal, override propagation under sudo installer.

Recommendation: COMMENT. Implementation is correct, safe and well tested; override propagation, an end-to-end refusal and the Closes #3349 / baseline coordination with #3376 are open decisions to settle before merge.

@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 (GitHub blocks self-approval). No blocking defect; full findings are in the comment above.

@mstomar125
mstomar125 force-pushed the issue-3349-pkg-preinstall-guard branch from b772cb0 to e545871 Compare September 30, 2026 10:38
mstomar125 and others added 4 commits September 30, 2026 12:43
…ceProduct

The old guard ran in postinstall: after the payload was written, executing the
installed nodespaced as root, and it never saw the other product because that
product installs its own daemon beside nodespaced instead of replacing it.

- The app bundle declares NodeSpaceProduct = community. Tauri merges
  Info.product.plist into Info.plist through bundle.macOS.infoPlist; the file
  is deliberately not named Info.plist, which Tauri auto-merges and a build
  config cannot un-merge.
- scripts/pkg-resources/preinstall runs before the payload is written and
  refuses when the installed app's NodeSpaceProduct is not community, or, for
  bundles without the key, when the other product's daemon sits in
  Contents/MacOS. It reads only static data and runs nothing under the bundle.
  NODESPACE_FORCE_COMMUNITY=1 stays as the scripted-install override.
- build-pkg.sh writes a Distribution installation-check that makes the same
  decision in Installer JS and refuses with a dialog instead of a generic
  "installation failed". The generated script is exercised in tests.
- postinstall loses the guard block and its header bullet; everything else,
  including the launchd-bootstrap block, is unchanged.
- release.yml verify_layout checks the installed bundle reads community.

Closes #3349

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…rsion

postinstall never queried nodespaced --version, and with the old edition guard
removed it runs no installed binary at all.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…all-log tripwire

- The Distribution check now treats an unreadable Info.plist like preinstall
  does (no key, so decide by the daemon file) instead of allowing the install;
  only other exceptions still fail open, and they log.
- release.yml fails the build if the install log contains the check's failure
  line, so a throwing check cannot silently turn the GUI refusal off. A test
  ties the workflow's grep text to the text the check logs.
- preinstall's header no longer repeats the override variable's name, and one
  test name no longer claims more than it exercises.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
… tripwire itself

- The installation check's inner catch now logs under the same
  "NodeSpace installation check failed" prefix as the outer catch, so the
  release workflow's install-log grep also trips when plistAtPath throws on
  the freshly built CI bundle, not just for other exceptions.
- The tie test now extracts the tripwire block from release.yml and runs it
  under bash -eo pipefail against temp logs: it must pass for a clean or
  missing log and fail for the real log lines both catches produce.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mstomar125
mstomar125 force-pushed the issue-3349-pkg-preinstall-guard branch from e545871 to 7b338af Compare September 30, 2026 10:43
@mstomar125

Copy link
Copy Markdown
Contributor Author

Automated pragmatic-code-review (re-review of the review-fix commit). Verdict: COMMENT (posted as a comment; GitHub blocks self-approval).

Review Type: Re-Review (head e545871, rebased onto ca6a50e)

Previous Review Summary

Findings

🟡 Important

  1. The tripwire does not cover the failure it was meant for: plistAtPath throwing systematically. 📁 .github/workflows/release.yml:591-601, scripts/build-pkg.sh:222-229. After the narrowing, a plistAtPath exception is caught by the inner catch, which logged NodeSpace installation check could not read Info.plist: ...; the workflow's grep "NodeSpace installation check failed" did not match it. Run with system.files.plistAtPath missing (the closest stand-in for an Installer API change), a bundle declaring pro with no sidecar returned true and the only log line was the "could not read" one. The second install in CI is the only one that reaches plistAtPath, and on a freshly built community bundle an unreadable Info.plist can only mean a broken API or bundle, so it should fail the release (the "corrupt plist should not trip it" worry applies to user machines, where the tripwire never runs). Suggested fix: log the inner failure under the same prefix, or widen the pattern; update the tie test to cover both scenarios.

🟢 Suggestions
2. Nit: the tie test only checked that a string is present, not the tripwire's control flow. Changing the tripwire's exit 1 to exit 0, or pointing the grep at a nonexistent log, both passed all tests. Suggested: extract the block from the YAML and run it under bash -eo pipefail against temp logs, asserting exit codes.
3. Nit: the tripwire also passes when the check never ran or install.log is unreadable. Documented and intentional; optional positive evidence later.

What was verified

  • Every file reviewed earlier is byte-identical after the rebase; the new differences are exactly the e545871 hunks. bundle.macOS.infoPlist is still "Info.product.plist" and both files remain in packages/desktop-app/src-tauri/, next to the only tauri.conf.json, so the relative path still resolves after the crate split.
  • 41 tests pass across pkg-preinstall, pkg-installation-check and postinstall-bootstrap; bash -n, shellcheck on preinstall, and eslint on the new tests are clean; release.yml parses; actionlint reports only the same pre-existing SC2012 info findings as origin/main.
  • Tripwire block extracted verbatim and run under bash --noprofile --norc -eo pipefail: a clean log falls through; a log containing the failure text prints the ::error:: line and exits 1; a missing log and an unreadable log (mode 000) fall through. set -e semantics are fine.
  • Mutation spot-check, 9 mutants: inner catch removed, inner catch returns true, outer log text changed, workflow grep text changed, tripwire block removed and outer catch fail-closed were caught; tripwire exit 1 to exit 0 and tripwire reading the wrong file were not caught (finding 2); var info; without = null is equivalent.
  • Read-only throughout: nothing written to the repo, no install, no sudo, no test:changed. Not observed: a real Installer refusal or override propagation.

Recommendation: COMMENT. From a code standpoint this is one small fix from good; merge remains gated on the coordinator's items (override propagation, Closes versus Refs, ordering with #3376).

@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 (re-review): COMMENT (GitHub blocks self-approval). No criticals; the one Important finding is addressed in the head commit. Details in the comment above.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Address-review summary (two review rounds).

Round 1 (initial review, verdict COMMENT, no criticals)

Addressed:

Skipped, with reasons:

  • Basic storage integration #5 (strip loop cannot change behaviour): the issue prescribes stripping the trailing slash; revisit if the issue's wording is relaxed.
  • Development server works with hot reload #8 (String(['community']) in the JS versus plutil for non-string plist values): pathological, and both guards refuse every realistic non-community value.
  • #2b / #2c (an end-to-end refusal and override test on the ephemeral release runner): deliberately not in this PR. It would put untested logic, with unobserved installer exit-code semantics for a Fatal check, into the live release pipeline. Recommended as a follow-up (see the PR body); it could start as a workflow_dispatch-only or continue-on-error observation step.

Not code changes, left to the coordinator: #1 (whether NODESPACE_FORCE_COMMUNITY=1 reaches preinstall under sudo installer; unproven, documented in the PR body) and #3 (Closes #3349 versus Refs, and ordering against the ratchet PR, which needs BASELINES.editionBranching at 114 in this diff if it merges first).

Round 2 (re-review of the fix commit, verdict COMMENT, no criticals)

Addressed:

  • Finding 1 (the tripwire missed the plist-read failure introduced by the narrowing): the inner catch now logs under the same NodeSpace installation check failed prefix as the outer catch.
  • Finding 2 (the tie test did not exercise the tripwire's control flow): the test now extracts the tripwire block from release.yml and runs it under bash --noprofile --norc -eo pipefail against temp logs. A clean or missing log passes; the real log lines produced by both catches fail with the ::error:: line. Mutation checks confirm that exit 0, a wrong log path, a removed block, and log text that drifts off the prefix each fail a test.
  • Finding 3 (positive evidence that the check ran): skipped as optional; the tripwire is intentionally fail-quiet when the log is unavailable.

Mutation checks on the final files: 40 mutations, 39 caught. The one survivor (dropping the JS early return for "no app installed") is an equivalent mutant.

Tests on the final head: bun run test:changed (every tier: frontend, browser, skill, scripts, Rust) and bun run quality:scripts:check pass.

Re-Review Decision

Decision: NO FURTHER RE-REVIEW NEEDED

Rationale: The round-2 fix is the change the reviewer specified (one log string and a test), it is covered by mutation checks that the reviewer's own scratch mutants motivated, and it touches no guard decision logic. The remaining open items (override propagation, Closes versus Refs, merge order against the ratchet PR) are not code changes and are for the coordinator.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Held (coordinator) until after the core-only release: it changes the release workflow and adds a new preinstall + Distribution installation-check that run for every free-user install, and the real install path (refusal dialog, override under sudo installer, CI double-install) is unobserved. Its purpose is guarding Pro installs (none yet); the old postinstall guard is inert now that --edition is gone. After #3376 lands, rebase and set BASELINES.editionBranching to the new count and drop postinstall from the exemption allowlist (its guard is removed here).

@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.

Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct

1 participant