Failures keep their meaning

Model expected business failures explicitly. Hide recoverable details only where callers do not need them to preserve correctness.ΒΆ

These different kinds of errors require different implementations.ΒΆ

Source: Q1533; B733, B1033.ΒΆ

Failure it prevents

A broken execution becomes a permanent business refusal, or a permanent refusal triggers endless retry.ΒΆ

Our Effect 4.0.0 reading

Schema.TaggedError and Effect.catchTag carry named expected outcomes. Classification and defect29 policy remain domain decisions. A service26 seam can own recoverable mechanics.ΒΆ

Source: packages/effect/src/Schema.ts, packages/effect/src/Effect.ts, packages/effect/src/Context.ts, packages/effect/src/Layer.ts.ΒΆ

How to check

Exercise each declared failure category. Verify retry, refusal, escalation, and uncertain outcomes remain distinguishable. This check is our proposal. The books do not prescribe it.ΒΆ

Continue with Cleanup can be an idempotent postcondition10, Pure cores reduce timeline coupling9.ΒΆ

Connect this to the existing rat-stack guidance39.ΒΆ

Use the durability skill for the full review. Return to the durability index34.ΒΆ

Sources

  1. Wlaschin, Scott. Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F#. Pragmatic Bookshelf, 2018.. Pragmatic Bookshelf. Implementation: Working with Errors; Using the Result Type to Make Errors Explicit; Handling Exceptions; Composing in Parallel with Applicatives. Accessed 2026-10-23.
  2. Ousterhout, John. A Philosophy of Software Design. 2018.. John Ousterhout. Β§4.4 Deep Modules; Β§10.2 Too Many Exceptions; Β§10.3 Define Errors Out of Existence; Β§10.6 Mask Exceptions; Β§10.7 Exception Aggregation; Β§10.8 Just Crash?; Β§10.10 Taking It Too Far. Accessed 2026-10-23.
  3. Effect contributors. Effect 4.0.0. Schema.ts. Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.
  4. Effect contributors. Effect 4.0.0. Effect.ts. Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.
  5. Effect contributors. Effect 4.0.0. Context.ts. Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.
  6. Effect contributors. Effect 4.0.0. Layer.ts. Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

Last changed 2026-10-23 in 58dc623. Source on GitHub. Change log.

Linked from

  1. Agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.

    Failures keep their meaning β€” Expected refusals, infrastructure faults, and defects need different policies.

  2. Change log. What changed in the files served here, newest first.

    Failures keep their meaning β€” new page: docs(lore): land the durability wiki pages and bibliography

  3. Cleanup can be an idempotent postcondition. Already-absent state can be success when absence is the operation’s intended result.

    Continue with Retry needs idempotent effects, Failures keep their meaning.ΒΆ

  4. durability. Keep a rat-stack app standing when a provider, pool, or dependency slows down or a worker dies. Use at any I/O boundary, connection pool, provider call, shared waiter, fan-out, flag, gate, or work that can outlive a request, or when asked "what happens when this is slow", "add a timeout", "make this durable", or "what survives a crash".

    Failures keep their meaning: retry, refuse, and escalate by failure kind.ΒΆ

  5. Durability starts with a recovery record. A reading order for storage, replay, worker ownership, overload, and recovery tests.

    Failures keep their meaning: Expected refusals, infrastructure faults, and defects need different policies.ΒΆ

  6. Effect basics. An Effect describes work, expected failures, and required services before a runtime executes it.

    tryPromise with a translation into a named domain error.

  7. Full agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.
  8. Handle expected failures without hiding defects. Declare expected failures, preserve their context, and recover by tag without turning crashes into successful outcomes.

    mapError to translate a filesystem failure into its domain error.ΒΆ

  9. Rat Stack lore | rat-stack. Short, source-grounded notes on the ideas and decisions behind rat-stack.

    Failures keep their meaning β€” Expected refusals, infrastructure faults, and defects need different policies.

  10. Source change history (log.md). The generated change log as Markdown.

    Failures keep their meaning β€” new page: docs(lore): land the durability wiki pages and bibliography