chore(ci-scope): add scope:* tags + implicitDependencies (PR 1/3)#503
Merged
Conversation
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>
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>
… 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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>
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>
2 tasks
blove
added a commit
that referenced
this pull request
May 21, 2026
…ncies (#505) * docs(ci-scope): revise spec — namedInputs over implicitDependencies PR #503 surfaced that Nx 22.5.1 rejects file-path syntax in implicitDependencies entries (validates strictly as project names; errored: "implicitDependencies point to non-existent project(s)" on //path). The Nx-native mechanism for file-level affecting-deps is per-project namedInputs referenced by target inputs. Spec updates: - Header revision note documenting the discovery. - Replace "implicitDependencies — fallback paths become first-class" section with "namedInputs — fallback paths become first-class". - Concrete project.json example uses namedInputs.deploymentConfig with {workspaceRoot}/... paths, bound to target inputs. - Migration sequencing updated: PR 1 retroactively documented as "tags only (shipped)"; PR 2 includes the namedInputs migration. - Risk surface revised: namedInputs target-binding fragility (must reference in target inputs to take effect). - Acceptance criteria updated. The shim still targets ~50 LOC; the migration goal is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(ci-scope): revise plan to match namedInputs spec PR 1's Task 1 collapsed to a SHIPPED stub with archived tag-categorization rules in a <details> block. Adds Task 2.5 to PR 2: add namedInputs. deploymentConfig to apps/cockpit and apps/website project.json, reference in build target inputs, smoke-test that nx affected picks up vercel.cockpit.json changes correctly. Keeps Tasks 3-8 unchanged (shim rewrite, test migration, smoke, commit, drift guard) — those don't depend on the implicitDependencies vs namedInputs distinction beyond the smoke-test expectations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scope:*tags to every CI-participating project.json (~87 files), making scope membership a data declaration rather than a hand-maintained code rule.implicitDependenciesonapps/cockpitandapps/websitefor the non-project files (vercel..json, scripts/.ts, capability-registry.ts) that currently live inapplyFallbackPathScope.scripts/ci-scope.mjsis untouched — it still drives gating via its existing rules. The new metadata is inert until PR 2.See spec:
docs/superpowers/specs/2026-05-21-ci-scope-thin-shim-design.mdSee plan:
docs/superpowers/plans/2026-05-21-ci-scope-thin-shim-plan.mdKnown concern
//scripts/deploy-smoke.tsis included inapps/cockpit'simplicitDependenciesper the spec, but this file does not exist at the repo root. It only exists atapps/cockpit/scripts/deploy-smoke.ts(already separately listed). The entry is stale in the spec. Leaving it as-is per the plan's instruction to report rather than silently remove — please confirm whether to drop the duplicate root-level entry.Test plan
nx graphloads cleanly (node_modules needed; CI will validate)libs/chat/project.jsonhas all 10 broadcast scope tagscockpit/chat/messages/angular/project.jsonhasscope:cockpit-e2e+scope:cockpit-examplesapps/cockpit/project.jsonhas 12-entryimplicitDependencieslist🤖 Generated with Claude Code