Repository navigation
Closed
Labels
pro-boundaryPro/core boundary: Pro code moves to nodespace-sync (ADR-081..085)
Description
Summary
Run scripts/check-pro-boundary.ts in the lint section of scripts/test-gate.ts. This does two things:
- Frontend-only and
.md-only changes, which is where most Pro drift happens, meet the Pro-boundary ratchet atgit push. - In merge mode, an exceeded or stale baseline fails in seconds, before the gate takes the machine slot.
Context
- After Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299, the ratchet runs only as a bun test, inside
bun run test:scripts. bun run test:changednever runs that tier for a frontend-only diff. Inclassify(scripts/gate-scope.ts):- a
packages/desktop-app/path outsidesrc-tauri/sets onlyfrontend; .mdfiles are inert, includingREADME.md, which the ratchet scans;scriptsis set only forscripts/, Rust orpackages/skillchanges.
- a
- The push check runs lint only.
.husky/pre-pushrunsbun run scripts/test-gate.ts. Its// ── Lint (both modes)section runs three stages:quality:scripts:check;quality:design-tokens;check-version-sync. This one is already a drift check that runs at push time on purpose ("so this runs at push time, not only in the merge gate").
- Lint runs before the slot, the scripts tier after. In merge mode, the lint section runs before
acquireGateLock.TIERS.scriptsruns later, in the lane afterTIERS.frontend. - Exact baselines make this worth doing. Every migration PR has to lower numbers. Today a forgotten baseline surfaces only as a failed merge gate, a few minutes into a run that holds the machine slot.
- The stage's own text must not add a marker.
scripts/test-gate.tsis in the scan, andproWordingcounts the capitalised word "Pro", including in "Pro-boundary".- A label such as "check-pro-boundary (Pro code in core)", plus a comment starting "Pro code in core", would raise
proWordingby 2 and fail the very ratchet this PR wires in. - The wording below names the rule by its ADR instead.
check-pro-boundaryin lower case matches no marker.
Scope
scripts/test-gate.ts:- Add one
run({...})stage directly after thecheck-version-syncstage and beforeif (!merge). That is around lines 186-194 at af8ddb6. - In the header doc comment, update the
pushbullet, which says "lint and the app-version drift check only", to name the new check.
- Add one
CLAUDE.md:- In the gate callout under Implementation Workflow step 4, the bullet "
git pushruns lint only — scripts lint/typecheck, the design-token check and the app-version drift check" adds the Pro-boundary ratchet to that list. - In the
## Pro / Sync Boundarysection that Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299 added, the last bullet (runbun run scripts/check-pro-boundary.tsbefore pushing) becomes "the push check runs it".
- In the gate callout under Implementation Workflow step 4, the bullet "
Out of scope
- Any change to the tier scoping in
scripts/gate-scope.ts. - Any change to the check itself.
- Any product code.
Steps
-
Add the stage to the lint section of
scripts/test-gate.ts:// The code-boundary ratchet (ADR-081). test:changed skips the scripts tier for // frontend-only and .md-only diffs, which is where most out-of-place code // lands, so a push is the first automated check such a change gets. In merge // mode this runs before the machine slot, so a stale baseline fails in seconds. await run({ label: "check-pro-boundary (ADR-081 code-boundary ratchet)", command: "bun run scripts/check-pro-boundary.ts", timeoutMs: 5 * MINUTE, nice: !merge, });
-
In the header comment, change the
pushbullet to "lint, the app-version drift check and the code-boundary ratchet only". -
Make the two CLAUDE.md edits.
-
Run
bun run scripts/check-pro-boundary.ts. It must exit 0 withBASELINESunchanged. If it reports a raise, your new text contains a marker: reword it rather than raising the baseline.
Acceptance criteria
- Pushing a branch that adds a Pro marker line to a Svelte file is blocked at the
check-pro-boundarystage, and the stage log names the line. - Pushing a branch that removes a Pro marker without lowering the baseline is blocked with the lower-it message and the paste block.
- Pushing a README-only change that deletes the
nodespaced-prosentence is blocked the same way. - A clean branch pushes. The stage adds about a second, since the scan reads about 1,400 files.
- This PR's own merge-gate log shows the stage in the lint section, before the machine-slot wait.
- The
test-gate.tsheader comment and CLAUDE.md's push bullet both list the new check. - Ran
bun run scripts/check-pro-boundary.tsand pasted the printedBASELINESblock. This change moves no count, soBASELINESis unchanged, and the check exits 0.
Tests and verification
bun run quality:scripts:checkbun run test:changed.scripts/test-gate.tsis inGATE_FILESinscripts/gate-scope.ts, so this runs every tier, including Rust. Start it when the shared dev machine is free.- Push-mode checks. In a scratch worktree, run
bun run scripts/test-gate.ts(push mode) three times, reverting each change afterwards:- On a clean tree, it passes.
- With
invoke('pro_example')added to a non-Pro Svelte file, it fails at the new stage. - With the README's
nodespaced-prosentence deleted, it fails with the lower-it message.
- Merge mode. The stage appears in this PR's own merge-gate log before the machine slot is taken.
bun run merge <PR#> --dry-runwould show the same thing, but it runs the full pyramid, so don't run it separately.
Dependencies
- Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299: the script must exist.
Risks and rollback
- A WIP push in the middle of a migration is blocked until its baselines are lowered. The failure prints the paste block. Per CLAUDE.md,
--no-verifyis reserved for WIP Handoff Commits. - The check runs on every push. It reads about 1,400 files once, which took about 0.6 s at af8ddb6. The 5-minute stage timeout bounds a hang.
- Rollback. Revert the stage. Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299's enforcement through
test:scriptsand the merge gate stays in place.
Plan key: C1.2 (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 Sep 30, 2026
Completed in #3390 (merged). Auto-close did not fire; closing manually.