Files
hyperframes/packages
miga-heygenandClaude Opus 4.6 da09428af1 fix(producer): degrade gracefully when font cache directory is unwritable (#3572)
* fix(producer): degrade gracefully when font cache directory is unwritable

When the font cache root (~/.cache/hyperframes/fonts/) cannot be created
(EPERM on read-only filesystems, restricted home directories, etc.), the
render aborts with a raw mkdir error. The cache is an optimization, not
a requirement — a missing cache should mean slower first renders, not
broken renders.

Fall back to a temporary directory under os.tmpdir() when the configured
cache root fails, so Google Fonts downloads still proceed. The fallback
cache is per-process and not persistent across renders, but the render
completes.

Fixes #3412.

* fix: use mkdtempSync for font cache fallback, restore warning

Rames Jusso's review caught a regression in the force-push: the
predictable tmpdir path is unsafe (symlink attacks in world-writable
dirs), and the warning log was dropped. Restore the mkdtempSync
pattern matching lambdaFontCacheRoot, add a CLI hint per Miguel's
request, and reuse the ephemeral root across calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: emit font cache fallback warning once per run, not per font

Gate the warning on whether this is the first fallback activation.
The ??= already suppresses repeat mkdtempSync, but the warn fired
for every font family in the composition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-09-03 04:00:37 +00:00
..
2026-09-02 10:36:01 -04:00
2026-09-02 10:36:01 -04:00
2026-09-02 10:36:01 -04:00
2026-09-02 10:36:01 -04:00
2026-09-02 10:36:01 -04:00
2026-09-02 10:36:01 -04:00
2026-09-02 10:36:01 -04:00
2026-09-02 10:36:01 -04:00