paths
paths
¶
Filesystem path resolution for the distillation subsystem.
The keystone of artifact isolation (spec §11): the resolved distillation root
must NEVER be inside the OpenJarvis source tree. resolve_distillation_root
walks up from this module's __file__ looking for a pyproject.toml that
identifies the OpenJarvis source root, then refuses to operate if the resolved
root is inside it. Defense in depth — if a user accidentally points
OPENJARVIS_HOME at the repo, the system fails loudly instead of silently
writing artifacts into the working tree.
Classes¶
ConfigurationError
¶
Bases: RuntimeError
Raised when path configuration would violate isolation guarantees.
Functions¶
resolve_distillation_root
¶
Return the absolute path of the distillation root directory.
The root is $OPENJARVIS_HOME/learning (or ~/.openjarvis/learning
by default). Raises ConfigurationError if the resolved path lies
inside the OpenJarvis source tree, to prevent dev artifacts from leaking
into the repo.
Source code in src/openjarvis/learning/distillation/storage/paths.py
ensure_distillation_dirs
¶
Create the distillation directory layout if missing.
Returns the distillation root. Creates sessions/, benchmarks/,
benchmarks/reference_outputs/, and pending_review/ underneath it,
all with restrictive 0o700 permissions via secure_mkdir.