Skip to content

fix(check): report motion sidecars next to sub-compositions - #8508

Open
zhengqiuyang wants to merge 1 commit into
heygen-com:mainfrom
zhengqiuyang:fix/motion-sidecar-subcomposition
Open

zhengqiuyang wants to merge 1 commit into
heygen-com:mainfrom
zhengqiuyang:fix/motion-sidecar-subcomposition

Conversation

@zhengqiuyang

Copy link
Copy Markdown
Contributor

What

check now notices a *.motion.json sidecar next to a sub-composition and reports it as an ignored warning instead of returning "motion": { "enabled": false, "specPath": null }.

Why

The motion-sidecar docs said "next to the composition", but findMotionSpec only reads the project root, so a sidecar in compositions/ disappeared without a word. The issue offers two acceptable outcomes: evaluate scene sidecars, or document that only the root sidecar is supported. This PR takes the second path and makes the limitation visible rather than silent.

The JSON sidecar contract is root-timeline relative: selectors and bySec are sampled against the entry composition's seeked timeline. Mapping them to a sub-composition needs a selector scope plus a start-time offset, which is a separate change. Until then, a warning plus accurate docs is better than a silent no-op.

How

  • findNestedMotionSpecs(projectDir) walks below the project root (skipping node_modules, dist and dot-directories) and returns sidecars not in the root.
  • runCheckPipeline adds a motion_spec_ignored warning for each one, pointing at the sidecar path and telling the author to move the assertions into index.motion.json.
  • Docs (docs/packages/cli.mdx, skills/hyperframes-cli/references/lint-validate-inspect.md) now say only the entry composition's sidecar is evaluated.
  • Warnings do not change the exit code; a root sidecar keeps working exactly as before.

Refs #8464.

Test plan

  • bunx vitest run packages/cli/src/commands/check.test.ts packages/cli/src/utils/motionSpec.test.ts — 233 passed
  • New pipeline test: a compositions/scene-b.motion.json produces motion_spec_ignored with warningCount >= 1
  • New discovery test: nested sidecars are returned, the root sidecar is not
  • oxlint / oxfmt --check clean; skill mirror and pre-commit hooks pass

@mintlify

mintlify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 2d31764.

Approve preview

@zhengqiuyang
zhengqiuyang force-pushed the fix/motion-sidecar-subcomposition branch from f9ae08d to 0eefd29 Compare November 22, 2026 16:21
@zhengqiuyang
zhengqiuyang force-pushed the fix/motion-sidecar-subcomposition branch from 0eefd29 to 2d31764 Compare November 26, 2026 12:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant