pub enum MifRhError {
Show 57 variants
FindingIo {
path: String,
source: Error,
},
FindingJson {
path: String,
source: Error,
},
Io {
path: String,
source: Error,
},
Json {
path: String,
source: Error,
},
JsonSerialize {
path: String,
source: Error,
},
OntologyPackYaml {
path: String,
source: Error,
},
FrontmatterYamlSerialize {
source: Error,
},
CatalogMissing {
path: String,
},
ConfigMissing {
path: String,
},
DirectBindingInvalid {
topic: String,
id: String,
},
Ontology(OntologyError),
Frontmatter(FrontmatterError),
SchemaCompilation {
path: String,
detail: String,
},
RefSchemaMissingId {
path: String,
},
SchemaValidationFailed {
path: String,
schema_path: String,
detail: String,
},
InvalidToggleValue {
field: String,
value: String,
allowed: String,
},
EmptySourceContent,
PackNotDeclared {
name: String,
path: String,
},
NoFindingsFound {
path: String,
},
NoSurvivingFindings {
path: String,
},
ArtifactNotPublishable {
path: String,
},
MissingProvenance {
count: usize,
paths: Vec<String>,
},
ReconcileEnvironmentBroken {
sample_path: String,
},
TopicNotRegistered {
topic: String,
config_path: String,
},
InvalidConcordance {
path: String,
},
OntologyMapUnusable {
path: String,
topic: String,
reason: String,
},
RelationshipTargetFindingUnparseable {
path: String,
},
SubtypeOfCycle {
entity_type: String,
},
EntityTypeSchemaInvalid {
entity_type: String,
detail: String,
},
Index {
source: Error,
},
LockIo {
path: String,
source: Error,
},
LockHeld {
holder_pid: u32,
},
QueueTopicMismatch {
path: String,
expected: String,
found: String,
},
Embed(EmbedError),
RegistryFetch {
registry_source: String,
detail: String,
},
RegistryIndexInvalid {
registry_source: String,
detail: String,
},
OntologyNotInRegistry {
id: String,
},
LockSourceMismatch {
lock_source: String,
requested_source: String,
},
OntologyPackNotUtf8 {
id: String,
file: String,
},
IndexPinMismatch {
registry_source: String,
pinned: String,
got: String,
},
ChecksumMismatch {
id: String,
file: String,
expected: String,
got: String,
},
UnsafeIndexPath {
id: String,
file: String,
},
MalformedOntologyId {
id: String,
},
ConfigMalformed {
path: String,
detail: String,
},
NoEntityTypesFound {
topic: String,
},
NoClustersFound {
path: String,
},
VersionNotSemver {
value: String,
},
VersionMissing {
path: String,
},
VersionUnchanged {
value: String,
},
PackNotFound {
name: String,
},
PackAmbiguous {
name: String,
},
PackFileMissing {
name: String,
path: String,
},
PackVersionInvalid {
name: String,
path: String,
value: String,
},
PackAheadOfRelease {
name: String,
pack_version: String,
new_version: String,
},
ChangelogAnchorMissing {
path: String,
},
VerificationFailed {
path: String,
},
GitCommandFailed {
command: String,
stderr: String,
},
}Expand description
Errors from mif-rh’s engine core.
Variants split into two classes: those that produce a
crate::resolve::MapRecord anyway (a finding that classifies as
invalid/ambiguous/unresolved is still recorded, per rht’s own
resolve-ontology.sh — see crate::resolve::resolve_finding) and
those below, which mean no record could be produced at all (the file
itself is unreadable, the catalog is missing, or an ontology definition
is broken). crate::review::review folds the latter into its
reconciliation “gap” count rather than aborting the whole review.
Variants§
FindingIo
Failed to read a finding file.
FindingJson
A finding file was not valid JSON.
Io
A generic I/O failure reading a supporting file (ontology directory,
map file, harness.config.json).
Json
A supporting file was not valid JSON.
JsonSerialize
A value could not be serialized to JSON for an atomic write. This
indicates a bug in the value’s Serialize implementation (e.g. a
non-finite float) rather than anything a caller can fix by changing
its input.
Fields
OntologyPackYaml
An ontology pack YAML file failed to parse (the direct equivalent of
yq failing to read an ontology’s extends/entity_types/full
YAML — a fail-closed abort, matching rht’s own bash exit code 4).
FrontmatterYamlSerialize
A rendered artifact’s MIF concept frontmatter could not be serialized
to YAML. This indicates a bug in the concept’s Serialize
implementation (e.g. a non-finite float) rather than anything a
caller can fix by changing its input.
CatalogMissing
The catalog file (.claude/enabled-packs.json) is missing.
ConfigMissing
The config file (harness.config.json) is missing.
DirectBindingInvalid
A topic directly binds an ontology id that is not cataloged, or pins a version that does not match the cataloged one.
Ontology(OntologyError)
Resolving the transitive extends ancestry for an allowed ontology
failed (an ancestor is missing from the supplied ontology-pack
directory, or the extends graph is cyclic).
Frontmatter(FrontmatterError)
Splitting a report’s frontmatter/body failed (missing frontmatter, malformed YAML, or a non-mapping frontmatter document).
SchemaCompilation
A report schema (or one of its $ref dependencies) was not valid
JSON, or the jsonschema validator could not be compiled from it.
Fields
RefSchemaMissingId
A $ref dependency schema has no $id, so it cannot be registered
for the main schema to resolve references against.
SchemaValidationFailed
A projected report failed validation against its schema.
Fields
InvalidToggleValue
A manifest toggle’s value is not one of the allowed values.
Fields
EmptySourceContent
No source content was available from --content-file,
--content, or stdin.
PackNotDeclared
A pack-toggle target is not declared in harness.config.json’s
packs[] array. Distinct from Self::PackNotFound (a
bump-version --pack target with no packs/<family>/<name>/
directory on disk) — this is a config-declaration check, not a
filesystem one.
NoFindingsFound
A findings directory has no *.json files to build a graph/index
from.
NoSurvivingFindings
Every finding in a directory is falsified — nothing to synthesize.
ArtifactNotPublishable
A synthesized artifact has no sections, finding refs, or sources — there is nothing publishable to render.
MissingProvenance
One or more findings in a corpus import lack a provenance block (SPEC §8a: provenance must survive an import).
Fields
ReconcileEnvironmentBroken
A session reconciliation’s known-good sample finding failed schema validation — the schema/toolchain itself is broken. Must never be read as “every finding is invalid” (that would re-run an entire expensive research session).
TopicNotRegistered
A topic README build/check was requested for a topic with no entry
in harness.config.json’s topics[].
InvalidConcordance
A concordance file parsed but is not a valid graph (no .nodes
array) — the corpus atlas is a projection of the spine, and there
is nothing to project without one.
OntologyMapUnusable
The shippable-typing gate’s ontology-map.json is missing or
present-but-unparseable (not a JSON array of records) — the gate
cannot prove any shippable finding is typed, so it fails closed
rather than passing vacuously (every per-finding lookup would
otherwise silently resolve to “no record”).
Fields
RelationshipTargetFindingUnparseable
A finding under <topic>/findings/ failed to parse while building
the corpus-wide active-@id/relationship-target universes for the
relationship-targets gate. Hard-fails the whole gate (never silently
dropped) — an unparseable file could otherwise hide a real dangling
target elsewhere in the corpus.
SubtypeOfCycle
A subtype_of chain across the loaded ontology registry revisits
its own starting type — a cycle. User-authored ontology data must
never drive unbounded recursion during the concordance’s transitive
supertype closure.
EntityTypeSchemaInvalid
Building a dynamic jsonschema validator for a resolved entity
type’s schema field failed. Indicates a malformed ontology pack,
not a bug in the finding being validated.
Fields
Index
A SQLite index operation failed.
LockIo
Failed to open or write the exclusive review lock file.
LockHeld
Another review run already holds the lock.
QueueTopicMismatch
A suggestion queue file on disk belongs to a different topic than the one being upserted — a copied/renamed queue file or a wrong-path caller, which must not silently mix topics’ entries.
Fields
Embed(EmbedError)
Computing an embedding failed.
RegistryFetch
Failed to fetch a file (the registry index, or a vendored ontology) from the resolved ontology source (a local directory or an http(s) base URL).
Fields
RegistryIndexInvalid
The registry index (index.json) was not valid JSON or did not
match the expected shape.
Fields
registry_source: StringThe resolved source the index was read from. See
Self::RegistryFetch’s doc comment for why this is
registry_source, not source.
OntologyNotInRegistry
A requested or extends-ancestor ontology id has no entry in the
registry index — it has no canonical definition yet.
LockSourceMismatch
ontologies.lock.json’s pinned source differs from the source a
read-only pin-safety check was asked to evaluate against — the
lock’s per-id version/sha256 pins were established against a
different registry and are not meaningful trust anchors for this
one. Unlike fetch, which legitimately adopts a new source on
first use (and re-pins it), a read-only check never mutates the
lock, so it must fail closed rather than silently compare a
mismatched source’s registry entries against pins it did not
establish.
Fields
OntologyPackNotUtf8
A checksum-verified, freshly-fetched ontology pack’s bytes were not valid UTF-8 — refusing to lossily convert content whose exact bytes were already pinned by checksum. A lossy conversion would silently substitute replacement characters, meaning the diffed schema would not be the schema that was actually hashed and fetched.
IndexPinMismatch
The registry index’s sha256 no longer matches the value pinned in
ontologies.lock.json for the same source (trust-on-first-use, then
pin) — the trust root moved.
Fields
registry_source: StringThe source whose index changed. See Self::RegistryFetch’s
doc comment for why this is registry_source, not source.
ChecksumMismatch
A fetched ontology file’s sha256 did not match the registry index’s pinned value — refusing to vendor a file that does not match the trusted hash (fail-closed).
Fields
UnsafeIndexPath
The registry index named an unsafe (non-bare) file path for an ontology — a poisoned index could otherwise escape the vendored packs directory.
MalformedOntologyId
A registry-discovered ontology id is not a bare, lowercase slug — a
poisoned or malformed index entry that could otherwise escape its
intended vendored directory once written into harness.config.json.
ConfigMalformed
harness.config.json’s .ontologies field exists but is not an
array — refusing to guess how to append a discovered ontology to it.
NoEntityTypesFound
A topic’s ontology-map.json carries no typed entity types to
mine an ontology draft from.
NoClustersFound
An expansion-candidates output file carries no clusters to draft
candidate types from.
VersionNotSemver
A version string is not well-formed X.Y.Z semver.
VersionMissing
A file expected to carry a .version field has none.
VersionUnchanged
The requested new version equals the current one.
PackNotFound
A --pack component name resolves to no directory under
packs/<family>/.
PackAmbiguous
A --pack component name resolves to more than one directory.
PackFileMissing
A pack is missing a file bump_version needs (its plugin.json,
SKILL.md, or family doc section/row).
PackVersionInvalid
A pack’s declared version is not well-formed semver.
Fields
PackAheadOfRelease
A pack’s current version is already ahead of the release being cut — bumping it would move it backward.
Fields
ChangelogAnchorMissing
CHANGELOG.md has neither an ## [Unreleased] anchor to insert a
new section under, nor an existing section for the new version.
VerificationFailed
A post-write self-verification found a file that did not update to the expected new value.
GitCommandFailed
A git invocation exited non-zero — a real failure (not a repo, a
corrupted ref, etc.), distinct from a command that legitimately
produced no output.
Trait Implementations§
Source§impl Debug for MifRhError
impl Debug for MifRhError
Source§impl Display for MifRhError
impl Display for MifRhError
Source§impl Error for MifRhError
impl Error for MifRhError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<EmbedError> for MifRhError
impl From<EmbedError> for MifRhError
Source§fn from(source: EmbedError) -> Self
fn from(source: EmbedError) -> Self
Source§impl From<Error> for MifRhError
impl From<Error> for MifRhError
Source§impl From<FrontmatterError> for MifRhError
impl From<FrontmatterError> for MifRhError
Source§fn from(source: FrontmatterError) -> Self
fn from(source: FrontmatterError) -> Self
Source§impl From<OntologyError> for MifRhError
impl From<OntologyError> for MifRhError
Source§fn from(source: OntologyError) -> Self
fn from(source: OntologyError) -> Self
Source§impl ToProblem for MifRhError
impl ToProblem for MifRhError
Source§fn to_problem(&self) -> ProblemDetails
fn to_problem(&self) -> ProblemDetails
self to a fully-populated ProblemDetails envelope.Source§fn render(&self, format: OutputFormat) -> String
fn render(&self, format: OutputFormat) -> String
Auto Trait Implementations§
impl !RefUnwindSafe for MifRhError
impl !UnwindSafe for MifRhError
impl Freeze for MifRhError
impl Send for MifRhError
impl Sync for MifRhError
impl Unpin for MifRhError
impl UnsafeUnpin for MifRhError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more