Commit Graph
1 Commits
Author SHA1 Message Date
Dragan Spiridonov 8f0c410790 fix(daemon): the dispatch queue lives in the user's state dir, not the project
Follow-up to #4515. Queue entries now stay behind the repository-supervisor
gate, but in a single clone the daemon elects itself supervisor at start, so a
`.claude-flow/daemon-queue/*.json` committed in a cloned repository still ran
for a user with AI workers enabled.

- The queue is <state>/daemon-queue/<sha256(realpath.native(project))[:16]>/,
  where <state> is RUFLO_AI_BUDGET_DIR when absolute, else ~/.claude-flow (an
  empty or relative override would resolve inside the project again).
  hooks_worker-dispatch writes there (dir 0700, files 0600); the daemon reads
  only there. A queue directory inside the project is ignored.
- An entry for a worker the user disabled is skipped (.processed/disabled-*).
- Polls do not overlap: an entry moved to .processed/ only after its worker
  finished, so each 5 s poll during a long run started it again.
- No further entry starts once the daemon stops.
2026-10-26 20:01:33 +01:00