Repository navigation
fix(cli): lint says nothing when the OS refuses to lower its priority - #7244
Conversation
There was a problem hiding this comment.
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
Commentsworkflow fails and the body doesn't explain it. ↓ inline - nit: the
EACCESbranch has no test; the only refused case tested isEPERM. TheESRCHtest also droppedtoHaveBeenCalledTimes(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.
d842464 to
3b7b1a3
Compare
|
All three addressed at 3b7b1a3: the body now has the |
Edit accuracy: accurate 267 (base branch 267), smooth 112 of thoseThe gate passes. Quarantined, measured but not gated (8)
Unstable (1)
|
…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]>
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
lowerPriorityreads the OS's own code from the error Node throws (error.info.code;error.codeis the genericERR_SYSTEM_ERROR) and returns quietly forEPERMandEACCES. The catch still writes its line for anything else.Test plan
renderSetupWorker.priority.test.tsthrows errors shaped as Node's own (checked against a real refusedos.setPrioritycall): a refused one (EPERMandEACCES) prints nothing and lint still answers{"ok":true}; anESRCHstill prints its one line and lint still answers.renderSetupWorker.priority.test.tsandrenderSetupWorker.test.ts: 14 of 14 pass after CI's workspace builds;oxfmt --checkclean.fails without the fix:
renderSetupWorker.priority.test.ts› "still lints, saying nothing, when a sandbox refuses lowering the priority (EPERM)" and "(EACCES)" fail withrenderSetupWorker.tsput 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.