Skip to main content

Module error

Module error 

Source
Expand description

Engine error envelopes.

EngineError lifts the typed payloads every consumer pattern-matches on (BackendError via #[from], ValidationError from the runtime validator, SlugError from the slug helper, ParseError from the markdown parser). BootError is the smaller envelope produced by Engine::from_workspace_root and its full counterpart — the failure modes specific to layout detection, workspace-store load, per-mount backend instantiation, and engine construction.

Structs§

BlockedReferrer
One blocked-direction summary entry for EngineError::RenameBlockedByCrossMemPolicy. Pairs the referrer’s mem with the renaming entity’s mem (the edge’s actual referrer → renamed direction post-rewrite) and the count of distinct referrers in that mem that would emit the blocked rewrite.
MissingWikiLink
One body wiki-link that violates the strict wiki-link / relation invariant. Surfaces inside EngineError::WikiLinkWithoutRelation::missing.
PartialItem
One entity an operation over several mems writes.
PartialMem
One mem’s part of an operation over several mems, as a partial failure reports it.
ReferrerInfo
Typed payload for a single Write-Mem referrer in EngineError::HasIncomingRefs. Captures the (from_id, rel_types, mem) triple the surface envelope projects so consumers can reason about the offending edges without a follow-up memstead_entity call. The mem is always a Write-Mem — ReadOnly referrers are partitioned out before this struct is constructed and surfaced via the residual-stub warning channel instead.
SchemaSourceDiagnostic
One resolution-source line on EngineError::SchemaNotFound’s details.sources payload.

Enums§

AuthoringPackageError
A schema package directory refused as authoring input: a sealed copy where an authored one belongs, or a package the authoring read refuses.
BootError
Errors surfaced by [Engine::from_workspace_root] (the folder boot path) and its git-branch counterpart (memstead_git_branch::engine_from_workspace_root).
EngineError
Errors surfaced by [Engine].
StaleCause
Why a mem’s view cannot take a write (EngineError::StaleView). One code for one state class (the view cannot take it); the cause names the state, and with it the repair.

Constants§

INLINE_LIST_CAP
Maximum items rendered inline before truncation kicks in. Picked to keep the typical fanout (1–25 items) on one terminal line while still bounding pathological cases (200+ referrers on a hub entity) to a constant prefix plus a count.
RECOGNISED_MUTATION_KEYS
Every payload key an update recognises as mutation content, in one place.
SCHEMA_INSTALL_PACKAGE_UNKNOWN
The install_hint a caller passes when it knows the remedy is memstead schema install but not where the package sits: the message then names the install command with this placeholder and never the repin advice. A fork copies the source’s pin and never moves it, so this is the fork’s hint when no authoring package of the name sits in the workspace tree.

Functions§

format_inline_list_overflow
Render a structured-list payload onto the text-mirror message. The first INLINE_LIST_CAP items appear inline, comma-separated; when the list is longer, the suffix “ +N more — see details.“ points the agent at the structured channel’s typed list under field. Empty input renders as an empty string. The function is generic over any fmt::Display item — wrap structs in a small Display newtype if their default rendering is too verbose for the text channel.
scope_details_to_entity
details with entity and stage added, the payload shape of EngineError::InEntity: a key the source payload already carries keeps its value. A payload that is not an object (no variant renders one today) is kept whole under source_details. Shared by the engine’s EngineError::details and the surfaces that build their own per-variant payloads, so the wrapper adds the same two keys everywhere.
suggest_similar
Ids in store that look like the one asked for: ending with it, or with --<it>, or whose slug contains it; at most five. The recovery set an ENTITY_NOT_FOUND carries.