Skip to content

fix(cli): a command waiting on the project lock says what it waits for - #7184

Merged
miguel-heygen merged 2 commits into
mainfrom
fix/check-lock-wait-says-who
Nov 4, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
fix/check-lock-wait-says-who

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

When the host asks for the project lock (the project-lock capability), check, snapshot and the other locked commands queue behind whichever command holds the project. The queue was silent: nothing printed until the wait ran out. After 5 seconds of waiting the command now writes one line to stderr naming the holder, how long it has run, and how long this command will wait, then repeats it every 30 seconds.

Example: [hyperframes] waiting for snapshot (pid 4242, running 38s) to finish with this project; waiting up to 300s

Why

Field report: check queued behind a film gate and a snapshot and then timed out "before it ran". The check's own deadline already starts after the lock is taken (the lock wraps the pipeline that creates it), so no time is lost there; what the agent saw was silence for the whole queue, which reads as a hang. Short waits stay quiet so parallel commands do not add noise.

Fails without the fix: packages/cli/src/utils/projectLock.test.ts > "says who it is waiting for after a few seconds, so a queued command does not read as hung".

Not covered

How long the host lets a command wait (waitMs) is set by the host, not here. A holder that hangs still holds the project until it ends; the check hang fixes in the sibling PRs shorten those holds.

Size

Small: one helper and one test.

@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 85816cb1. I found no blocker.

What I verified

  • The fails without the fix: test does what the body says. With projectLock.ts from merge-base 2679bcde, it fails with expected "error" to be called 1 times, but got 0 times. The updated timeout-message assertion also fails. With the fix, all 9 tests in projectLock.test.ts pass. Both runs were local.
  • Loop: the first notice comes 5 s after the command starts waiting, then one every 30 s. The notices go to stderr with the existing [hyperframes] prefix, so --json stdout stays clean. If the holder file is gone, nothing is printed. The Date.now and console.error spies are restored.
  • CI at this head: Format, Lint, Typecheck, Test (cli 1/2) and Test (cli 2/2) are green. Studio and producer jobs were still running when I approved; this diff doesn't touch them.

Nits (non-blocking)

  • When waitMs ≤ 5 s, the first notice can print in the same iteration that then throws the timeout. The user gets a "waiting up to 5s" line immediately followed by the refusal. You could check remaining > 0 before printing.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

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

  • seqrotatenudge-none-px-r0-root-z100: tracking 0.03, pressJump 0, drop 0, reload 3.07, render 0.04, renderKey -, undo false, teleport true / tracking 0.03, pressJump 0, drop 0, reload 0, render 0.08, renderKey -, undo true, teleport true / tracking 0.03, pressJump 0, drop 0, reload 0, render 0.08, renderKey -, undo true, teleport true

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 00ea865 Nov 4, 2026
83 checks passed
@miguel-heygen
miguel-heygen deleted the fix/check-lock-wait-says-who branch November 4, 2026 21:17
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 5, 2026
Ports: heygen-com#7165 (font preflight and system TTC names), heygen-com#7166 (font
shorthand var(), weight-suffixed names, linked font sheets), heygen-com#7168
(render lock and --wait, effect-scan/session watchdog without the heygen-com#7104
retry, font_face_local_only lint), heygen-com#6972, heygen-com#7183 (adapted), heygen-com#7184; docs
heygen-com#7132, heygen-com#7196; prerequisites heygen-com#6665, heygen-com#6697, heygen-com#6716 (cache-dir helper only).
Deferred heygen-com#7182, heygen-com#7176. Package size budgets follow upstream's heygen-com#7168
increments. Watermarks: commit 15b1de4, PR 7189; monitored 92.

Co-authored-by: Miguel Ángel <[email protected]>
Co-authored-by: WaterrrForever <[email protected]>
Co-authored-by: Ular Kimsanov <[email protected]>
Co-authored-by: James Russo <[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