Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: plan full CI for worktree-manager source changes (#9999)
Adam Eivybd97ae8847f9
diff --git a/docs/GITHUB_ACTIONS.md b/docs/GITHUB_ACTIONS.mdindex dc8a32d38b..9c33defed8 100644--- a/docs/GITHUB_ACTIONS.md+++ b/docs/GITHUB_ACTIONS.md@@ -540,6 +540,16 @@ edits `App.jsx` *and* bumps a lockfile escalates. Otherwise the job drops to **o`WINDOWS_CONTRACT_TESTS`** — reduced, never skipped, and exactly the depth aWindows-risk scoped PR already gets.+**Measured full trigger: `server/services/worktreeManager.js` (#9999).** A+two-file change to this module expanded through Vitest's import-consumer+traversal to 57 explicit selectors and a ~941-file, ~40-minute local run+(including real Chrome/ffmpeg renders), while still reading as a scoped plan+because `MAX_TARGETED_TEST_FILES` counts only explicit selectors. It now plans+full (Windows escalates, since the module owns cross-platform worktree+lifecycle). Default `npm run pregate` therefore runs only its always-run guards+for it, `--full` runs everything, and CI runs the full sharded suite. Its test+file alone stays scoped; the #9673 consumer traversal is unchanged elsewhere.+Three properties keep that safe, each pinned by `scripts/ci-test-plan.test.js`:- **Fail-closed by default.** `windowsEscalates` defaults to `true`, so adiff --git a/scripts/ci-test-plan.js b/scripts/ci-test-plan.jsindex d0ab73c756..6a52f2f237 100644--- a/scripts/ci-test-plan.js+++ b/scripts/ci-test-plan.js@@ -80,6 +80,12 @@ const FULL_TRIGGER_RULES = [{ re: /^client\/vite\.config\.js$/, reason: 'client build configuration changed', windowsEscalates: false },{ re: /^server\/index\.js$/, reason: 'server composition root changed', windowsEscalates: true },{ re: /^server\/lib\/(?:schemaVersions|validation)\.js$/, reason: 'shared server contract changed', windowsEscalates: true },+ // Measured hotspot (#9999): a two-file worktreeManager change expanded through+ // import consumers to 57 selectors and a ~941-file local run, yet counted as+ // a "scoped" plan because MAX_TARGETED_TEST_FILES only sees explicit selectors.+ // Own the cost honestly: a full plan, sharded in CI. It also owns cross-platform+ // worktree lifecycle, so Windows escalates (matches WINDOWS_RISK_RULES).+ { re: /^server\/services\/worktreeManager\.js$/, reason: 'worktree manager source changed (broad import fanout)', windowsEscalates: true },// The scripts that decide what CI runs, run it, and gate the release on it.// A bug in any of them can make a scoped plan silently test nothing, so they// prove themselves against the complete suite rather than their own scope —diff --git a/scripts/ci-test-plan.test.js b/scripts/ci-test-plan.test.jsindex 4d0737d277..2afc69f090 100644--- a/scripts/ci-test-plan.test.js+++ b/scripts/ci-test-plan.test.js@@ -1022,6 +1022,17 @@ describe('CI test impact planner', () => {}});+ it('routes worktree-manager source to a full plan instead of a broad nominal scoped plan (#9999)', () => {+ const plan = buildCiTestPlan(['server/services/worktreeManager.js'], { trackedFiles: TRACKED });+ expect(plan.full).toBe(true);+ expect(plan.reason).toMatch(/worktree manager source changed/);+ expect(plan.server.mode).toBe('full');+ expect(plan.client.mode).toBe('full');+ expect(plan.windowsMode).toBe('full');+ // Its test file alone stays a scoped plan.+ expect(buildCiTestPlan(['server/services/worktreeManager.test.js'], { trackedFiles: TRACKED }).full).toBe(false);+ });+it('honors an explicit full-CI request', () => {const plan = buildCiTestPlan(['docs/README.md'], {trackedFiles: TRACKED,