Skip to content

Commit 2f80bfd

Browse files
bloveclaude
andauthored
chore(ci-scope): add scope:* tags + implicitDependencies (PR 1/3) (#503)
* docs: spec for ci-scope thin shim + implicitDependencies migration Task #16 (final audit item). Shrinks scripts/ci-scope.mjs from 340 LOC to ~50 LOC by replacing hand-maintained applyProjectScope and applyFallbackPathScope rules with data: 1. Per-project `scope:*` tags declare which CI gates a project triggers. The shim reads tags off projects nx considers affected. 2. Non-project fallback paths (vercel.*.json, deploy scripts, registry, etc.) move into project.json implicitDependencies. Nx considers the target project affected via the implicit dep edge. Migration sequenced as 3 PRs: (1) metadata add (no behavior change), (2) shim rewrite + test migration, (3) cleanup + drift-guard assertion. Preserves all current CI gate semantics + true-skip job behavior; adds 2-5s nx-affected startup vs current sub-second classifier (already analyzed in the brainstorm — acceptable trade-off for the project-graph correctness + dependency cascading wins). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: plan for ci-scope thin shim migration (3 PRs) 8-task plan sequenced across 3 PRs: - PR 1 (Task 1): scripted addition of scope:* tags + implicitDependencies on ~50 project.json files. No behavior change. - PR 2 (Tasks 2-6): rewrite scripts/ci-scope.mjs as ~120-LOC thin shim over `nx show projects --affected`. Migrate scripts/ci-scope.spec.mjs. Smoke test against recent main range. - PR 3 (Tasks 7-8): drift-guard assertion in cockpit-e2e-wiring.spec.ts that every cap project has expected scope:* tags. Each PR ships independently. PR 2's own CI run is the integration test; do not admin-merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(ci-scope): add scope:* tags + implicitDependencies (no behavior change) PR 1 of 3 for the ci-scope thin-shim migration. Adds metadata only: 1. scope:* tags on every CI-participating project, replacing the hand-maintained applyProjectScope rules in scripts/ci-scope.mjs with data declarations next to each project. 2. implicitDependencies on apps/cockpit and apps/website pointing at the non-project files (vercel.*.json, scripts/*.ts, capability- registry.ts) that currently live in applyFallbackPathScope. ci-scope.mjs unchanged in this PR — still drives gating via the old rules. The new metadata is inert. PR 2 will rewrite the shim to read from this metadata; PR 3 will add a drift-guard assertion. See docs/superpowers/specs/2026-05-21-ci-scope-thin-shim-design.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ci-scope): drop stale //scripts/deploy-smoke.ts implicit dep The original spec listed this path as a fallback file (mirroring the OLD ci-scope.mjs's defensive `if (changedFile === 'apps/cockpit/scripts/ deploy-smoke.ts' || changedFile === 'scripts/deploy-smoke.ts')` check), but only the apps/cockpit/scripts/deploy-smoke.ts path exists on this repo today. The root-level path is dead — the OLD rule was overly defensive for a file that was never created at that path. The legitimate //apps/cockpit/scripts/deploy-smoke.ts entry remains. Caught by the existence check in Task 1 Step 4 of the migration plan. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ci-scope): revert implicitDependencies — //path syntax broke CI PR 1 added `implicitDependencies: ["//vercel.json", ...]` to apps/cockpit and apps/website. On Nx 22.5.1, this caused all cockpit-* CI gates to fail (29 failures: build/test, build-all-examples, 18 e2e matrix expansions, etc.). The `//path` syntax for file-level implicit deps either isn't recognized by Nx 22 or requires different escaping. Revert just the implicitDependencies. Keep the scope:* tags addition — those are inert metadata and use the existing tags pattern. PR 2's shim rewrite will need to either: (a) Restore implicitDependencies with the correct syntax once verified, or (b) Keep applyFallbackPathScope's file-by-file rules in ci-scope.mjs (shim ends up ~80 LOC instead of ~50). Either way, PR 1's scope-tags addition is still useful as data for the shim to read. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2fc9270 commit 2f80bfd

89 files changed

Lines changed: 2007 additions & 146 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/cockpit/project.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,19 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "apps/cockpit/src",
55
"projectType": "application",
6-
"tags": ["scope:cockpit", "type:app"],
6+
"tags": [
7+
"scope:cockpit",
8+
"scope:cockpit-deploy-smoke",
9+
"scope:cockpit-e2e",
10+
"scope:cockpit-examples",
11+
"type:app"
12+
],
713
"targets": {
814
"build": {
915
"executor": "@nx/next:build",
10-
"outputs": ["{options.outputPath}"],
16+
"outputs": [
17+
"{options.outputPath}"
18+
],
1119
"defaultConfiguration": "production",
1220
"options": {
1321
"outputPath": "dist/apps/cockpit"

apps/website/project.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "apps/website/src",
55
"projectType": "application",
6-
"tags": ["scope:website", "type:app"],
6+
"tags": [
7+
"scope:website",
8+
"scope:website-e2e",
9+
"type:app"
10+
],
711
"targets": {
812
"build": {
913
"executor": "@nx/next:build",
10-
"outputs": ["{options.outputPath}"],
14+
"outputs": [
15+
"{options.outputPath}"
16+
],
1117
"defaultConfiguration": "production",
1218
"options": {
1319
"outputPath": "dist/apps/website"
@@ -48,7 +54,9 @@
4854
},
4955
"lint": {
5056
"executor": "@nx/eslint:lint",
51-
"outputs": ["{options.outputFile}"]
57+
"outputs": [
58+
"{options.outputFile}"
59+
]
5260
},
5361
"e2e": {
5462
"executor": "@nx/playwright:playwright",

cockpit/ag-ui/streaming/angular/project.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,9 @@
7373
"command": "npx tsx -e \"import { agUiStreamingAngularModule } from './src/index.ts'; const module = agUiStreamingAngularModule; if (module.id !== 'ag-ui-streaming-angular' || module.title !== 'AG-UI Streaming (Angular)') { throw new Error('Unexpected module shape for ' + module.id); }\""
7474
}
7575
}
76-
}
76+
},
77+
"tags": [
78+
"scope:cockpit-e2e",
79+
"scope:cockpit-examples"
80+
]
7781
}

cockpit/chat/a2ui/angular/project.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,9 @@
9494
"config": "cockpit/chat/a2ui/angular/e2e/playwright.config.ts"
9595
}
9696
}
97-
}
97+
},
98+
"tags": [
99+
"scope:cockpit-e2e",
100+
"scope:cockpit-examples"
101+
]
98102
}

cockpit/chat/a2ui/python/project.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"targets": {
77
"build": {
88
"executor": "@nx/js:tsc",
9-
"outputs": ["{workspaceRoot}/dist/cockpit/chat/a2ui/python"],
9+
"outputs": [
10+
"{workspaceRoot}/dist/cockpit/chat/a2ui/python"
11+
],
1012
"options": {
1113
"outputPath": "dist/cockpit/chat/a2ui/python",
1214
"main": "cockpit/chat/a2ui/python/src/index.ts",
@@ -20,5 +22,9 @@
2022
"command": "uv run langgraph dev --port 5511 --no-browser"
2123
}
2224
}
23-
}
25+
},
26+
"tags": [
27+
"scope:cockpit-e2e",
28+
"scope:cockpit-examples"
29+
]
2430
}

cockpit/chat/debug/angular/project.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,9 @@
8888
"command": "npx tsx -e \"import { chatDebugAngularModule } from './src/index.ts'; const module = chatDebugAngularModule; if (module.id !== 'chat-debug-angular' || module.title !== 'Chat Debug (Angular)') { throw new Error('Unexpected module shape for ' + module.id); }\""
8989
}
9090
}
91-
}
91+
},
92+
"tags": [
93+
"scope:cockpit-e2e",
94+
"scope:cockpit-examples"
95+
]
9296
}

cockpit/chat/debug/python/project.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"targets": {
77
"build": {
88
"executor": "@nx/js:tsc",
9-
"outputs": ["{workspaceRoot}/dist/cockpit/chat/debug/python"],
9+
"outputs": [
10+
"{workspaceRoot}/dist/cockpit/chat/debug/python"
11+
],
1012
"options": {
1113
"outputPath": "dist/cockpit/chat/debug/python",
1214
"main": "cockpit/chat/debug/python/src/index.ts",
@@ -20,5 +22,9 @@
2022
"command": "uv run langgraph dev --port 5509 --no-browser"
2123
}
2224
}
23-
}
25+
},
26+
"tags": [
27+
"scope:cockpit-e2e",
28+
"scope:cockpit-examples"
29+
]
2430
}

cockpit/chat/generative-ui/angular/project.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,9 @@
100100
"config": "cockpit/chat/generative-ui/angular/e2e/playwright.config.ts"
101101
}
102102
}
103-
}
103+
},
104+
"tags": [
105+
"scope:cockpit-e2e",
106+
"scope:cockpit-examples"
107+
]
104108
}

cockpit/chat/generative-ui/python/project.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"targets": {
77
"build": {
88
"executor": "@nx/js:tsc",
9-
"outputs": ["{workspaceRoot}/dist/cockpit/chat/generative-ui/python"],
9+
"outputs": [
10+
"{workspaceRoot}/dist/cockpit/chat/generative-ui/python"
11+
],
1012
"options": {
1113
"outputPath": "dist/cockpit/chat/generative-ui/python",
1214
"main": "cockpit/chat/generative-ui/python/src/index.ts",
@@ -20,5 +22,9 @@
2022
"command": "uv run langgraph dev --port 5508 --no-browser"
2123
}
2224
}
23-
}
25+
},
26+
"tags": [
27+
"scope:cockpit-e2e",
28+
"scope:cockpit-examples"
29+
]
2430
}

cockpit/chat/input/angular/project.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,9 @@
9494
"config": "cockpit/chat/input/angular/e2e/playwright.config.ts"
9595
}
9696
}
97-
}
97+
},
98+
"tags": [
99+
"scope:cockpit-e2e",
100+
"scope:cockpit-examples"
101+
]
98102
}

0 commit comments

Comments
 (0)