No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
JMARyA 220c98f538
All checks were successful
moira/threads moira/threads — definitions compiled
moira/flake/env.path.4f9ec3cfea93dd93@x86_64-linux env.path.4f9ec3cfea93dd93 — built
moira/publish moira/publish — succeeded
Hold a directory to one snapshot: ore deposit
A deposit lays a fixed snapshot out at a path and keeps it there. The
snapshot is the truth and the directory its copy; anything that differs
is drift, which a survey reports and the deposit's policy undoes:
keep (snapshot the drift onto deposits/<name>, then restore; the
default, so nothing is ever lost), restore, or alert.

- A deposit's snapshot is named by a ref in a new per-state namespace,
  refs/states/<uuid>/deposits/<name>, so gc roots it like a branch and
  its reflog makes a move undoable. The namespace is in both gc's mark
  and reflog expiry; both are mutation-proven.
- A bare branch is refused: a deposit holds fixed bytes. Tags, ids and
  branch^0 are accepted.
- Fast surveys trust size + mtime (deposits are written with the
  snapshot's mtimes) and compare bytes only where those moved; --deep
  reads everything and catches bit rot.
- Repairs are per-file atomic (stage + rename). Foreign content is
  refused unless --adopt, which keeps it first. Paths overlapping the
  node are refused.
- CLI: ore deposit add|list|check|tend|restore|move|remove.
- NixOS: services.ore.deposits.<name> — a fail-closed boot unit that
  still comes up offline when the bytes are local, plus fast and deep
  survey timers. nix/tests/deposit.nix covers every policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 00:35:03 +02:00
.moira/envs feat(nix): add moira publish pipeline for the ore container image 2026-07-01 19:27:48 +02:00
.pi Add repository backend foundation and locks 2026-09-06 15:19:51 +02:00
crates Hold a directory to one snapshot: ore deposit 2026-10-12 00:35:03 +02:00
docs Hold a directory to one snapshot: ore deposit 2026-10-12 00:35:03 +02:00
nix Hold a directory to one snapshot: ore deposit 2026-10-12 00:35:03 +02:00
openspec Validate thin backend foundation 2026-09-06 16:29:23 +02:00
todo Backfill whole placement groups at once, and forget answered gc proposals 2026-10-11 07:46:11 +02:00
.envrc WIP: init 2026-06-30 00:41:59 +02:00
.gitignore Add read-only tokens, and un-red the NixOS gate 2026-09-12 00:40:01 +02:00
Cargo.lock Stop the pack read path scaling with the repository 2026-10-09 12:14:40 +02:00
Cargo.toml Sign squad membership, and stop a killed daemon locking a state for an hour 2026-10-11 04:34:21 +02:00
flake.lock feat(nix): add moira publish pipeline for the ore container image 2026-07-01 19:27:48 +02:00
flake.nix Bring the web console back as a client, not a face 2026-10-08 12:58:13 +02:00
README.md Bring the web console back as a client, not a face 2026-10-08 12:58:13 +02:00
shell.nix Move shell definition under nix 2026-07-12 04:12:16 +02:00

Ore

Ore is a prototype state system: persistent data is stored as versioned,
content-addressed state, and backups, archives, sync, materialization, and future
filesystem views all sit on that one model.

Node  -> State -> Branch -> Snapshot -> Tree -> Entry

The important rule is:

data       = immutable, content-addressed objects
references = mutable, named branch/tag pointers

A .ore/ directory is a node: a sovereign machine identity plus one opaque
object store. A node can hold many states. A state owns no directory; you
snapshot a directory into a state and materialize or checkout a state back
out to a directory.

Where to start

Crates

  • ore-core — Node façade over store, state, refs, fs, sync, and crypto.
  • ore-cli — the ore command.
  • ore-daemon — ored, the HTTP API / sync / metrics process.
  • ore-webui — ore-web, a server-rendered console; a client of ored, not part of it.
  • ore-store — opaque content-addressed store, loose objects, packs, indexes.
  • ore-state — snapshots, refs, history walking, diff/merge glue, fsck.
  • ore-object — canonical object model and serialization.
  • ore-fs — directory ingest and materialization.
  • ore-chunk — content-defined chunking.
  • ore-crypto — per-state encryption and key wrapping.
  • ore-diff, ore-merge — pluggable content diff/merge drivers.
  • ore-id, ore-encoding — content IDs and wire primitives.

Quick sketch

cargo build

ore init                      # make ./.ore — a node, holding no states yet
ore state create notes        # a state owns no directory

mkdir data
echo hello > data/note.txt
ore snapshot notes --from data -m first

echo world >> data/note.txt
ore snapshot notes --from data -m second

ore log notes                 # two snapshots on `main`
ore diff notes main~1 main    # what the second one changed

ore ls notes                              # read the state in place
ore cat notes note.txt --ref main~1       # ...at any point in its history

ore restore notes main~1 old  # project the first one back out
ore node fsck                 # rehash every object