Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
- "package.json"
- ".github/workflows/ci.yml"
code:
- "registry/**"
- "packages/**"
- "scripts/**"
- "package.json"
Expand Down Expand Up @@ -360,6 +361,8 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- name: Install FFmpeg for catalog preview tests
uses: ./.github/actions/install-ffmpeg-linux
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bash scripts/ci/install-workspace-dependencies.sh
- run: bun run --filter '@hyperframes/{parsers,lint,studio-server}' build
Expand All @@ -368,7 +371,14 @@ jobs:
# After the builds: the preview scripts drive the producer, which imports
# @hyperframes/core from dist, so running these first fails on a missing
# module rather than on anything the test is actually checking.
- name: Install Chrome for catalog preview tests
id: catalog-chrome
uses: browser-actions/setup-chrome@c785b87e244131f27c9f19c1a33e2ead956ab7ce # v1
with:
chrome-version: stable
- run: bun run test:scripts
env:
HYPERFRAMES_BROWSER_PATH: ${{ steps.catalog-chrome.outputs.chrome-path }}
- run: bun run --filter '!@hyperframes/producer' test

producer-source-tests:
Expand Down Expand Up @@ -429,7 +439,7 @@ jobs:
echo "::error::No skills/**/*.test.mjs files found. Did the layout change?"
exit 1
fi
SKILLS_TESTS+=(scripts/check-media-use-copy-parity.test.mjs)
SKILLS_TESTS+=(scripts/check-media-use-copy-parity.test.mjs scripts/creator-editing-capabilities.test.mjs)
printf 'Running %d skills test file(s):\n' "${#SKILLS_TESTS[@]}"
printf ' * %s\n' "${SKILLS_TESTS[@]}"
node --test "${SKILLS_TESTS[@]}"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"player:perf": "bun run --filter @hyperframes/player perf",
"format:check": "oxfmt --check .",
"knip": "knip",
"test:scripts": "node --import tsx --test scripts/animejs-v4-guidance.test.mjs scripts/check-tracked-artifacts.test.mjs scripts/check-no-main-deletions.test.mjs scripts/check-pr-captures.test.mjs scripts/check-docs-snippet-motion.test.mjs scripts/registry-target-paths.test.mjs scripts/check-workspace-contracts.test.mjs scripts/check-media-use-copy-parity.test.mjs scripts/check-package-cycles.test.mjs scripts/check-cli-process-ownership.test.mjs scripts/check-large-files.test.mjs scripts/package-subpaths.test.mjs scripts/validate-release-channel.test.mjs scripts/publish-workflow.test.mjs scripts/install-workspace-dependencies.test.mjs scripts/draft-changelog.test.ts scripts/set-version.test.ts scripts/release-prepare.test.ts scripts/cli-options.test.ts scripts/changelog-weekly.test.ts scripts/claude-plugin-compression.test.ts scripts/catalog-payload-assets.test.ts scripts/host-registry-assets.test.ts scripts/catalog-preview-temp.test.ts scripts/catalog-hosted-files.test.ts scripts/player-cdn-pin.test.ts scripts/studio-runtime-smoke.test.mjs scripts/verify-packed-manifests.test.mjs scripts/lint-skills.test.mjs scripts/creator-editing-recipes.test.mjs packages/gcp-cloud-run/check-dockerfile-workspaces.test.mjs packages/core/scripts/writeGeneratedFile.test.ts scripts/catalog-drift.test.ts scripts/catalog-fetch-mirror.test.ts scripts/catalog-script-inlining.test.ts scripts/catalog-detail.test.ts scripts/generate-catalog-pages.test.ts scripts/verify-catalog-payloads.test.ts scripts/registry-skill-files.test.ts && vitest run scripts/catalog/ scripts/contrastRatchet.test.ts",
"test:scripts": "node --import tsx --test scripts/animejs-v4-guidance.test.mjs scripts/check-tracked-artifacts.test.mjs scripts/check-no-main-deletions.test.mjs scripts/check-pr-captures.test.mjs scripts/check-docs-snippet-motion.test.mjs scripts/registry-target-paths.test.mjs scripts/check-workspace-contracts.test.mjs scripts/check-media-use-copy-parity.test.mjs scripts/check-package-cycles.test.mjs scripts/check-cli-process-ownership.test.mjs scripts/check-large-files.test.mjs scripts/package-subpaths.test.mjs scripts/validate-release-channel.test.mjs scripts/publish-workflow.test.mjs scripts/install-workspace-dependencies.test.mjs scripts/draft-changelog.test.ts scripts/set-version.test.ts scripts/release-prepare.test.ts scripts/cli-options.test.ts scripts/changelog-weekly.test.ts scripts/claude-plugin-compression.test.ts scripts/catalog-payload-assets.test.ts scripts/host-registry-assets.test.ts scripts/catalog-preview-temp.test.ts scripts/catalog-hosted-files.test.ts scripts/player-cdn-pin.test.ts scripts/studio-runtime-smoke.test.mjs scripts/verify-packed-manifests.test.mjs scripts/lint-skills.test.mjs scripts/creator-editing-recipes.test.mjs packages/gcp-cloud-run/check-dockerfile-workspaces.test.mjs packages/core/scripts/writeGeneratedFile.test.ts scripts/catalog-drift.test.ts scripts/catalog-fetch-mirror.test.ts scripts/catalog-script-inlining.test.ts scripts/catalog-detail.test.ts scripts/generate-catalog-pages.test.ts scripts/verify-catalog-payloads.test.ts scripts/registry-skill-files.test.ts scripts/creator-editing-capabilities.test.mjs scripts/generate-catalog-previews.test.ts scripts/registry-primitive-payloads.test.ts registry/components/pan-stations/pan-stations.test.mjs && vitest run scripts/catalog/ scripts/contrastRatchet.test.ts scripts/generate-catalog-payloads.test.ts",
"typecheck:scripts": "tsc --noEmit -p scripts/tsconfig.json",
"test:skills": "node --test 'skills/**/*.test.mjs' 'packages/cli/src/media-use/**/*.test.mjs'",
"generate:previews": "tsx scripts/generate-template-previews.ts",
Expand Down
14 changes: 9 additions & 5 deletions packages/producer/scripts/test-classification.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const PRODUCER_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), ".
// or local sockets. Keep the list explicit so a filename-only rename does not
// make Git/fallow re-audit thousands of unchanged test lines as new code.
const INTEGRATION_TEST_FILES = new Set([
"tests/distributed/_smoke/webm-concat-copy.test.ts",
"tests/playback-rate-av-parity/playback-rate-av-parity.test.ts",
"src/regression-harness-psnr.test.ts",
"src/services/coreRuntimeBrowser.test.ts",
"src/services/deterministicFonts-systemCapture.test.ts",
Expand Down Expand Up @@ -55,11 +57,13 @@ export function classifyTestSource(filePath, source, integrationFiles = INTEGRAT
}

export function discoverProducerTests(producerRoot = PRODUCER_ROOT) {
const srcDir = resolve(producerRoot, "src");
const files = collectTestFiles(srcDir).map((absolutePath) => ({
absolutePath,
filePath: relative(producerRoot, absolutePath).replaceAll("\\", "/"),
}));
const roots = ["src", "tests"].map((directory) => resolve(producerRoot, directory));
const files = roots
.flatMap((directory) => collectTestFiles(directory))
.map((absolutePath) => ({
absolutePath,
filePath: relative(producerRoot, absolutePath).replaceAll("\\", "/"),
}));
const discoveredFiles = new Set(files.map((test) => test.filePath));
const staleEntries = [...INTEGRATION_TEST_FILES].filter((file) => !discoveredFiles.has(file));
if (staleEntries.length > 0) {
Expand Down
12 changes: 12 additions & 0 deletions packages/producer/scripts/test-classification.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ describe("producer test classification", () => {
});
});
});

it("selects the distributed smoke and playback parity tests as integration tests", () => {
const files = [
"tests/distributed/_smoke/webm-concat-copy.test.ts",
"tests/playback-rate-av-parity/playback-rate-av-parity.test.ts",
];
const selected = discoverProducerTests().filter((entry) => files.includes(entry.file));
assert.deepEqual(
selected,
files.map((file) => ({ file, runner: "bun", lane: "integration" })),
);
});
6 changes: 4 additions & 2 deletions scripts/creator-editing-capabilities.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ test("keyframes states truthful creator capabilities and ownership boundaries",
);
assert.match(keyframes, /non-timed|non-clip/);
assert.match(keyframes, /wrapper inside the clip|inner.*wrapper/i);
assert.match(keyframes, /speed ramps?[\s\S]{0,300}(not supported|preprocess)/i);
assert.match(keyframes, /speed ramps?[\s\S]{0,80}`rate` lane in `data-automation`/i);
assert.match(keyframes, /speed ramps?[\s\S]{0,220}wins over the constant/i);
assert.match(keyframes, /arbitrary mid-source freeze[\s\S]{0,300}(not supported|preprocess)/i);
assert.doesNotMatch(keyframes, /keyframe(?:d|ing)?\s+(?:the\s+)?data-playback-rate/i);
});
Expand Down Expand Up @@ -132,7 +133,8 @@ test("audio skill owns placed-track fades, automation, ducking, and effects", as
files.audio,
);
assert.match(audio, /constant.*playback rate|data-playback-rate/i);
assert.match(audio, /speed ramps?[\s\S]{0,220}(not supported|preprocess)/i);
assert.match(audio, /speed ramps?[\s\S]{0,80}`rate` lane in `data-automation`/i);
assert.match(audio, /speed ramps?[\s\S]{0,220}wins over the constant/i);
});

test("WebAudio scheduling combines per-element and global transport playback rates", async () => {
Expand Down
13 changes: 1 addition & 12 deletions scripts/test-reachability-baseline.json
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
{
"total": 7,
"files": {
"packages/producer/tests/distributed/_smoke/webm-concat-copy.test.ts": 1,
"packages/producer/tests/playback-rate-av-parity/playback-rate-av-parity.test.ts": 1,
"registry/components/pan-stations/pan-stations.test.mjs": 1,
"scripts/creator-editing-capabilities.test.mjs": 1,
"scripts/generate-catalog-payloads.test.ts": 1,
"scripts/generate-catalog-previews.test.ts": 1,
"scripts/registry-primitive-payloads.test.ts": 1
}
}
{ "total": 0, "files": {} }
26 changes: 20 additions & 6 deletions scripts/test-reachability.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,29 @@
".github/workflows/ci.yml",
"**/package.json",
"**/*.test.{mjs,ts,tsx}"
]
],
"scripts/creator-editing-capabilities.test.mjs": [
"skills/**",
"packages/core/**",
"packages/engine/**"
],
"scripts/registry-primitive-payloads.test.ts": ["registry/**"],
"scripts/generate-catalog-previews.test.ts": [
"registry/**",
"scripts/**",
"packages/producer/**"
],
"scripts/generate-catalog-payloads.test.ts": ["registry/**", "scripts/**"]
},
"runners": [
{
"cwd": ".",
"command": "set -euo pipefail\nmapfile -t SKILLS_TESTS < <(find skills packages/cli/src/media-use -type f -name \"*.test.mjs\" | sort)\nif [ \"${#SKILLS_TESTS[@]}\" -eq 0 ]; then\necho \"::error::No skills/**/*.test.mjs files found. Did the layout change?\"\nexit 1\nfi\nSKILLS_TESTS+=(scripts/check-media-use-copy-parity.test.mjs)\nprintf 'Running %d skills test file(s):\\n' \"${#SKILLS_TESTS[@]}\"\nprintf ' * %s\\n' \"${SKILLS_TESTS[@]}\"\nnode --test \"${SKILLS_TESTS[@]}\"",
"command": "set -euo pipefail\nmapfile -t SKILLS_TESTS < <(find skills packages/cli/src/media-use -type f -name \"*.test.mjs\" | sort)\nif [ \"${#SKILLS_TESTS[@]}\" -eq 0 ]; then\necho \"::error::No skills/**/*.test.mjs files found. Did the layout change?\"\nexit 1\nfi\nSKILLS_TESTS+=(scripts/check-media-use-copy-parity.test.mjs scripts/creator-editing-capabilities.test.mjs)\nprintf 'Running %d skills test file(s):\\n' \"${#SKILLS_TESTS[@]}\"\nprintf ' * %s\\n' \"${SKILLS_TESTS[@]}\"\nnode --test \"${SKILLS_TESTS[@]}\"",
"tests": [
"skills/**/*.test.mjs",
"packages/cli/src/media-use/**/*.test.mjs",
"scripts/check-media-use-copy-parity.test.mjs"
"scripts/check-media-use-copy-parity.test.mjs",
"scripts/creator-editing-capabilities.test.mjs"
],
"sources": {},
"reason": "Shell find plus an explicit parity file; exact command match invalidates this mapping on edits."
Expand All @@ -27,19 +40,20 @@
"command": "bun run producer:test:${{ matrix.lane }}",
"tests": [
"packages/producer/src/**/*.test.ts",
"packages/producer/scripts/test-classification.test.mjs"
"packages/producer/scripts/test-classification.test.mjs",
"packages/producer/tests/**/*.test.ts"
],
"sources": {
"packages/producer/scripts/run-test-lane.mjs": "bff02680f19eebcce0df72cdeedbbc05edfdcede3f3f60658fc0cb18ed8c59f6",
"packages/producer/scripts/test-classification.mjs": "e3086467feb160d0b2debcb0deb70c4f07c8e2aa9d9063b0da8e97e5728e89cc",
"packages/producer/scripts/test-classification.mjs": "f7a1129f49d86fe4a1429dc8b9b75168b25540e1c63242fc79376ae02cf5d0de",
".github/workflows/ci.yml#job#producer-source-tests": "3709c6ac6c9f5c7c66f57fc6c1c106aec4ffe906f919eb7cdf2a6ce1d4e0974c",
"packages/producer/package.json#script#test:unit": "ae6beda8319d166774be958ea5593cd27dbf7f6c9bce1d787a3fe28dfc3477b1",
"packages/producer/package.json#script#test:integration": "008589f37d026877595a13501cbb66abd5cbe50e21fdcac6904f45466c3f475d",
"packages/producer/package.json#script#test:classification": "4ad50d88c81de374dd6ef8a53d702a4b1901483837ecd3d833b1cb0c9a29a058",
"package.json#script#producer:test:unit": "ded6d4183d455d1f414e41d15794c1aef5323e53b5ea5e2ff349e3bb049c18db",
"package.json#script#producer:test:integration": "8bb545947f4f8fef3bd5c6c9b1bcb394c7c942d7a3ab90cf4540c662572a278e"
},
"reason": "Both unit and integration matrix lanes run source discovery and the classification test; workflow and scripts are pinned to invalidate changed selection."
"reason": "Both unit and integration matrix lanes discover tests under src and tests; workflow and runner sources are pinned to invalidate changed selection."
}
]
}
Loading