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: run the generated-manifest drift tests on every scoped server change
[._.]/ Adam Eivy3e8d331f4a9e
diff --git a/docs/GITHUB_ACTIONS.md b/docs/GITHUB_ACTIONS.mdindex 8654b88e7c..eceb636aed 100644--- a/docs/GITHUB_ACTIONS.md+++ b/docs/GITHUB_ACTIONS.md@@ -373,6 +373,11 @@ aggregate diagnostics and cache post-steps can complete normally.- Barrel/catalog guards are added when reusable `lib`, `hooks`, or `utils`directories change, and catalog-only barrels are excluded from import-graphexpansion. JSX changes include the global accessibility convention guard.+- Any server source change adds the two generated-manifest drift tests+ (`generate-api-route-catalog`, `generate-prompt-stage-call-sites`). They+ regenerate from the tree rather than importing what they scan, so no import+ edge reaches them; before this rule a route added on a scoped plan could+ merge with a stale catalog and turn every later full-plan PR red.- A `scripts/*.py` sidecar selects every test that names a python script(`git grep`), in `files` mode, and falls back to the full suite when none do— see "Python sidecar scripts" above.diff --git a/scripts/ci-test-plan.js b/scripts/ci-test-plan.jsindex a937d71232..441af0f01a 100644--- a/scripts/ci-test-plan.js+++ b/scripts/ci-test-plan.js@@ -262,6 +262,15 @@ const structuralTestsFor = (changedFiles, trackedSet) => {if (changedFiles.some((path) => /^server\/lib\//.test(path))) {add('server/lib/index.test.js');}+ // The generated-manifest drift tests regenerate from the tree and compare;+ // they import neither the route modules nor the stage call sites they scan,+ // so no import edge selects them. Without this rule a route added on a+ // scoped plan merged with a stale catalog (#5898), and every later full-plan+ // PR inherited the red drift test until someone committed a regeneration.+ if (changedFiles.some((path) => /^server\/.*\.js$/.test(path) || /^server\/lib\/.*\.generated\.json$/.test(path))) {+ add('scripts/generate-api-route-catalog.test.js');+ add('scripts/generate-prompt-stage-call-sites.test.js');+ }// The socket guard readdir-scans server/sockets/ rather than importing it, so// no import edge reaches it — a handler added there would otherwise only be// checked on a full suite.diff --git a/scripts/ci-test-plan.test.js b/scripts/ci-test-plan.test.jsindex 5d26d66e5a..35b8790981 100644--- a/scripts/ci-test-plan.test.js+++ b/scripts/ci-test-plan.test.js@@ -434,6 +434,27 @@ describe('CI test impact planner', () => {expect(mixed.smoke).toBe(true);});+ it('runs the generated-manifest drift tests whenever a server source changes', () => {+ const tracked = [+ ...TRACKED,+ 'server/routes/settings.js',+ 'scripts/generate-api-route-catalog.test.js',+ 'scripts/generate-prompt-stage-call-sites.test.js',+ ];+ const drift = ['scripts/generate-api-route-catalog.test.js', 'scripts/generate-prompt-stage-call-sites.test.js'];++ // A new route on a scoped plan is exactly the case that shipped a stale catalog.+ const route = buildCiTestPlan(['server/routes/settings.js'], { trackedFiles: tracked });+ expect(route.full).toBe(false);+ expect(route.server.files).toEqual(expect.arrayContaining(drift));+ // Any server module can add a literal stage-key call site.+ const service = buildCiTestPlan(['server/services/auth.js'], { trackedFiles: tracked });+ expect(service.server.files).toEqual(expect.arrayContaining(drift));+ // A client-only change has nothing to regenerate.+ const client = buildCiTestPlan(['client/src/lib/catalogLinks.js'], { trackedFiles: tracked });+ expect(client.server.files).not.toEqual(expect.arrayContaining(drift));+ });+it('fails closed to the full suite for a python script nothing pins', () => {// Per script: a pinned sibling in the same diff does not vouch for the orphan.const plan = buildCiTestPlan(['scripts/generate_ltx2.py', 'scripts/orphan.py'], {