Files
CatoandClaude Opus 5.5 120c057cbe fix(calendar): read linked calendars in a time-limited worker, and turn them back on (#1770)
* fix(calendar): read linked calendars in a worker with a time limit, and turn them back on

ical.js has inner loops with no guard; a stuck parse held the app's only
thread four times on 14 Nov (each stop needed a SIGKILL). The reader now
runs in workers/calendar-reader.cjs, started per read and terminated after
4 s (and capped at 128 MB), so it can never hold the request thread. The
standalone build carries the worker (outputFileTracingIncludes) and ical.js
(serverExternalPackages). Ends the pause from #1769.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmwF5V6xdaNTSbg9ouh

* fix(calendar): start the reader worker from an opaque bootstrap so Turbopack does not bundle the project

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmwF5V6xdaNTSbg9ouh

* fix(calendar): the reader worker finds ical.js in the standalone build

Built SELF_HOST=1 locally and ran the worker from a copy of the standalone
tree outside the repo: a bare require('ical.js') fails there (Next ships it
as .next/node_modules/ical.js-<hash> and in the pnpm store, with no plain
node_modules/ical.js). The worker now looks in those places, and unwraps the
ES module default when loaded by directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmwF5V6xdaNTSbg9ouh

* test(calendar): the stuck-reader fixture lives in a private temp folder (CodeQL)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmwF5V6xdaNTSbg9ouh

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-14 23:39:31 +01:00
..