Dsxir.RuntimeProgram.Store.File (dsxir v0.3.0)

Copy Markdown

File-backed reference implementation of Dsxir.RuntimeProgram.Store.

One file is written per {id, version} under a configured root directory. Writes are atomic: the body is staged to a sibling .tmp.* file and then File.rename!/2-d into place.

Serialization is JSON via Dsxir.RuntimeProgram.to_artifact_blob/1 and from_artifact_blob/1; the file is named <id>_<hex-version>.json. On load, the artifact's predicate sources are re-parsed and the program is re-validated — never trust a serialized AST.

The store performs no concurrency control; file-system semantics (atomic rename, single-writer per path) are the contract.