Repository navigation
fix(cli): a low-disk render refusal names the extracted-frame cache and clean - #7695
Open
wonjangcloud9 wants to merge 1 commit into
Open
wonjangcloud9 wants to merge 1 commit into
wonjangcloud9 wants to merge 1 commit into
Conversation
…nd clean A render on a Mac with 0.9 GB free under $TMPDIR stopped with "Low disk space ... Renders produce large temp files. Free disk space before rendering." The biggest HyperFrames item on that volume was its own extracted-frame cache (2.1 GB, entries from earlier days), which `hyperframes clean` removes, but nothing in the message said so. When a volume the render needs is under the 1 GB floor and the extracted-frame cache (HYPERFRAMES_EXTRACT_CACHE_DIR or the tmpdir default) is on that same volume, the hint now adds the cache's size and path and that `npx hyperframes clean` removes what no render used in the last hour. No cache, an empty one, or one on another volume leaves the message as it was. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This branch has not been deployed
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
When
hyperframes renderrefuses to start because a volume it needs has under 1 GB free, and HyperFrames' own extracted-frame cache sits on that volume, the message now says how big the cache is, where it is, and thatnpx hyperframes cleanremoves it:With no cache, an empty one, or a cache on a different volume (
HYPERFRAMES_EXTRACT_CACHE_DIR/--frames-cache-direlsewhere), the message is unchanged.Why
On a Mac the render stopped with
✗ Low disk space 0.9 GB free at /var/folders/…/T — Renders produce large temp files.The largest HyperFrames item in that folder washyperframes-extract-cache-501at 2.1 GB, with entries from earlier days. That is working as designed: the extractor's LRU sweep holds the cache atextractCacheMaxBytes(2 GiB default,HYPERFRAMES_EXTRACT_CACHE_MAX_MB), andhyperframes clean(#4701) empties it. But a 2 GiB cap is most of what is left on a nearly full disk, and neither the refusal nor its hint mentioned the cache orclean, so the user had to find it by hand.doctor's Frames cache row does flag low space at the cache location, but only suggests relocating it.Related work
hyperframes clean, which sweeps the extract cache withgcExtractionCache(…, { maxBytes: 0 }).doctorand added--frames-cache-dir.--workers 1); this is the pre-render refusal inrender/execute.ts, a different message.How
packages/cli/src/commands/render/execute.ts,refuseLowDiskBeforeBrowserDownload: it keeps the path of each failingcheckDiskoutcome. For each,extractCacheHint(path)resolves the cache dir the render will use (resolveExtractCacheDir(), afterapplyRenderEnvironment, so--frames-cache-dircounts), checks it exists and is on the same device as the full path (statSync().dev), and sizes it with the engine'sdirectorySizeBytes. The size is only computed on the refusal path, never on a normal render.The hint says "what no render used in the last hour" because
cleankeeps entries younger thanEXTRACT_CACHE_MIN_AGE_MS(1 h).docs/packages/cli.mdx(cleansection): one line saying the low-disk refusal now points here.Test plan
packages/cli/src/commands/render/execute.test.ts, "a render on a nearly full disk": withgetFreeDiskMbat 400 MB andHYPERFRAMES_EXTRACT_CACHE_DIRpointing at a 3 MB cache, the refusal containsThe extracted-frame cache holds 3.0 MB at <dir>andnpx hyperframes clean; with no cache dir it contains neither. On main'sexecute.tsthe cached case fails (expected false to be true); with the fix the file's 16 tests pass.Real CLI, with
TMPDIRon a 1.2 GB APFS disk image holding 650 MB of real extract-cache entries dated two days back (touch -t):Gates: oxlint / oxfmt clean,
fallow audit --base origin/mainno issues, comment ratchet at or under share, lefthook pre-commit (format, fallow, typecheck, cli-process-ownership) passed.Not covered
doctor's disk row and Frames cache row are unchanged.