Skip to content

feat(prose): durability system + docs + MCP server updates#2

Merged
celom merged 7 commits into
mainfrom
claude/zen-elgamal-cf1865
May 19, 2026
Merged

feat(prose): durability system + docs + MCP server updates#2
celom merged 7 commits into
mainfrom
claude/zen-elgamal-cf1865

Conversation

@celom
Copy link
Copy Markdown
Owner

@celom celom commented May 18, 2026

Summary

Adds opt-in skip-ahead checkpointing to @celom/prose, complete documentation for the feature, and the MCP server updates needed so AI assistants wired to the server know it exists.

Three commits on this branch:

  • febff83implementation: DurabilityStore interface, MemoryDurabilityStore reference adapter, checkpoint-after-each-step in the executor, ctx.meta.{runId, idempotencyKey, isResuming}, 17 behavioral tests, and a shared store-conformance suite
  • 74615dedocs site: durability guide, order-processing-with-durability example, DurabilityStore API reference, updates to execution-options.mdx / comparison.mdx / types.mdx / index.mdx, both READMEs
  • a3b72beMCP server: DURABILITY_REFERENCE registered as prose://api/durability-store, durability entry in the guides registry, FlowMeta and execute() options updated in api-reference.ts and quick-reference.ts

How it works

After every successful step, the executor persists a checkpoint to the configured store. Re-invoking execute() with the same runId resumes from the next undone step — or replays the saved result if the run already completed. A step may run twice across a crash, so handlers receive ctx.meta.idempotencyKey (${runId}:${stepName}) for external APIs that support deduplication (Stripe, SQS, etc.).

Three observable behaviors of execute() with a durability option:

Stored status Behavior
no checkpoint Fresh run — every step executes
running / failed Resume — completed steps are skipped, state is loaded, execution continues at the first undone step
completed Replay — saved result is returned without invoking any handler

What this is NOT

Documented in both the guide and the package README. Not a Temporal replacement — no long sleeps that survive process death, no automatic resumer service, no distributed worker claim/lease coordination, no workflow versioning. Just crash recovery for in-process flows, with you bringing the scheduler (cron, queue, next request) when something needs to invoke a resume.

Reviewer notes

  • Sidebar orders renumber to fit the new pages (e.g. observability 9→10, types 6→7, user-onboarding 2→3). Not a sidebar redesign — just inserts to keep new pages adjacent to their semantic neighbors.
  • MemoryDurabilityStore is marked as test/dev only everywhere it appears.
  • The conformance suite at packages/prose/src/lib/__tests__/store-conformance.ts is excluded from the published dist/. Docs direct adapter authors to copy-vendor it or import from source for in-monorepo adapters.
  • Tests: 120 passing (17 new durability + 12 new memory-store + existing).

Test plan

  • npx nx test prose — 120 passed
  • npx nx build prose — clean
  • npx nx build docs — 28 pages built
  • Manual dev-server pass (npx nx run docs:dev) to skim rendered pages for prose nits
  • Spot-check MCP resources (prose://api/durability-store, prose://guides/durability) render in a connected client

Out of scope

  • SQLite / Postgres DurabilityStore adapter packages
  • CHANGELOG (auto-generated on release)
  • Blog post / launch copy

🤖 Generated with Claude Code

celom and others added 7 commits March 1, 2026 09:41
Documents the skip-ahead checkpointing system shipped in febff83. Adds a
primary durability guide (concepts, idempotency contract, feature-interaction
matrix, "what this isn't"), an extended order-processing example walking
through a concrete crash scenario, and a DurabilityStore API reference.
Updates execution-options, comparison, types, index, both READMEs, and
renumbers sidebar orders to fit the new pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Brings the LLM-facing knowledge base in line with the docs site shipped
in 74615de. Adds DURABILITY_REFERENCE and registers it as
prose://api/durability-store, adds a 'durability' entry to the guides
registry, and updates FlowMeta + EXECUTION_OPTIONS_REFERENCE +
quick-reference.ts to surface the new ctx.meta fields and the durability
execute() option. AI assistants wired up to the MCP server can now write
flows that take advantage of opt-in checkpointing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI's nx format:check fails on every file in the branch's diff range
against main. Running nx format:write fixes them. Pure whitespace —
collapses single-element arrays, normalizes table column padding in
.mdx files, splits long callback chains, etc. No semantic change.

Verified with: nx run-many -t test build (120 tests, both builds clean).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@celom celom merged commit 35e346d into main May 19, 2026
1 check passed
@celom celom deleted the claude/zen-elgamal-cf1865 branch May 19, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant