stablyai / stablyai/orca

[Bug]: orcad build's @parcel/watcher smoke gate fails good builds roughly 1 run in 3

Open
#17,845 1 comment 0 reactions 1 assignee Claimed by @nwparker View on GitHub
Dominant language
TypeScript
Stars
71.3k
Forks
4.7k
Avg merge
17h 8m
Merged PRs (30d)
475

Description

**Operating system:** Linux (Synology DSM)
**Orca version:** built from `main` at `94e758666` — between v1.4.191 and v1.4.192

---

`smokeLoadWatcherChild` in `config/scripts/build-orcad.mjs` fails good builds about
one run in three on real hardware, more often the slower the machine.

The gate resolves on the forked child's `exit` event and treats a non-zero code as
a load failure. But the parent disconnects the IPC channel the instant the child
acks `subscribe-started`. A child that writes once more then takes EPIPE on an
unhandled `'error'` event and exits non-zero — read as "@parcel/watcher failed to
load". Nothing is wrong with the build; the verdict was already in.

**Repro:**

1. Run the orcad build on a slow machine (consistent on a Synology NAS, rare on
fast hardware).
2. Roughly 1 run in 3 fails at the watcher smoke step.
3. Re-run with no changes — it passes.

**The ack is the real verdict:** it is emitted once the child's module graph has
resolved under plain Node, which is all this gate claims to prove. It runs
deliberately before the native module is touched, so a build machine with no
compiled `@parcel/watcher` still passes. Past the ack the child's fate is not
evidence. An exit *before* the ack is still a genuine failure.

A gate that fails good builds at this rate is worse than none — it teaches
everyone to re-run, and then it cannot catch the real failure either.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.