Skip to content

Parcel file watcher passes root paths to isPathIgnored, causing recurring batch errors #2316

Open

Description

@matthiasautrata

Summary

A vault created by the desktop app logs TypeError: path must not be empty from the file-watcher every ~4 seconds, starting 4 seconds after the project server starts and continuing unbroken. It is non-fatal — the watcher recovers each cycle — but it is level: 50 (error) and grows unbounded, so a brand-new vault's log is nothing but errors.

Environment

  • OpenKnowledge 0.88.2 (stable channel), desktop app bundle at /Applications/OpenKnowledge.app
  • macOS 27.0.1, arm64 (M4 Mac mini)
  • Vault created through the desktop UI, scaffold only — 0 admitted documents (open-knowledge preview → Found 0 markdown files in ./)
  • Server: app-spawned, .ok/local/server.lock reports kind: "interactive", capabilities: ["http","ws","ui"], runtimeVersion: "0.88.2", channel: "stable"

Steps to reproduce

  1. Create a new vault in the desktop app (empty — no starter pack seeded).
  2. The project server starts (open-knowledge-server, interactive kind).
  3. tail -f <vault>/.ok/local/logs/server-current.jsonl

Actual behavior

207 events in 15 minutes (15:50:46 → 16:05:46 local, one per 4.4 s), the first 4 s after server start:

{"level":50,"time":1792871446697,"pid":45292,"hostname":"minimac.local","name":"file-watcher","msg":"parcel batch error"}
err.type:    TypeError
err.message: path must not be empty
err.stack:
  TypeError: path must not be empty
    at w (file:///Applications/OpenKnowledge.app/Contents/Resources/app.asar.unpacked/node_modules/@inkeep/open-knowledge/dist/dist-9KnnG8oW.mjs:125:22094)
    at T (.../dist-9KnnG8oW.mjs:125:22220)
    at D._test (.../dist-9KnnG8oW.mjs:125:23136)
    at D.ignores (.../dist-9KnnG8oW.mjs:125:23395)
    at x (.../dist-9KnnG8oW.mjs:891:33124)
    at Object.isPathIgnored (.../dist-9KnnG8oW.mjs:891:34638)
    at hZ (.../dist-9KnnG8oW.mjs:1056:56261)

The cycle repeats exactly: parcel batch error → parcel watcher recovery finished → freshness re-check pass finished → parcel batch error. Across the 207 events, the next non-error line was parcel watcher recovery finished in 117 cases.

Expected behavior

No error, or at most one per genuine condition. An empty path should not reach the ignore matcher / isPathIgnored; if it can, a guard there would keep the watcher quiet.

What I ruled out

Both controls on the same 0.88.2 CLI binary taken from the app bundle, with ok start --only server --no-open-browser:

Control Documents path must not be empty events
Empty project (scaffold only) 0 0 (file-watcher ran; 15 file-watcher log lines)
Test project with content 3 0

So the empty corpus alone does not trigger it, and it did not reproduce through the CLI-started server at all — it appears specific to the app-spawned interactive server.

No .okignore or config edits preceded the first event; it fires on a freshly created, untouched vault.

Unconfirmed hypotheses

  • The vault lives under ~/Documents, a TCC-protected location on macOS. If the watcher resolves a path it cannot fully qualify, an empty string could reach the ignore matcher.
  • Or the empty corpus is the trigger only in the app runtime (UI/ws bridge present), which the CLI controls above would not exercise.

Impact

Log spam rather than breakage: search, audit, links and the MCP tools all work correctly against this vault. But at one event per 4.4 s that is ~19,800 error-level lines per day, and it means the first thing a new vault's diagnostics contain is a repeating TypeError.

Happy to run further instrumentation, or test a build with a guard on the empty path.

Activity

  1. changed the title [-]file-watcher logs `TypeError: path must not be empty` every ~4s on an app-created vault (0.88.2, macOS arm64)[/-] [+]Parcel file watcher passes root paths to isPathIgnored, causing recurring batch errors[/+] on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions