Repository navigation
test(installation): skip media the cdn build excludes in the workspace contract - #73
Conversation
…e contract simple-moq-video is kept off the CDN (cdnMediaExclusions in packages/cdn/vite.config.ts), so CDN_MEDIA_SUBPATHS rightly omits it, but the contract test compared the list against every html media definition. Claude-Session: https://claude.ai/code/session_01DaH4ihf1LLPqmXShYkvBat
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/installation/src/tests/workspace-contract.test.ts">
<violation number="1" location="packages/installation/src/tests/workspace-contract.test.ts:40">
P2: `CDN_EXCLUDED_MEDIA` is a second hand-maintained copy of `cdnMediaExclusions` in `packages/cdn/vite.config.ts`, and it uses a different key format (`'simple-moq-video'` vs `'media/simple-moq-video'`). If the CDN exclusion changes without this set changing, the contract test will keep passing while the CDN build and `CDN_MEDIA_SUBPATHS` drift apart. Consider sharing one exported list between the two, or having the test assert the exclusion explicitly against the vite config.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| ); | ||
|
|
||
| /** Definitions the CDN build leaves out; mirrors `cdnMediaExclusions` in `packages/cdn/vite.config.ts`. */ | ||
| const CDN_EXCLUDED_MEDIA = new Set(['simple-moq-video']); |
There was a problem hiding this comment.
P2: CDN_EXCLUDED_MEDIA is a second hand-maintained copy of cdnMediaExclusions in packages/cdn/vite.config.ts, and it uses a different key format ('simple-moq-video' vs 'media/simple-moq-video'). If the CDN exclusion changes without this set changing, the contract test will keep passing while the CDN build and CDN_MEDIA_SUBPATHS drift apart. Consider sharing one exported list between the two, or having the test assert the exclusion explicitly against the vite config.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/installation/src/tests/workspace-contract.test.ts, line 40:
<comment>`CDN_EXCLUDED_MEDIA` is a second hand-maintained copy of `cdnMediaExclusions` in `packages/cdn/vite.config.ts`, and it uses a different key format (`'simple-moq-video'` vs `'media/simple-moq-video'`). If the CDN exclusion changes without this set changing, the contract test will keep passing while the CDN build and `CDN_MEDIA_SUBPATHS` drift apart. Consider sharing one exported list between the two, or having the test assert the exclusion explicitly against the vite config.</comment>
<file context>
@@ -36,6 +36,9 @@ const extensionPackages = new Set(
);
+/** Definitions the CDN build leaves out; mirrors `cdnMediaExclusions` in `packages/cdn/vite.config.ts`. */
+const CDN_EXCLUDED_MEDIA = new Set(['simple-moq-video']);
+
describe('installation workspace contract', () => {
</file context>
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (19)
Players (5)
Skins (29)
UI Components (62)
⚛️ @videojs/react — no changesPresets (7)
Media (22)
Extensions (2)
Players (5)
Skins (18)
UI Components (39)
🧩 @videojs/core — no changesEntries (76)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (13)
📦 @videojs/cdn — no changes📦 @videojs/cloudflare-video — no changes📦 @videojs/dash-video — no changes📦 @videojs/google-cast — no changes📦 @videojs/hlsjs-video — no changes📦 @videojs/media — no changesEntries (3)
📦 @videojs/mux — no changes📦 @videojs/mux-audio — no changesEntries (2)
📦 @videojs/mux-data — no changes📦 @videojs/mux-video — no changesEntries (2)
📦 @videojs/native-hls-video — no changes📦 @videojs/shaka-video — no changes📦 @videojs/spf — no changesEntries (8)
📦 @videojs/spotify-audio — no changes📦 @videojs/tiktok-video — no changes📦 @videojs/twitch-video — no changes📦 @videojs/other — no changesEntries (3)
📦 @videojs/vimeo-video — no changes📦 @videojs/wistia-video — no changesEntries (2)
📦 @videojs/youtube-video — no changesℹ️ How to interpretEach entry is independently bundled, minified, and brotli-compressed. Initial size includes its static import graph; lazy dynamic chunks are reported separately. Entries are not additive because their dependency graphs overlap. Preset rows represent realistic combined bundles. Changes of 300 B or less across initial, lazy, and total size are collapsed, not discarded. Run |
The installation workspace contract from mmcc/moq (#73) requires every html media definition the CDN republishes to appear in CDN_MEDIA_SUBPATHS. The publisher is not playback media the installation builder can offer, so exclude it beside simple-moq-video instead of listing it. Claude-Session: https://claude.ai/code/session_01DaH4ihVZJLpFNTQYdbaDd1
Summary
mmcc/moqCI fails onTest packages (1/4). This started with the upstream sync, which brought ininstallation's workspace contract test. That test requiresCDN_MEDIA_SUBPATHSto list every media definition underpackages/html/src/define/media/. On this branch that includessimple-moq-video, whichpackages/cdn/vite.config.tsdeliberately keeps off the CDN (cdnMediaExclusions) until the MoQ engine can report errors. The subpath list is right; the test didn't know about the exclusion.Changes
CDN_EXCLUDED_MEDIA, which mirrorscdnMediaExclusions).Testing
pnpm -F @videojs/installation test: 308 passed. This includes the contract test that failed on4f732ff53.Unblocks #72's CI.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DaH4ihf1LLPqmXShYkvBat
Summary by cubic
Fixes the
@videojs/installationworkspace contract test failing on CI because it expected every media definition, includingsimple-moq-video, to be republished by the CDN build, which deliberately excludes that definition until the MoQ engine can report errors.CDN_EXCLUDED_MEDIA, mirroringcdnMediaExclusionsinpackages/cdn/vite.config.ts.Written for commit 2db76ce. Summary will update on new commits.