Skip to main content

Module home

Module home 

Source
Expand description

~/.vitrify materialization and disk-wins resolution.

Only vitrify init stands the home up: it writes config.toml and materializes the content. Every other command first checks that it is set up — config.toml is there — and otherwise refuses, naming vitrify init (require_set_up); the dispatch does it for all of them, and the seams that write into the home check again.

The single resolution seam: brief, new, schema, and the escalation template all resolve assets through here. A file on disk overrides the embedded copy; a deleted file is restored on the next run; an unmodified default follows the binary — it refreshes whenever the embedded copy differs, an upgrade or a rebuild of the same version — and overrides are left in place (vitrify init and vitrify probe report them).

Structs§

AssetState
One asset’s home state, for vitrify init and vitrify probe to report.

Enums§

Origin

Functions§

config_path
~/.vitrify/config.toml: the machine’s configuration, and the mark of a home vitrify init has set up.
ensure_materialized
Ensure ~/.vitrify/ is materialized per the staleness rules; returns the per-asset state for init and probe to report. Idempotent; reached by every content consumer through resolve, which refuses a home that is not set up, and by vitrify init, which sets it up.
not_set_up
The refusal every command that needs the home gives when it is not set up: exit 4, naming the one command that sets it up.
require_set_up
Refuse unless vitrify init has set the home up. Every command but init passes through it, so none but init ever creates the home.
resolve
Resolve one asset disk-first: the ~/.vitrify copy wins over the embedded copy. Refuses a home vitrify init has not set up; in one it has, materializes on every call (delete-restores).