Skip to content

fs: watch-only paths stall when an FSEvent is lost (a followed transcript up to 30 s; lane A's bridge directory with no fallback) #891

Done

Description

@SSFSKIM

What's wrong

An open conversation learns of new transcript lines from the projects/ file watch. When one of those FSEvents is late or lost, nothing else notices the change until the store service's reconcile pokes its follows. That happens every RECONCILE_MS = 30 s (src/engine-host/fs/service.ts:55, :273). The watcher's own slow pass is longer still: STORE_RECONCILE_MS = 10 min (watcher.ts:43).

So on a Mac whose fseventsd drops events, a conversation the person is reading can stall for up to 30 s.

Evidence

On 2026-11-28 the owner's mini lost 5 of 40 events, with a median delay of 846 ms (CI-opt's probe; see #889). In e2e/lane-a.spec.ts:653 ("the reply streams as it is written, then its row replaces it"), the appended row wasn't drawn within 10 s at :667.

That happened in run 2 of #889's proof, at 112aea5 (run 112aea5918b2-20261128T035516Z). The holder wait in the same scene passed, and the scene is in CI-opt's 11-28 mini-only family (:654 on #815).

The work

Notice a lost append on a followed transcript in seconds, not 30 s. For example, give only the transcripts a window follows a cheap stat check (size, mtime) at about 2 s, as #889 did for sessions/. Leave the unfollowed tree on the slow pass.

Add a unit test that drops the watch event for a followed transcript and shows the append is still read within the bound.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P2
    on Nov 28, 2026
  2. changed the title [-]fs: a followed transcript's lost FSEvent stalls the open conversation up to 30 s (reconcile poke)[/-] [+]fs: watch-only paths stall when an FSEvent is lost (a followed transcript up to 30 s; lane A's bridge directory with no fallback)[/+] on Nov 28, 2026
  3. SSFSKIM commented on Nov 28, 2026

    @SSFSKIM
    OwnerAuthor

    A second path, from #889's third proof run (hd-lane-a-3, 112aea5, run 112aea5-20261128T040734Z): e2e/lane-a.spec.ts:888 failed at :936, 'its bridge back' not seen in 15 s. Lane A's bridge directory (src/services/lane-a/discovery.ts watchBridgeDir) polls only while the directory is missing or its watch errors. Once the watch is armed, a bridge that comes back is noticed only through its fs.watch event, so a lost FSEvent leaves it unseen with no fallback at all. Scope of this ticket: every MAWS path that learns of a file only through a watch gets a cheap stat or listing fallback of a few seconds, scoped to what a window is looking at. Today that is followed transcripts and the bridge directory; #889 did sessions/.

  4. SSFSKIM commented on Nov 28, 2026

    @SSFSKIM
    OwnerAuthor

    A fourth path, from #890's e2e:default on the mini (run 46160350228): accounts.spec.ts:127, the usage ring. ClaudeUsage's accounts.json is read through a non-recursive directory watch with a 60 s re-read floor (src/main/usage/claude-usage-reader.ts:8, :78), so a lost FSEvent delays a rewritten account by up to 60 s. It went red, green, red on the mini, and the branch touches no usage code.

  5. added a commit that references this issue on Nov 29, 2026
  6. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 29, 2026
  7. SSFSKIM commented on Nov 29, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: master-landing-architect dispatches a builder (as #889)

  8. removed
    status:in-progress
    on Nov 29, 2026
  9. SSFSKIM commented on Nov 29, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: landed on master faff6ae (class 1a 46222532035; mini proof: lane-a and default green under event loss; G4 is #908's)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions