Skip to main content

MifRhError

Enum MifRhError 

Source
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.

Fields

§path: String

The path that failed to read.

§source: Error

The underlying I/O error.

§

FindingJson

A finding file was not valid JSON.

Fields

§path: String

The path that failed to parse.

§source: Error

The underlying parse error.

§

Io

A generic I/O failure reading a supporting file (ontology directory, map file, harness.config.json).

Fields

§path: String

The path that failed to read.

§source: Error

The underlying I/O error.

§

Json

A supporting file was not valid JSON.

Fields

§path: String

The path that failed to parse.

§source: Error

The underlying parse error.

§

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

§path: String

The path the value was being written to.

§source: Error

The underlying serialization error.

§

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).

Fields

§path: String

The path that failed to parse.

§source: Error

The underlying parse error.

§

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.

Fields

§source: Error

The underlying serialization error.

§

CatalogMissing

The catalog file (.claude/enabled-packs.json) is missing.

Fields

§path: String

The missing catalog path.

§

ConfigMissing

The config file (harness.config.json) is missing.

Fields

§path: String

The missing config path.

§

DirectBindingInvalid

A topic directly binds an ontology id that is not cataloged, or pins a version that does not match the cataloged one.

Fields

§topic: String

The topic with the invalid binding.

§id: String

The offending ontology id.

§

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

§path: String

The schema file that failed to compile.

§detail: String

The underlying compilation error, stringified (the original jsonschema error type is not 'static).

§

RefSchemaMissingId

A $ref dependency schema has no $id, so it cannot be registered for the main schema to resolve references against.

Fields

§path: String

The dependency schema file with no $id.

§

SchemaValidationFailed

A projected report failed validation against its schema.

Fields

§path: String

The report file that failed validation.

§schema_path: String

The schema it was validated against.

§detail: String

Every validation error, joined for display.

§

InvalidToggleValue

A manifest toggle’s value is not one of the allowed values.

Fields

§field: String

The toggled field’s name.

§value: String

The rejected value.

§allowed: String

The pipe-joined list of allowed values.

§

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.

Fields

§name: String

The undeclared pack name.

§path: String

The manifest path checked.

§

NoFindingsFound

A findings directory has no *.json files to build a graph/index from.

Fields

§path: String

The empty findings directory.

§

NoSurvivingFindings

Every finding in a directory is falsified — nothing to synthesize.

Fields

§path: String

The findings directory with no surviving findings.

§

ArtifactNotPublishable

A synthesized artifact has no sections, finding refs, or sources — there is nothing publishable to render.

Fields

§path: String

The findings directory the artifact was synthesized from.

§

MissingProvenance

One or more findings in a corpus import lack a provenance block (SPEC §8a: provenance must survive an import).

Fields

§count: usize

How many findings lack provenance.

§paths: Vec<String>

The paths of the findings missing provenance.

§

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).

Fields

§sample_path: String

The sample finding path that unexpectedly failed to validate.

§

TopicNotRegistered

A topic README build/check was requested for a topic with no entry in harness.config.json’s topics[].

Fields

§topic: String

The unregistered topic id.

§config_path: String

The manifest path checked.

§

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.

Fields

§path: String

The invalid concordance path.

§

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

§path: String

The ontology-map path checked.

§topic: String

The topic (derived from the reports-dir name) named in the operator unblock hint.

§reason: String

Either "is missing" or "is unparseable or not a record array".

§

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.

Fields

§path: String

The unparseable finding path.

§

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.

Fields

§entity_type: String

The entity type where the cycle was detected.

§

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

§entity_type: String

The offending entity type name.

§detail: String

The underlying schema compilation error, stringified (the original jsonschema error type is not 'static and cannot be stored here directly).

§

Index

A SQLite index operation failed.

Fields

§source: Error

The underlying SQLite error.

§

LockIo

Failed to open or write the exclusive review lock file.

Fields

§path: String

The lock file path.

§source: Error

The underlying I/O error.

§

LockHeld

Another review run already holds the lock.

Fields

§holder_pid: u32

The PID recorded in the held lock file.

§

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

§path: String

The queue file path.

§expected: String

The topic the caller is upserting.

§found: String

The topic recorded inside the queue file.

§

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

§registry_source: String

The resolved source (directory path or URL base). Named registry_source, not source: thiserror treats a field literally named source as the error-chain cause and requires it to implement std::error::Error, which a plain String does not.

§detail: String

A human-readable failure detail.

§

RegistryIndexInvalid

The registry index (index.json) was not valid JSON or did not match the expected shape.

Fields

§registry_source: String

The resolved source the index was read from. See Self::RegistryFetch’s doc comment for why this is registry_source, not source.

§detail: String

A human-readable failure detail.

§

OntologyNotInRegistry

A requested or extends-ancestor ontology id has no entry in the registry index — it has no canonical definition yet.

Fields

§id: String

The unresolvable ontology id.

§

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

§lock_source: String

The source recorded in the lock file.

§requested_source: String

The source the check was asked to evaluate against.

§

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.

Fields

§id: String

The ontology id being diffed.

§file: String

The index’s declared file name.

§

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: String

The source whose index changed. See Self::RegistryFetch’s doc comment for why this is registry_source, not source.

§pinned: String

The previously pinned index sha256.

§got: String

The newly fetched index’s sha256.

§

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

§id: String

The ontology id being vendored.

§file: String

The index’s declared file name.

§expected: String

The expected (pinned) sha256.

§got: String

The sha256 actually computed from the fetched bytes.

§

UnsafeIndexPath

The registry index named an unsafe (non-bare) file path for an ontology — a poisoned index could otherwise escape the vendored packs directory.

Fields

§id: String

The ontology id whose index entry is unsafe.

§file: String

The offending file path.

§

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.

Fields

§id: String

The malformed id.

§

ConfigMalformed

harness.config.json’s .ontologies field exists but is not an array — refusing to guess how to append a discovered ontology to it.

Fields

§path: String

The config path.

§detail: String

A human-readable failure detail.

§

NoEntityTypesFound

A topic’s ontology-map.json carries no typed entity types to mine an ontology draft from.

Fields

§topic: String

The topic whose map carried no typed entities.

§

NoClustersFound

An expansion-candidates output file carries no clusters to draft candidate types from.

Fields

§path: String

The clusters file with no clusters.

§

VersionNotSemver

A version string is not well-formed X.Y.Z semver.

Fields

§value: String

The offending value.

§

VersionMissing

A file expected to carry a .version field has none.

Fields

§path: String

The file with no version.

§

VersionUnchanged

The requested new version equals the current one.

Fields

§value: String

The unchanged value.

§

PackNotFound

A --pack component name resolves to no directory under packs/<family>/.

Fields

§name: String

The unresolved component name.

§

PackAmbiguous

A --pack component name resolves to more than one directory.

Fields

§name: String

The ambiguous component name.

§

PackFileMissing

A pack is missing a file bump_version needs (its plugin.json, SKILL.md, or family doc section/row).

Fields

§name: String

The pack’s component name.

§path: String

The missing or malformed file/section.

§

PackVersionInvalid

A pack’s declared version is not well-formed semver.

Fields

§name: String

The pack’s component name.

§path: String

The pack’s plugin.json path.

§value: String

The malformed value found.

§

PackAheadOfRelease

A pack’s current version is already ahead of the release being cut — bumping it would move it backward.

Fields

§name: String

The pack’s component name.

§pack_version: String

The pack’s current version.

§new_version: String

The release version being cut.

§

ChangelogAnchorMissing

CHANGELOG.md has neither an ## [Unreleased] anchor to insert a new section under, nor an existing section for the new version.

Fields

§path: String

The CHANGELOG path.

§

VerificationFailed

A post-write self-verification found a file that did not update to the expected new value.

Fields

§path: String

The file that failed verification.

§

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.

Fields

§command: String

The git subcommand invoked (e.g. "tag --list v*").

§stderr: String

Captured stderr.

Trait Implementations§

Source§

impl Debug for MifRhError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MifRhError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for MifRhError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<EmbedError> for MifRhError

Source§

fn from(source: EmbedError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MifRhError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FrontmatterError> for MifRhError

Source§

fn from(source: FrontmatterError) -> Self

Converts to this type from the input type.
Source§

impl From<OntologyError> for MifRhError

Source§

fn from(source: OntologyError) -> Self

Converts to this type from the input type.
Source§

impl ToProblem for MifRhError

Source§

fn to_problem(&self) -> ProblemDetails

Maps self to a fully-populated ProblemDetails envelope.
Source§

fn render(&self, format: OutputFormat) -> String

Renders self for the given OutputFormat. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more