Repository navigation
fix(check): lint and check skip compositions the project never mounts - #7369
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Contributor
There was a problem hiding this comment.
Approve at 5f146411. No blockers.
Verified
- Fails without the fix: with
project.tsfromorigin/main, all four new cases inproject.test.tsfail: the three under "compositions the entry never mounts" and "names the unmounted count in one line". All of them pass at this head. project.test.ts,projectShaders.test.tsandsnippetFragment.test.tspass at this head (97 tests).- The skip decision reuses
mountedSources. That resolvesdata-composition-srcagainst the project root, which matches the runtime:compositionLoaderresolves it againstdocument.baseURI. So nested mounts are followed the same way the player loads them. blank_root_with_standalone_compositionstill gets the unmounted sources. Snippet fragments are skipped but not counted in the notice.- When the target is a single file (
entryFile), thecompositions/walk is skipped as before.
Non-blocking notes
- The default changes for every caller that passes no options:
render(renderSetupWorker),publish,validate,snapshot, and the Studio project lint. Errors in unmounted files no longer block render or publish, and those commands print no notice. That seems right, because the files are not rendered. Still, the PR body only mentionslintandcheck, so it is worth a line there. Studio is unaffected in practice:lintUncoveredHtmlstill lints those files one at a time. - A mount with a query or hash, such as
data-composition-src="compositions/a.html?v=2", does not resolve to a file inmountedSources. That file would be counted as unmounted and skipped. This edge case comes from the existing helper and does not need to block this PR.
Contributor
Contributor
There was a problem hiding this comment.
Approved again at 727d08e5. No blockers.
What changed since my approval at 5f146411
- Only
packages/cli/src/utils/lintProject.test.tschanged. - That file has 13
lintProject(...)calls whose fixtures put sub-compositions undercompositions/without mounting them throughdata-composition-src. Each of those calls now passes{ includeUnmounted: true }. That keeps what each test checks, and no assertion was loosened. This is the same fix the earlier head applied to the lint package's own tests. The CLI copy of these tests was missed then, and it is what turnedCIandWindows render verificationred on5f146411. - No production code changed, so my earlier review still holds.
All workflow runs on 727d08e5 are green, including CI and Windows render verification.
Merged
3 of 5 tasks
6 of 7 tasks
SanHsien
added a commit
to SanHsien/hyperframes
that referenced
this pull request
Nov 9, 2026
Port the adopted upstream fixes from f5bde95 to the current upstream tip: heygen-com#7375 multipart cloud upload, heygen-com#7382 minParallelChunks, heygen-com#7349 HLG header SEI, heygen-com#7369 skip unmounted compositions in lint/check, heygen-com#7381 filesystem-path media in the cloud archive, heygen-com#7383 Safari cut-point pre-roll revert, heygen-com#7373 clock steering between audio time updates, heygen-com#7384 injector test isolation, heygen-com#7378 preview seek retention, heygen-com#7390 virtual timer schedule per worker, heygen-com#7394 CDN script failure naming, heygen-com#7395 menu row radius, heygen-com#7119 decode timeout caller test, heygen-com#7397 authored tween order, heygen-com#7402 capture page clip loading, heygen-com#7412 muted video audio track at cuts, heygen-com#6150 template root variable test, heygen-com#7442 held tail seek once. Deliberate local differences: heygen-com#7067's audio-start hold is not carried into clock.ts, mountedSources comes from heygen-com#6827 as a helper only, cloud/_gen/types.ts omits the image-request types the fork does not generate, and the lint symlink test skips through symlinkOrSkip where the account cannot create links. Co-Authored-By: Claude Sonnet <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.
What
hyperframes lint, andhyperframes check(which lints first), now lint only the compositions the project uses:index.htmland every file reached throughdata-composition-src, followed through the files those mount. A file undercompositions/that nothing mounts, such as an installed block not placed yet, is left out, and the run says so in one line:--include-unmountedonlintandcheckbrings back today's behavior (every.htmlundercompositions/).lint --jsonlists the skipped files inunmountedCompositions.blank_root_with_standalone_compositionstill sees unmounted files: it exists to catch a blankindex.htmlnext to a finished composition nobody mounts.lintProjecttakes an options argument (includeUnmounted); the existing mounted-sources walk decides what is mounted, so lint, font lookup and this skip agree.fallowfindings in touched files fixed rather than ignored: a duplicated url() parse inproject.tsbecamelocalCssUrl, andSTOP_CODESincheckPipeline.tsis no longer exported (nothing imports it).Why
A user report: check "warns about template components I am not even using. It would help if it ... only checked what is actually in the project." Lint walked every
.htmlundercompositions/whether or not anything mounted it.Test plan
packages/lint/src/project.test.ts"compositions the entry never mounts": an unmounted file and a nested one are not linted and are named inunmountedCompositions;includeUnmountedlints them; a composition mounted by a mounted composition is still linted. Plus the one-line notice.project.tsthe three new cases fail (3 failed).packages/cli/src/commands/lint.test.ts: the notice prints once,--include-unmountedreacheslintProject, and--jsoncarriesunmountedCompositions.includeUnmounted: true, which keeps what they test.lint,check,checkPipeline,validate,snapshot*,publish,lintFormatunit suites: 472 passed, 3 runs; the one failure,snapshotHdrFrame.test.ts, fails the same way on main on that machine.lintlints 2 files and prints the line;--include-unmountedlints 3 and reports the unused file's finding;--jsonlists it.tsc --noEmitexit 0 forcliandlint;bun run format:checkexit 0;fallow audit --base origin/main --fail-on-issuesexit 0; oxlint exit 0; comment ratchet and citations exit 0.