From cbf2e56899ca4c0557c512b9e77fd956f3522407 Mon Sep 17 00:00:00 2001 From: Miguel Angel Simon Sierra Date: Sun, 20 Sep 2026 18:43:36 -0400 Subject: [PATCH] fix(cli): preserve media-use parity coverage --- .fallowrc.jsonc | 3 +++ .github/workflows/ci.yml | 6 +++--- packages/core/src/figma/mediaIndex.test.ts | 5 +++-- packages/core/src/mediaGradeAnalyzer.vendoredParity.test.ts | 2 +- skills-manifest.json | 2 +- skills/media-use/scripts/resolve.mjs | 4 ++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.fallowrc.jsonc b/.fallowrc.jsonc index 51a2fb63b8..dee2e1bcb8 100644 --- a/.fallowrc.jsonc +++ b/.fallowrc.jsonc @@ -845,6 +845,9 @@ // adding branches. The line-shift fingerprint re-flags the inherited // complexity even though the logic is unchanged. "packages/cli/src/commands/info.ts", + // media-use was relocated from skills/ without changing its engine logic; + // preserve the inherited audit baseline while the compatibility move lands. + "packages/cli/src/media-use/**", // gsapParserAcorn.ts: the flagged `sameMemberAccess` (structural equality // of two member-access nodes) pre-dates this PR's motion-eval work // (added in #1760, unchanged since). The new const-folding / set-seeding / diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7489c3f14..499ef7d52c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -375,8 +375,8 @@ jobs: # `node:` built-in imports. They aren't part of any workspace package, and # the main `Test` job's `code` path filter excludes `skills/**`, so without # this dedicated job they'd never run in CI. Examples: - # * skills/media-use/scripts/resolve.test.mjs - # * skills/media-use/scripts/lib/manifest.test.mjs + # * packages/cli/src/media-use/resolve.test.mjs + # * packages/cli/src/media-use/lib/manifest.test.mjs # Several of these are regression guards (e.g. shell-injection cases), so # the whole point is that they fire on PRs that touch skills/. test-skills: @@ -396,7 +396,7 @@ jobs: # would defeat the whole point of this job). run: | set -euo pipefail - mapfile -t SKILLS_TESTS < <(find skills -type f -name "*.test.mjs" | sort) + mapfile -t SKILLS_TESTS < <(find skills packages/cli/src/media-use -type f -name "*.test.mjs" | sort) if [ "${#SKILLS_TESTS[@]}" -eq 0 ]; then echo "::error::No skills/**/*.test.mjs files found. Did the layout change?" exit 1 diff --git a/packages/core/src/figma/mediaIndex.test.ts b/packages/core/src/figma/mediaIndex.test.ts index b2d597f8ae..95aedcb9d6 100644 --- a/packages/core/src/figma/mediaIndex.test.ts +++ b/packages/core/src/figma/mediaIndex.test.ts @@ -87,9 +87,10 @@ describe("regenerateIndex", () => { "..", "..", "..", - "skills", + "packages", + "cli", + "src", "media-use", - "scripts", "lib", "index-gen.mjs", ), diff --git a/packages/core/src/mediaGradeAnalyzer.vendoredParity.test.ts b/packages/core/src/mediaGradeAnalyzer.vendoredParity.test.ts index 8eb943574e..7a62e9d079 100644 --- a/packages/core/src/mediaGradeAnalyzer.vendoredParity.test.ts +++ b/packages/core/src/mediaGradeAnalyzer.vendoredParity.test.ts @@ -69,7 +69,7 @@ function productResult(signalStats = SIGNALSTATS) { async function vendoredResult(signalStats = SIGNALSTATS) { const moduleUrl = new URL( - "../../../skills/media-use/scripts/lib/grade-analyzer.mjs", + "../../../packages/cli/src/media-use/lib/grade-analyzer.mjs", import.meta.url, ); const analyzer = await import(moduleUrl.href); diff --git a/skills-manifest.json b/skills-manifest.json index fc2cac54b5..ddf3fb6100 100644 --- a/skills-manifest.json +++ b/skills-manifest.json @@ -54,7 +54,7 @@ "files": 1 }, "media-use": { - "hash": "0e61072302568090", + "hash": "8d0abb1e25edcaf3", "files": 79 }, "motion-graphics": { diff --git a/skills/media-use/scripts/resolve.mjs b/skills/media-use/scripts/resolve.mjs index 7e3cbe68ef..4b04f8b38a 100644 --- a/skills/media-use/scripts/resolve.mjs +++ b/skills/media-use/scripts/resolve.mjs @@ -1,3 +1,3 @@ #!/usr/bin/env node -import { spawnSync } from "node:child_process"; import { join } from "node:path"; import { fileURLToPath } from "node:url"; -const root = join(fileURLToPath(new URL("../../../", import.meta.url))); const cli = join(root, "packages/cli/dist/cli.js"); const result = spawnSync(process.execPath, [cli, "media-use", "resolve", ...process.argv.slice(2)], { stdio: "inherit" }); process.exit(result.status ?? 1); +import { spawnSync } from "node:child_process"; import { existsSync } from "node:fs"; import { join } from "node:path"; import { fileURLToPath } from "node:url"; +const root = join(fileURLToPath(new URL("../../../", import.meta.url))); const dist = join(root, "packages/cli/dist/cli.js"); const result = existsSync(dist) ? spawnSync(process.execPath, [dist, "media-use", "resolve", ...process.argv.slice(2)], { stdio: "inherit" }) : spawnSync("bun", [join(root, "packages/cli/src/cli.ts"), "media-use", "resolve", ...process.argv.slice(2)], { stdio: "inherit" }); process.exit(result.status ?? 1);