Skip to content

watcher retries a deleted JSONL forever; and two watcher log paths exist (one abandoned since May)  #732

Description

@EtanHey

Two findings from a live investigation on 2026-08-20, both about trusting the wrong source.

1. Watcher loops on a vanished file

The live watcher log repeats, indefinitely:

BRAINLAYER_ALARM watcher_file_ingestion_failed: watcher deferred a JSONL file because bytes could not be safely parsed
error: [Errno 2] No such file or directory: '.../395a1775-db97-47a8-b3b1-94a82e7252c0.jsonl'
error_type: FileNotFoundError  read_offset: 6646525  observed_at: 2026-08-19T01:00:09Z

A FileNotFoundError is not a parse failure and is not transient — the file is gone. The watcher should confirm the deletion (inode/offset check), record the partial ingest as terminal for that source, and stop re-alarming. Today it re-emits the same alarm indefinitely, which trains everyone to ignore watcher alarms.

2. Two watcher log paths — one is a decoy

  • LIVE (launchd StandardOutPath/StandardErrorPath): ~/Library/Logs/brainlayer/watch.{out,err}.log
  • STALE: ~/.local/share/brainlayer/logs/watch.{log,err}last written May 18, still on disk, 5.3MB, ending in a burst of database is locked warnings from an old build (the string Queue/write failed no longer exists in source).

An agent (me) tailed the stale path today and reported a 6,420-warning "chronic lock storm" that had not occurred in three months. AGENTS.md documents the ~/.local/share/brainlayer/logs/ path, which is what led there. Fix: delete or archive the abandoned files, make AGENTS.md name the launchd paths as the live ones, and ideally have the watcher refuse to start if the documented log path is not the one it writes to.

Related: Wave 4.5 self-verification (#713) — "log a human/agent will read is the live one" is exactly the class of assertion it should carry.

🤖 Generated with Claude Code

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions