fix(cli): preserve media-use parity coverage

This commit is contained in:
Miguel Angel Simon Sierra
2026-09-21 00:46:26 -04:00
parent 5c02f274cb
commit cbf2e56899
6 changed files with 13 additions and 9 deletions
+3
View File
@@ -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 /
+3 -3
View File
@@ -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
+3 -2
View File
@@ -87,9 +87,10 @@ describe("regenerateIndex", () => {
"..",
"..",
"..",
"skills",
"packages",
"cli",
"src",
"media-use",
"scripts",
"lib",
"index-gen.mjs",
),
@@ -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);
+1 -1
View File
@@ -54,7 +54,7 @@
"files": 1
},
"media-use": {
"hash": "0e61072302568090",
"hash": "8d0abb1e25edcaf3",
"files": 79
},
"motion-graphics": {
+2 -2
View File
@@ -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);