Skip to main content

Module prepare

Module prepare 

Source
Expand description

A run’s worktree gets its dependency folders ([worktree]).

A worktree holds only what is committed, and dependency folders never are (node_modules/, .venv/): a check that needs them cannot start there. Before the baseline each Node or uv root of the project gets its folder by the toolchain’s own locked, offline install, sandboxed — once per lockfile: a record beside the worktree keeps the lockfile’s digest, and an attempt that changes the lockfile is installed again before its checks. Nothing is removed or installed at a folder outside the worktree or reached through a symlink.

Structs§

Config
[worktree] in speccoder.toml.
Entry
One root as prepared.
Failure
Why preparing stopped the task.
Prepare
What preparing needs.
Prepared
What preparing did.
Record
What a worktree was prepared with.
Root
A directory of the project with a committed lockfile beside its manifest.

Enums§

Toolchain
A toolchain whose project needs a dependency folder in the tree its checks run in.

Functions§

forget
Forgets what a worktree was prepared with (its folders stay, the worktree’s own): the next prepare installs again.
load
The worktree’s record (none: nothing prepared yet).
missing_lockfile
A manifest at the project’s root that needs a lockfile none is committed for: (what is missing, the command that writes it).
needed
Whether the project has anything to prepare: a root, or a manifest whose lockfile is missing.
parse
Reads [worktree].
prepare
Prepares the worktree: each root’s folder installed, unless the record shows it installed for the same lockfile and still there. None: the project has no root that needs it (Go, Rust).
recheck
After an attempt, before its checks: a root whose lockfile the attempt changed is installed again for it, so the checks and the tick are about the lockfile committed. The run log’s lines; none when nothing changed.
record_path
Where a worktree’s record is kept: beside it (<name>.prepare.json), never inside it, where git would see it.
roots
The project’s toolchain roots: each committed lockfile beside its manifest (one per directory), never inside a dependency folder. Go and Rust have none: their caches are shared already.
sha256_file
sha256 of a file, hex; None when it cannot be read.