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§
- Blocked
Referrer - One blocked-direction summary entry for
EngineError::RenameBlockedByCrossMemPolicy. Pairs the referrer’s mem with the renaming entity’s mem (the edge’s actualreferrer → renameddirection post-rewrite) and the count of distinct referrers in that mem that would emit the blocked rewrite. - Missing
Wiki Link - One body wiki-link that violates the strict wiki-link /
relation invariant. Surfaces inside
EngineError::WikiLinkWithoutRelation::missing. - Partial
Item - One entity an operation over several mems writes.
- Partial
Mem - One mem’s part of an operation over several mems, as a partial failure reports it.
- Referrer
Info - 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-upmemstead_entitycall. 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. - Schema
Source Diagnostic - One resolution-source line on
EngineError::SchemaNotFound’sdetails.sourcespayload.
Enums§
- Authoring
Package Error - A schema package directory refused as authoring input: a sealed copy where an authored one belongs, or a package the authoring read refuses.
- Boot
Error - Errors surfaced by [
Engine::from_workspace_root] (the folder boot path) and its git-branch counterpart (memstead_git_branch::engine_from_workspace_root). - Engine
Error - Errors surfaced by [
Engine]. - Stale
Cause - 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_hinta caller passes when it knows the remedy ismemstead schema installbut 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_CAPitems 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 anyfmt::Displayitem — wrap structs in a smallDisplaynewtype if their default rendering is too verbose for the text channel. - scope_
details_ to_ entity detailswithentityandstageadded, the payload shape ofEngineError::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 undersource_details. Shared by the engine’sEngineError::detailsand the surfaces that build their own per-variant payloads, so the wrapper adds the same two keys everywhere.- suggest_
similar - Ids in
storethat look like the one asked for: ending with it, or with--<it>, or whose slug contains it; at most five. The recovery set anENTITY_NOT_FOUNDcarries.