Skip to content

feat(cli): check --no-craft skips the craft pass for a render preflight - #7400

Closed
miguel-heygen wants to merge 1 commit into
mainfrom
perf/check-no-craft
Closed

miguel-heygen wants to merge 1 commit into
mainfrom
perf/check-no-craft

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

hyperframes check --no-craft skips the craft pass (dead stretches, unread lines, silent films). The report shows Craft as skipped, and the pass is on by default.

Why

On a 78 s film the craft pass is about half of a full check (599 of its 600 samples). A render preflight that only needs layout, motion and contrast has no way to leave it out, so each preflight pays for it.

Related work

Refs the request to make the craft pass switchable. The unchanged-project cache is a separate PR.

How

  • One new option, craft, read by craftEnabled, the single place that decides whether craft frames are sampled in both the overlap pass and the analysis. --range already turned it off through the same line.
  • The CLI flag is --no-craft; the human report prints Craft ◇ skipped and --json reports craft.enabled: false.
  • Searched for an existing craft switch or budget flag (git grep -n -i "craft" packages/cli/src/commands/check.ts): none, only the hard-coded sample cap and time budget in checkPipeline.ts.

Test plan

  • Unit tests: with craft: false no craft frame is sampled and the report says the pass is off; --no-craft reaches the pipeline as craft: false and the pass is on without it. The first fails when the options.craft check is removed.
  • Timings on one machine and film (a 13-scene, 78 s synthetic film), alternating runs, all five of each:
    • default: 10091, 8800, 8267, 8548, 8545 ms
    • --no-craft: 4310, 4117, 4315, 4280, 4498 ms
  • Documentation updated (--no-craft in the CLI reference)
  • Comments say why, not what

Size

40 changed lines. It is a separate switch from the unchanged-project cache (#7398), so each can be reviewed and reverted alone.

@mintlify

mintlify Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Nov 8, 2026, 7:36 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@jerrai-bot-heygen jerrai-bot-heygen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved exact e6582828 for check --no-craft. The CLI parser defaults craft to true and passes false only for the negated flag; direct pipeline callers with no craft keep the old options.craft !== false behavior. craftEnabled is the common gate for craft-frame collection and analysis; --range remains an independent disable, and the disabled report retains craft.enabled:false / human “Craft ◇ skipped” rather than claiming a full craft pass. Tests check both CLI option values and a real pipeline driver receiving zero craft-frame calls. The CLI reference documents the new switch. I did not run a local suite; hosted checks had no red result at stamp time and remaining jobs were pending.

Non-blocking: the agent-facing CLI skill still lists --no-contrast without --no-craft; add it as a docs follow-up. If combined with #7398's cache PR, craft is included in its options key, so a skipped-craft result is not replayed as a full check; the PRs may need a trivial CheckOptions merge resolution. No merge/enqueue by me. — Jerrai

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 91 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (8)

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve at e6582828. I found no blockers.

  • Wiring: craftEnabled is the only gate for craft. It covers both the overlap-pass sampling (collectMotionOverlapSamples) and auditCraft, so --no-craft drops both, and the result falls back to disabledCraft(). The human report already prints Craft ◇ skipped when !section.enabled, and --json reports craft.enabled: false. When craft is left undefined (for DEFAULT_CHECK_OPTIONS or any programmatic caller), the pass stays on, so the default behavior doesn't change.
  • Tests, run locally: I removed options.craft !== false && from craftEnabled. The pipeline test "--no-craft never samples the craft frames…" then fails, and it passes with the change restored, which matches the claim in the body. The whole of check.test.ts passes (168/168).
  • CI on this head: all workflows passed.
  • This is a feature PR, so the "fails without the fix" rule doesn't apply.

Non-blocking, for #7398 (unchanged-project cache): whichever PR lands second should make craft part of the cache key. Otherwise a cached --no-craft pass could be returned for a full check, or the other way round.

@miguel-heygen

Copy link
Copy Markdown
Collaborator Author

Folded into #7398 (the 100-line floor refused it alone).

This branch was successfully deployed

1 active deployment
staging - docs — e6582828 Deployed Nov 8, 2026 by mintlify[bot]
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.

2 participants