feat(prose): durability system + docs + MCP server updates#2
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
febff83— implementation:DurabilityStoreinterface,MemoryDurabilityStorereference adapter, checkpoint-after-each-step in the executor,ctx.meta.{runId, idempotencyKey, isResuming}, 17 behavioral tests, and a shared store-conformance suite74615de— docs site: durability guide, order-processing-with-durability example,DurabilityStoreAPI reference, updates toexecution-options.mdx/comparison.mdx/types.mdx/index.mdx, both READMEsa3b72be— MCP server:DURABILITY_REFERENCEregistered asprose://api/durability-store,durabilityentry in the guides registry,FlowMetaand execute() options updated inapi-reference.tsandquick-reference.tsHow it works
After every successful step, the executor persists a checkpoint to the configured store. Re-invoking
execute()with the samerunIdresumes 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 receivectx.meta.idempotencyKey(${runId}:${stepName}) for external APIs that support deduplication (Stripe, SQS, etc.).Three observable behaviors of
execute()with adurabilityoption:running/failedcompletedWhat 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
MemoryDurabilityStoreis marked as test/dev only everywhere it appears.packages/prose/src/lib/__tests__/store-conformance.tsis excluded from the publisheddist/. Docs direct adapter authors to copy-vendor it or import from source for in-monorepo adapters.Test plan
npx nx test prose— 120 passednpx nx build prose— cleannpx nx build docs— 28 pages builtnpx nx run docs:dev) to skim rendered pages for prose nitsprose://api/durability-store,prose://guides/durability) render in a connected clientOut of scope
DurabilityStoreadapter packages🤖 Generated with Claude Code