daemon: resource-gated scheduling, fact-mine integration, systemd

Daemon improvements:
- Use jobkit's new .resource(&pool) API instead of pool.acquire()
  inside closures — tasks wait in the pool's queue, not on worker
  threads
- LLM pool capacity 1 to control token burn rate
- Workers reduced from 7 to 4 (2 loops + 2 for jobs)
- Session watcher: per-tick stats logging (stale/mined/open/queued)
- Log rotation: truncate to last half when over 1MB
- Duration tracking and stderr capture for job failures
- Process uptime shown in status display
- Replace fuser subprocess with /proc/*/fd/ scan

Fact-mine integration:
- mine_and_store() writes extracted facts to store nodes
- fact-mine-store CLI subcommand for daemon to shell out to
- Chained as dependent task after experience-mine per session

Infra:
- systemd user service at ~/.config/systemd/user/poc-memory.service
- .cargo/config.toml: force frame pointers for profiling
This commit is contained in:
ProofOfConcept 2026-03-05 15:31:08 -05:00
parent 552d255dc3
commit 37e0ce96ea
4 changed files with 656 additions and 125 deletions

2
.cargo/config.toml Normal file
View file

@ -0,0 +1,2 @@
[build]
rustflags = ["-Cforce-frame-pointers=yes"]