Accumulate independent errors before writing output

Effect17 4’s Effect.validate evaluates every collection element. It returns all failures as a non-empty array when any element fails. Successful values are discarded in that case.ΒΆ

The code-snippets design brief14 uses this operation for checks before writing assets. Each snippet is an independent job. A job stops when a dependent stage fails. Other jobs still run.ΒΆ

The proposed order is:ΒΆ

  1. Collect snippet jobs.ΒΆ
  2. Check every job.ΒΆ
  3. Report each failure with diagnostic context8.ΒΆ
  4. Write assets only when all checks succeed.ΒΆ

Error accumulation means reporting every independent failure together. Here it runs across jobs. Each job must pass validation before highlighting.ΒΆ

The planned property inserts exactly k independent failures. It expects exactly k diagnostics and zero asset writes. See property-based testing18 and the glossary.ΒΆ

Sources

  1. Effect.validate. Effect contributors. Collection failure semantics Accessed 2026-10-02.
  2. Effect.validate test. Effect contributors. Collected failures Accessed 2026-10-02.

Last changed 2026-10-07 in 989f258. Source on GitHub. Change log.

Linked from

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

    Accumulate independent errors before writing output β€” Check every independent job before any job writes an asset.

  2. Build-time work stays out of requests. Git reads and highlighting produce static assets before the Worker handles requests.

    Checks before writing output finish before assets are written.

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

    Accumulate independent errors before writing output β€” edited: fix(lore): re-pin the CLI failure excerpt and link glossary first uses

  4. Code snippets quote a pinned source. Shipped design brief: pinned Git objects, typed diagnostics, and one build-only snippet model for both views.

    Preflight checks every independent snippet job before any generated output is written.ΒΆ

  5. Errors are part of the interface. An author error needs a location, the rejected input, and a repair.

    Use error accumulation to report unrelated failures together.ΒΆ

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

    See also: schemas, author-facing diagnostics, independent failures, and lifecycles.ΒΆ

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

    Accumulate independent errors before writing output β€” Check every independent job before any job writes an asset.

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

    Accumulate independent errors before writing output β€” edited: fix(lore): re-pin the CLI failure excerpt and link glossary first uses