paths
paths
¶
Filesystem path resolution for the spec-search subsystem.
The keystone of artifact isolation (spec §11): the resolved spec-search root
must NEVER be inside the OpenJarvis source tree. resolve_spec_search_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_spec_search_root
¶
Return the absolute path of the spec-search 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/spec_search/storage/paths.py
ensure_spec_search_dirs
¶
Create the spec-search directory layout if missing.
Returns the spec-search root. Creates sessions/, benchmarks/,
benchmarks/reference_outputs/, and pending_review/ underneath it,
all with restrictive 0o700 permissions via secure_mkdir.