pub struct Layout {
pub primary: PathBuf,
pub scratch: PathBuf,
pub wt_root: PathBuf,
}Expand description
The directories of one repository’s vitrify state.
Fields§
§primary: PathBufThe primary checkout.
scratch: PathBuf<primary>/.vitrify — transactions, logs, run.json.
wt_root: PathBufRoot of the unit worktrees and the integration checkouts.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn resolve(
primary: &Path,
home: Option<&Path>,
worktree_dir: &str,
) -> Result<Layout, CoreError>
pub fn resolve( primary: &Path, home: Option<&Path>, worktree_dir: &str, ) -> Result<Layout, CoreError>
The layout for primary. worktree_dir is run.worktree_dir: empty
puts the worktrees under the vitrify home (home), keyed by the
repository; a relative path is taken from the repository root.
Sourcepub fn at(primary: &Path, wt_root: &Path) -> Layout
pub fn at(primary: &Path, wt_root: &Path) -> Layout
An explicit layout (tests, and callers that already know the root).
Sourcepub fn mainline(&self, slug: &str) -> PathBuf
pub fn mainline(&self, slug: &str) -> PathBuf
The integration checkout of the SDD slug: a detached worktree of
the mainline head, where its gates and §5 commands run.
Sourcepub fn mainline_lock(&self, slug: &str) -> PathBuf
pub fn mainline_lock(&self, slug: &str) -> PathBuf
The lock on that checkout: runs of one SDD gate one at a time,
across processes; runs of different SDDs gate side by side. (A slug
never ends in .lock, so no checkout is ever named like a lock.)
Sourcepub fn base_checkout(&self, slug: &str) -> PathBuf
pub fn base_checkout(&self, slug: &str) -> PathBuf
The checkout where the lane of the SDD slug runs a gate’s failing
rows again on the gate’s base, apart from its integration checkout.
Sourcepub fn head_checkout(&self, slug: &str) -> PathBuf
pub fn head_checkout(&self, slug: &str) -> PathBuf
This process’s detached checkout of the mainline head for the SDD
slug, where the run reads spec state.
Sourcepub fn job_logs(&self, job: &str) -> PathBuf
pub fn job_logs(&self, job: &str) -> PathBuf
.vitrify/logs/<job>/: the job’s own records — its run.json,
project.json, events.jsonl and final report.
Sourcepub fn lane_logs(&self, job: &str, slug: &str) -> PathBuf
pub fn lane_logs(&self, job: &str, slug: &str) -> PathBuf
.vitrify/logs/<job>/<slug>/: one lane’s records — its worker logs
and prompts, its gate board, its escalations.
Sourcepub fn in_tree(&self) -> Option<PathBuf>
pub fn in_tree(&self) -> Option<PathBuf>
The worktree root relative to the primary checkout, when it lies inside it.
Sourcepub fn ensure_scratch(&self) -> Result<(), CoreError>
pub fn ensure_scratch(&self) -> Result<(), CoreError>
Create .vitrify/ with the ignore file that keeps it out of the
repository. Nothing is built under it, so the * hides nothing a
tool needs to see.
Sourcepub fn ensure_worktree_root(&self, primary: &Git) -> Result<(), CoreError>
pub fn ensure_worktree_root(&self, primary: &Git) -> Result<(), CoreError>
Create the worktree root. A root inside the working tree is added to
.git/info/exclude, and refused when one of the repository’s own
ignore files already covers it — the case in which ignore-aware
tools check nothing there.