Repository navigation
Conversation
The per-task `timings` record is documented as the evidence surface for "which boot task froze the app", but it lives in memory: a task that aborts the process outright (V8 OOM, native crash) takes the record with it. The human-readable per-task lines were QA-gated, and the documented HIDOCK_QA_LOGS=1 escape hatch is defeated once the renderer pushes its persisted `false` over qa:set-logs-enabled. Net effect: a startup OOM left the last durable line coming from the PREVIOUS task, which made the next task look innocent and kept an OOM abort unattributed for seven days. Diagnosing it needed a source build. Log one unconditional line per boot task (~8 per boot) so the last "starting" line in any crash log names the task that died.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟢 Approval recommended
The change is minimal and localized to logging, aligns with existing non-QA-gated operational logs in the scheduler, and carries low behavioral risk.
Pull request overview
This PR makes boot-task attribution durable across hard process crashes by logging the start of each boot task unconditionally in the Electron main process boot scheduler, so the last “starting …” line in crash logs identifies the task that died (even when in-memory timing data is lost).
Changes:
- Emit an unconditional
[BootScheduler] starting "<task>"log line immediately before each boot task runs. - Add inline rationale explaining why start logs must not be QA-gated (in-memory timings disappear on abort).
File summaries
| File | Description |
|---|---|
| apps/electron/electron/main/services/boot-scheduler.ts | Adds an unconditional per-task start log to ensure crash logs identify the boot task in progress. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
The boot-task diagnostic and release-era Electron work live in HiDock Next 2.0. Closing this legacy branch PR as the monorepo is being archived. |



Why
getBootTaskTimings()is documented as "the evidence surface for which boot task froze the app", but it is an in-memory array. A boot task that aborts the process (V8 OOM, native crash) takes that record with it, so it proves nothing about the crash it was meant to explain.The human-readable per-task lines were QA-gated, and the documented
HIDOCK_QA_LOGS=1boot escape hatch does not survive in practice:isQaLogsEnabled()prefers the value the renderer pushes overqa:set-logs-enabled, so the renderer's persistedfalsecloses the gate before the drain starts.Consequence, measured: a startup OOM on this machine left
[IntegrityService] Startup checks completeas the last durable line. That is the task before the failure, which framed the wrong task and left the abort unattributed for seven days. Identifying the real culprit required building from source and instrumenting the drain.What
One unconditional
console.logper boot task (~8 per boot) at task start. The laststarting "..."line in any crash log now names the task that died.Deliberately not QA-gated: a log that is off by default cannot explain a crash that already happened.
Testing
vitest run boot-scheduler.test.ts boot-tasks.test.ts— 21 passed. No test asserted the previous QA-gated string.Verified against the real failure: with this line in place, a source build attributed the full drain (
starting "database-backup"→ … →Complete (8 tasks, 7328ms)).Note
This does not fix the OOM itself. That was a stale install: the packaged
app.asar(2026-07-19) predates the batched vector-store load, so it ranSELECT * FROM vector_embeddingsunbatched over 232,960 rows (~2.37 GB of blobs). Bothmainand this branch already contain the batched fix — that install just needs rebuilding.