Repository navigation
fix(cli): a locked Chrome debug.log on Windows no longer fails check, snapshot or render - #6771
Merged
Merged
Conversation
… snapshot or render
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 118 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (4)
|
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 1 nit · head cc92a087
- nit: the body says
hyperframes browser clearis unchanged, butclearBrowser(manager.ts:950) goes throughremoveInstallLeftovers, so it now swallowsEBUSY/EPERMtoo. When the only thing left is a held.chrome-replaced-*folder,browser clearprints "Removed cached browser" and the folder is still there (before this change it threw). Worth a body fix, or keepingclearBrowserstrict.
Checked
- Ran
manager.test.tsat head: 72 passed. With theEBUSY/EPERMtolerance inremoveLeftoverreplaced by a rethrow, the new test fails withpromise rejected "Error: EBUSY…" instead of resolving, so the fails-without-the-fix claim holds. The second forcedensureBrowsercovers the set-aside path inmoveStagedInstallIntoCache, and the sweep coversremoveInstallLeftovers. renderreaches the same sweep throughcommands/render/execute.ts:201. Staging cleanup is still a barermSync, which is fine because a staged browser never runs.- oxlint/oxfmt are clean. CI is green on this head, including the Windows render and test lanes.
- Not covered: real Windows behaviour (the body says the same).
miguel-heygen
enabled auto-merge
October 30, 2026 01:26
This was referenced Oct 30, 2026
SanHsien
added a commit
to SanHsien/hyperframes
that referenced
this pull request
Nov 2, 2026
…com#6605 heygen-com#6611 heygen-com#6831 heygen-com#6800 Windows debug.log lock, PowerShell UTF-16 batch JSON, long backup names, --variables-file readFile override, Figma motion key collisions. Rest deferred with per-commit evidence; 72 PRs pinned in monitored. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: SanHsien <34234698+SanHsien@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
check,snapshotandrenderno longer fail on Windows withEBUSY: resource busy or locked, unlink '.../chrome-headless-shell-win64/debug.log'when a Chrome from the managed install is still running.Why
Every cleanup of a set-aside or killed-install browser folder in
browser/manager.tswas a bare recursivermSync. A running chrome-headless-shell keepsdebug.logopen and Windows refuses to unlink it, so the removal threw and the command died before it did any work. The failed removal left the folder behind, so the next command tried again and failed again.Related work
#5698 and #6506 retry other locked files on Windows (ffmpeg executables, undo/redo); neither touches the browser cache.
How
One helper,
removeLeftover, now does both removals that run during normal commands: the sweep of killed-install folders (before every download, and before a render) and the removal of the folder an upgrade sets aside. It retries a few times, then leaves a folder that Windows still holds (EBUSY/EPERM) for the next sweep. Any other error still throws.hyperframes browser clearuses the same sweep, so it also leaves a folder Windows still holds instead of throwing.rendershares the path: it calls the same sweep (sweepKilledInstalls) andensureBrowserascheckandsnapshot.Test plan
fails without the fix: with the
EBUSY/EPERMtolerance removed,does not fail a run when Windows holds a leftover's debug.logfails withpromise rejected "Error: EBUSY: resource busy or locked, un…" instead of resolving.What I measured
manager.test.ts: 72 passed on three runs on Linux; oxfmt and oxlint clean. The test makes the removal of a set-aside folder throwEBUSYand checks the sweep, a forced download and a forced re-download all resolve and the folder stays.What I did NOT execute
A real Windows machine with a running Chrome. The cause is reasoned from the reported error and the code, not reproduced on Windows.