JAB-032: fsw drops the wd, swallows queue overflow

Now
OPEN
Sev
HIGH
Ask
gritzko
Env
Linux (inotify); kqueue path untested

FSWDir throws away inotify_add_watch's return and FSWDrain never reports ev->wd, so every event reaches JS as {wd: 0, name} and the watcher fd is the only dir identity left — JAB-031 shipped one wfd + one pol handler + one drain Buf PER DIR, which its own Goals said it would not do. FSWDrain also skips every ev->len == 0 record, and that is exactly IN_Q_OVERFLOW: a burst past max_queued_events drops events silently, so a consumer cannot tell "nothing changed" from "I lost your changes". Both block the per-repo cache, BRO-043.

Input

Context

The consumer is the per-repo cache in the long-lived pager/watcher process: a bucket per repo dir (jab/dog/abc, jab/dog, jab), dropped with its ancestors on any event under it.

Goals

One watcher fd for many dirs, every event attributable to the dir it fell in, and a loud signal when the kernel dropped events.

Constraints

Two repos: dog/abc/FSW.{c,h,md} + dog/abc/INDEX.md in dog, the binding and docs in jab. Every native op keeps its call() (JAB-008).

WIP

Design decisions

TODOs

Blockers and bummers

Outcome

Implemented in wt //JAB-032 (base ///jab/#2980a754), NOT staged and NOT committed — awaiting inspection.