Skip to content

fix(cli): lint says nothing when the OS refuses to lower its priority - #7244

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/cli-quiet-refused-priority
Nov 5, 2026
Merged

miguel-heygen merged 1 commit into
mainfrom
fix/cli-quiet-refused-priority

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

What

A render's lint step no longer prints Lint runs at normal priority: ... uv_os_setpriority returned EPERM (operation not permitted) when the operating system refuses to lower its CPU priority. Any other failure to set the priority is still printed.

Why

In a sandbox that forbids changing priority (an agent's sandboxed shell on macOS, for one), every render printed that line. Nothing is wrong and there is nothing to do: lint simply runs at normal priority and the render carries on. A warning the person cannot act on reads as a fault and gets reported as one.

Related work

Follows the change that let a render start in such a sandbox at all (#5814), which kept the line.

How

lowerPriority reads the OS's own code from the error Node throws (error.info.code; error.code is the generic ERR_SYSTEM_ERROR) and returns quietly for EPERM and EACCES. The catch still writes its line for anything else.

Test plan

  • renderSetupWorker.priority.test.ts throws errors shaped as Node's own (checked against a real refused os.setPriority call): a refused one (EPERM and EACCES) prints nothing and lint still answers {"ok":true}; an ESRCH still prints its one line and lint still answers.

  • renderSetupWorker.priority.test.ts and renderSetupWorker.test.ts: 14 of 14 pass after CI's workspace builds; oxfmt --check clean.

  • fails without the fix: renderSetupWorker.priority.test.ts › "still lints, saying nothing, when a sandbox refuses lowering the priority (EPERM)" and "(EACCES)" fail with renderSetupWorker.ts put back to main (the line is printed); the other two pass.

  • The reason lives in the set's name (SANDBOX_REFUSED_PRIORITY) rather than a comment, so the file's comment share does not grow.

  • Unit tests added/updated

  • Manual testing performed

  • Documentation updated (if applicable)

  • Comments follow CONTRIBUTING.md "Comments": they say why, not what, and a bug fix says what the code must do and how to reproduce the bug

Size

A lone fix in one function with its tests; no open CLI PR touches this file to carry it.

@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.

Verdict: REQUEST CHANGES · 2 blocker · 0 important · 1 nit · head d8424649

The fix itself is right. I checked Node's error shape on a real refused call: os.setPriority(-20) as non-root throws code: "ERR_SYSTEM_ERROR" with info.code: "EACCES", so reading info.code is correct.

  • blocker: the body has no fails without the fix: line naming the failing test. Under this lane's rules a fix PR needs one, e.g. fails without the fix: renderSetupWorker.priority.test.ts › "still lints, saying nothing, when a sandbox forbids lowering the priority". The Test plan describes the failure, but not on that line.
  • blocker: the Comments workflow fails and the body doesn't explain it. ↓ inline
  • nit: the EACCES branch has no test; the only refused case tested is EPERM. The ESRCH test also dropped toHaveBeenCalledTimes(1), so it no longer catches a duplicate warning line.
Scope

Read the whole diff (2 files) and lowerPriority with its caller at head. No earlier reviews. CI when I reviewed: Comments failed; CI, CodeQL, preview-regression and Windows render were still running; the rest passed.

Comment thread packages/cli/src/renderSetupWorker.ts Resolved
@miguel-heygen
miguel-heygen force-pushed the fix/cli-quiet-refused-priority branch from d842464 to 3b7b1a3 Compare November 5, 2026 13:49
@miguel-heygen

Copy link
Copy Markdown
Collaborator Author

All three addressed at 3b7b1a3: the body now has the fails without the fix: line naming both refused-priority tests; the comment is gone and its reason is in the name (SANDBOX_REFUSED_PRIORITY), and the test helper's doc comment went into its name too, so no comment lines are added; EACCES is tested beside EPERM (it.each), and the ESRCH test checks exactly one warning line again. 14 of 14 pass; with main's renderSetupWorker.ts the two refused cases fail.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 112 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)

Unstable (1)

  • seqfastkeys-none-px-r0-root-z100: tracking 0.06, pressJump 0.05, drop 0, reload 0, render 0.02, renderKey -, undo false, teleport true / tracking 0.06, pressJump 0.05, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0.05, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true

@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.

Verdict: APPROVE · 3 resolved, 0 open, 0 new · d842464 → 3b7b1a3 (CI green)

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit c1977fa Nov 5, 2026
83 of 88 checks passed
@miguel-heygen
miguel-heygen deleted the fix/cli-quiet-refused-priority branch November 5, 2026 14:28
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 6, 2026
…eview

Adopts or partially adopts 11 groups: multi-worker tween replay behind
the timeline stand-in (heygen-com#7231), template entries in the shared compile
stage (heygen-com#7217), HYPERFRAMES_CACHE_DIR and HYPERFRAMES_CONFIG_DIR for
every per-user cache and settings file (heygen-com#7224, heygen-com#7229; HeyGen
credentials stay under HEYGEN_CONFIG_DIR), WebKit audio clock (heygen-com#7225),
packet-based video length (heygen-com#7233), HLG tone mapping (heygen-com#7234), fetch
network cause (heygen-com#7236), .hyperframesignore in lint (heygen-com#7239), info
--media (heygen-com#7235), lint priority (heygen-com#7244), check --budget (heygen-com#7245) and the
unknown-command answer (heygen-com#7247). bun.lock gains only the lint `ignore`
edge from heygen-com#7239, already resolved. Watermark advances to 0a6746e.

Co-authored-by: Jerrai <[email protected]>
Co-authored-by: Miguel Ángel <[email protected]>
Co-authored-by: WaterrrForever <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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