ReqManagedAgents.Provisioner.Store.File (ReqManagedAgents v0.5.0)

Copy Markdown View Source

Persistent JSON-file store: provision handles and tags survive OS-process restarts (CLI tools, mix tasks, cron). One flat JSON object per file; writes are atomic (temp file + rename). Single-writer assumption: this is a workstation/task-runner store, not a concurrent-fleet store. A missing or corrupt file is treated as empty (with a logged warning) — the durable provider resources are recoverable regardless.

Values must be JSON-encodable (provision handles are plain maps; atom keys round-trip as strings, which is fine for handle maps read back via string-keyed access — store consumers in this library only ever compare whole values or read string keys).