Repository navigation
Description
Summary
This is the last Pro-boundary PR in core. It does four things:
- fixes whatever Pro, cloud or tenant wording is still left;
- turns the ratchet into a hard ban: every
BASELINESentry 0, with the few ADR-sanctioned lines held in pinned, per-file allowances; - makes the issue-number check scan
.protofiles; - updates CLAUDE.md so the boundary reads as enforced rather than in progress.
Context
-
What "done" means. ADR-081 (proposed) §7 says the migration is finished when:
- the ratchet's count is zero, apart from ADR-084's key-absent installer fallback;
- a Pro release built from nodespace-sync against the final core pin passes sync's release checks.
-
How the ratchet works. Guardrail: stop new Pro code from landing in core #3302 added
scripts/check-pro-boundary.ts. It counts 11 line markers plus Pro-named files inpackages/,scripts/andREADME.md, against exact baselines that every migration PR lowered. -
What is left by the time this runs:
- Move the Pro Tauri layer out of core: pro_* commands, ProClient, proto, update source #3336 has removed the Tauri Pro layer and the vendored Pro proto.
- Move the Pro account, admission and synced-database settings out of core #3327 and Move the Pro sync and collaboration UI out of core #3333 have removed the Pro UI, and Move Pro-owned data out of core's data model (ADR-083) #3345 the Pro data model.
- Remove Pro edition branching from the core app, daemon, CLI and installer #3357 has removed edition branching, and Add the "Share / Sync this database" entry point that opens nodespace.ai #3362 the Labs card and the README's Discord pointer.
- Describe core's access gate and daemon seams without naming the Pro daemon #3363 to Move the Pro shared-workspaces agent guidance out of core's skill #3370 have reworded the rest and moved the skill guidance.
What remains should be only stragglers and the lines listed below.
-
Why zero needs allowances. Several kinds of line must keep matching a marker, so zero is unreachable unless they are carried outside
BASELINES:-
The website entry point (ADR-081 §2b, ADR-084 §1). C9.1's "Share / Sync this database" dialog says syncing and sharing need NodeSpace Pro. The README keeps a plain pointer to the website. Both trip
proWording. -
ADR-084's installer guards, if ADR-084 keeps them (ADR-081 §2d and §8, ADR-084 §5). These are the
.pkginstallation check written byscripts/build-pkg.sh,scripts/pkg-resources/preinstall, and the caskpreflightgenerated byscripts/update-homebrew-cask.ts. They carry:- the refusal message "NodeSpace Pro is installed…" (
proWording); - the
NODESPACE_FORCE_COMMUNITY=1override (editionBranching); - the transitional key-absent fallback that looks for
Contents/MacOS/nodespaced-pro(editionBranching).
ADR-081 §8 says these stay counted, and that retiring the fallback lowers the count.
nodespace uninstall's guard inpackages/cli/src/commands/uninstall.rsnames no other product, so it needs no allowance. - the refusal message "NodeSpace Pro is installed…" (
-
Absence-guard tests. Several parents add tests that prove a Pro surface is gone by naming it, following the absence-guard convention Guardrail: stop new Pro code from landing in core #3302 defines. Expected guards:
- Stop importing the Pro extension in core; register it only through the build entry #3316: the source guard that no core file imports the Pro plugin;
- Add a neutral daemon:data-plane-ready event and stop reloading on pro:tier-detected #3318: the check that core no longer listens for
pro:tier-detected; - Remove tenant and sync wording shown to free users in Database settings #3324 and Delete the Add synced database dialog and tenant badge from Database settings #3326:
database-settings.test.ts's/tenant|not synced|local only/iand/tenant|synced/ichecks, and any Settings guard from Delete the Pro Account section, workspace-members card and tenant-admission calls #3325; - Delete dead Pro residue: sync:* log listeners and the Recovered Items seed script #3328:
tauri-sync-listener.test.ts's registration test asserting no'sync:error'or'sync:status'listener; - Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348 / Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349: the scripts test asserting that
scripts/pkg-resources/postinstallnever runs the installed daemon; - Delete the Labs syncEnabled flag and guard the free app's single sync entry point #3361: the free-app sync-surface guard with
/tenant|Add synced database|Syncs to|not synced|NodeSpace Pro/i.
-
The lease-agreement fixture sentence in
packages/agent/tests/it/live_embedding_prefix_measurement.rs. Guardrail: stop new Pro code from landing in core #3302 exempts it fromtenantWordingas a false positive.
-
-
The issue-number check skips proto files.
scripts/check-code-references.tsscans only.rs,.ts,.svelteand.js(EXTENSIONS). Describe core's access gate and daemon seams without naming the Pro daemon #3363 removed the citations inpackages/proto/proto/node_service.proto, and Move the Pro Tauri layer out of core: pro_* commands, ProClient, proto, update source #3336 deleted the vendored Pro proto and its 12 citations. So.protocan now join the scan without raising the issue-number baseline, which was 71 at af8ddb6; use whatever it is when you start. -
Where Pro code may have slipped in. Several markers catch actual code, not wording:
proCommands,proSyncModule,proProtocol,proEvents,membershipService,editionBranching,cloudBindState,cloudSyncHooksandproNamedFiles.- A non-zero count on any of them, outside an allowance or an absence guard, means an upstream parent is incomplete.
- Don't delete that code here: a core deletion of Pro code waits for its nodespace-sync counterpart. Reopen the owning parent (Move the Pro Tauri layer out of core: pro_* commands, ProClient, proto, update source #3336 to Add the "Share / Sync this database" entry point that opens nodespace.ai #3362) instead.
Scope
scripts/check-pro-boundary.ts:-
Set every
BASELINESentry to 0. -
Pinned allowances. Add
ALLOWANCES: readonly { file: string; marker: MarkerName; count: number; reason: string }[], unless Guardrail: stop new Pro code from landing in core #3302 already provides an equivalent; if it does, use Guardrail: stop new Pro code from landing in core #3302's.- A hit in an allowance's file for its marker counts against that allowance, not against the global count.
- An allowance fails above its
count(new Pro wording in a sanctioned file) and below it ("lower the allowance"), with the same paste block as the baselines. - Each
reasoncites the ADR section.
-
Expected allowances (confirm at pickup, and list each in the PR):
File Marker(s) Reason C9.1's Share / Sync entry-point component, and its test proWordingADR-081 §2b, ADR-084 §1: the one place core's UI names the paid product README.mdproWording, plus any marker Add the "Share / Sync this database" entry point that opens nodespace.ai #3362's approved pointer tripsADR-081 §2b: a plain website pointer scripts/build-pkg.sh,scripts/pkg-resources/preinstall,scripts/update-homebrew-cask.ts, and their testseditionBranching(NODESPACE_FORCE_COMMUNITY, andnodespaced-proin the key-absent fallback),proWording(the refusal message)ADR-081 §2d and §8, ADR-084 §5. Only if ADR-084's guards have landed. Lower the nodespaced-propart when ADR-084 retires the fallbackIf ADR-084 keeps no community installer guard (Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348 / Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349's default), there is no installer allowance, and
NODESPACE_FORCE_COMMUNITYcounts 0. -
Absence guards. Confirm that every guard listed under Context follows Guardrail: stop new Pro code from landing in core #3302's absence-guard convention, so the guard's own strings do not count. Convert any guard written before the convention existed.
-
A
productKeymarker. ADR-081 §8 allows theNodeSpaceProductbundle key only in its allowlist:scripts/build-pkg.shandscripts/pkg-resources/preinstall;scripts/update-homebrew-cask.ts;packages/cli/src/commands/uninstall.rs;- the desktop app file that declares
community.
If ADR-084's guard work has landed and no earlier issue added this marker, add it at 0 outside those files.
-
Header comment: every count is zero; any hit outside a pinned allowance or an absence guard fails.
-
Drop the "accepted raises" wording. No Pro code is left in core to fix in place.
-
scripts/check-pro-boundary.test.ts:- a test that every
BASELINESvalue is 0; - tests for allowances: over, under, and equal;
- a test that every allowance's file exists and its
reasoncites an ADR section; - keep the real-repo test.
- a test that every
- Optional, on the reviewer's call: a
syncVocabularymarker at 0 that locks in Remove Pro, Supabase and nodespace-sync wording from core comments, docs and the skill #3372's rewording, for example:It needs a commented exemption for/cloud[- ]?sync|cloud[- ](?:push|pull)|\bto cloud\b|sync-apply|cold[- ]?sweep|\bcommunity (?:build|install|mode|tier|default)s?\b|\bnon-pro\b|pro-gated/ipackages/skill/src/mcp-clients.ts("Linux community builds of Claude Desktop"). Add it only if its count is 0 after exemptions, with pattern tests in the style of Guardrail: stop new Pro code from landing in core #3302's. scripts/check-code-references.ts:- add
.prototoEXTENSIONS, and extend the comment above it; - in
scripts/check-code-references.test.ts, extend "only scans the requested extensions" with ascripts/a.protofixture, and update its title and expected count.
- add
CLAUDE.md, the "Pro / Sync Boundary" section Guardrail: stop new Pro code from landing in core #3302 added:- "
scripts/check-pro-boundary.tsholds every count at zero; any Pro marker outside a pinned ADR allowance fails the push and the merge gate"; - list the allowances by ADR section, and the absence-guard convention;
- remove the "the only accepted raises" sentence.
- "
- Stragglers. Any wording line the CLI or the grep below still finds in a file no other parent owns. Reword it per the parent's wording guide.
README.md. Verify, without editing unless something is wrong, that only Add the "Share / Sync this database" entry point that opens nodespace.ai #3362's website pointer remains (ADR-081 §2b). Don't reword Add the "Share / Sync this database" entry point that opens nodespace.ai #3362's approved copy.
Out of scope
- Deleting or moving any Pro code. See Context: reopen the owning parent instead.
- ADR-084's guards themselves: the product key, the pre-install check, the cask
preflightand the CLI refusal. If they land after this PR, the issue that adds them adds its own allowances and theproductKeymarker in the same change. - nodespace-sync's own mirror check (a later SYNC item).
- nodespace-docs updates (the separate docs tracking issue).
Steps
- Follow CLAUDE.md's startup sequence:
- pull
main; EnterWorktree({name: "issue-<N>-pro-boundary-zero"});bun install, then thebun run testbaseline;- self-assign at pickup and set In Progress.
- pull
- Confirm Move the Pro Tauri layer out of core: pro_* commands, ProClient, proto, update source #3336, Move the Pro account, admission and synced-database settings out of core #3327, Remove Pro edition branching from the core app, daemon, CLI and installer #3357, Add the "Share / Sync this database" entry point that opens nodespace.ai #3362, Remove Pro and cloud-sync wording from frontend comments, tests and the fly-out tooltip #3366, Sweep the Pro and sync wording C7 leaves around replicated writes and AI-chat privacy #3367 and Move the Pro shared-workspaces agent guidance out of core's skill #3370 have merged. That covers Turn the UI-extension registry into ADR-082's build-time frontend extension API #3317, Move the Pro sync and collaboration UI out of core #3333, Move Pro-owned data out of core's data model (ADR-083) #3345, Describe core's access gate and daemon seams without naming the Pro daemon #3363 to Reword core data-model and identity docs that cite Pro, Supabase, RLS or tenants #3365, Install skill references from the staged directory and record installed files #3368 and Add the NODESPACE_SKILL_EXTENSIONS build input to core's skill build #3369 transitively.
- Measure:
bun run scripts/check-pro-boundary.ts for m in proCommands proSyncModule proProtocol proEvents membershipService editionBranching cloudBindState cloudSyncHooks cloudWording tenantWording proWording proNamedFiles; do bun run scripts/check-pro-boundary.ts --list $m; done git grep -n -I -P '(?i:supabase|pgvector|nodespace[-_]sync|nodespaced-pro|\bpro daemon|\btenant|cloud[- ]?sync|cloud[- ](?:push|pull)|\bto cloud\b|reach cloud|sync-apply|cold[- ]?sweep|\bcommunity (?:build|install|mode|tier|default|path)|\bnon-pro\b|pro-gated)|\bRLS\b|\bNodeSpace Pro\b' -- packages scripts README.md
- Classify every hit, and list every (b), (c) and (d) hit in the PR description:
- (a) Wording: reword it here.
- (b) Sanctioned: it goes in a pinned allowance.
- (c) Absence guard: it follows Guardrail: stop new Pro code from landing in core #3302's convention.
- (d) Pro code: stop, and reopen the owning parent.
- Set
BASELINESto all zeros. Add the allowances and their tests, the zero-baseline test and, if agreed, the optional vocabulary marker. - Add
.prototocheck-code-references.ts, update its test, and run it. The issue-number count must not rise; if it does, reword the offending proto comments rather than raising the baseline. - Update CLAUDE.md.
- Verify, then finish:
bun run quality:fix, and commit;git push origin HEAD:issue-<N>-pro-boundary-zero(the push check runs the ratchet, per Run the Pro-boundary ratchet in the push check and before the merge slot #3300);gh pr create --head issue-<N>-pro-boundary-zero;- merge only with
bun run merge <PR#>once approved.
- After merge, ask nodespace-sync to build a Pro release against the new core revision and run its release checks. Record the result on the parent issue. This is ADR-081's completion criterion; it does not block merging this PR.
Acceptance criteria
-
Every
BASELINESvalue is 0, a test asserts it, andbun run scripts/check-pro-boundary.tsexits 0. -
Every remaining hit is one of these:
- in a pinned allowance, with an exact count and a reason citing ADR-081 §2b, ADR-081 §2d/§8 or ADR-084 §5;
- in a Guardrail: stop new Pro code from landing in core #3302 absence-guard test;
- in the lease-fixture exemption.
No directory-wide or marker-wide exemption exists.
-
The grep in step 2 prints only lines in those files, plus
packages/skill/src/mcp-clients.ts("Linux community builds of Claude Desktop", unrelated to Pro). -
scripts/check-code-references.tsscans.proto, its test covers that, and its issue-number baseline did not rise. -
CLAUDE.md's Pro / Sync Boundary section describes the zero state, the allowances and the absence-guard convention.
-
The step-3 classification is in the PR description, and no (d) hit was fixed in this PR.
-
bun run test:scripts,bun run quality:scripts:checkandbun run test:changedpass.
Tests and verification
bun run test:scripts. It coverscheck-pro-boundary.test.ts, including the new zero and allowance tests, andcheck-code-references.test.ts.- Mutation checks. Run each one, confirm it fails as described, then revert it.
- Add
// the Pro daemonto any core.rsfile. The ratchet fails oncloudWordingandproWording. - Add one more
NodeSpace Proline to an allowance's file. That allowance fails. - Add
// see core#1to a.protofile.check-code-referencesfails. - If the vocabulary marker was added, add
// cloud-syncto a.tsfile. It fails.
- Add
bun run quality:scripts:checkbun run test:changed. The diff reachesscripts/, and possibly Rust or the frontend for stragglers.bun run scripts/check-code-references.ts
Dependencies
- Move the Pro Tauri layer out of core: pro_* commands, ProClient, proto, update source #3336, Move the Pro account, admission and synced-database settings out of core #3327, Remove Pro edition branching from the core app, daemon, CLI and installer #3357, Add the "Share / Sync this database" entry point that opens nodespace.ai #3362: their Pro code and edition branching must be gone.
- Remove Pro and cloud-sync wording from frontend comments, tests and the fly-out tooltip #3366, Sweep the Pro and sync wording C7 leaves around replicated writes and AI-chat privacy #3367, Move the Pro shared-workspaces agent guidance out of core's skill #3370: the post-C6 and post-C7 sweeps, and the skill move. Move the Pro sync and collaboration UI out of core #3333, Move Pro-owned data out of core's data model (ADR-083) #3345, Describe core's access gate and daemon seams without naming the Pro daemon #3363 to Reword core data-model and identity docs that cite Pro, Supabase, RLS or tenants #3365, Install skill references from the staged directory and record installed files #3368 and Add the NODESPACE_SKILL_EXTENSIONS build input to core's skill build #3369 come through them.
Risks and rollback
- A marker still finds real Pro code. Step 3(d) routes it back to its parent, and this PR waits.
- A hard ban makes any false positive block pushes. Fix it with a narrow, tested exemption or a pattern tweak in the checker. Never with a baseline.
- ADR-084's guards may land after this. Their issue must add its allowances in the same PR, or its push fails. That failure is intended.
- Rollback. Revert the PR. The baselines and CLAUDE.md go back to the last ratchet state, and the wording fixes are comments only.
Plan key: C10.7 (pro-boundary DAG).
🤖 Generated with Claude Code
Activity
mstomar125 commentedon Sep 30, 2026
Folded in from #3300's review: when the ratchet fails in the gate, only the last 40 lines of the stage log are shown, and the checker prints failures first and the optional lower-it notices last — so the visible tail shows notices, not the offending line. When making the check strict here, print the failure headlines and changed-file hits LAST (or notices first) so the gate tail and the merge-queue eject comment name the offending line.
mstomar125 commentedon Oct 1, 2026
Superseded by #3412 (umbrella against the final ADR-081–085)