Work / Project · Published · 2026-10-19

Workflow Observatory

A state-machine studio: approvals, retries, idempotency keys, replay and comparison.

Workflow Observatory run view with workflow diagram and simulation controls
Workflow Observatory run view with workflow diagram and simulation controls. Screenshot of the implemented application with its synthetic sample data.

The problem

Approval and job pipelines fail in subtle ways: a step skips its approval, a retry repeats a side effect, a replay gives a different answer. This simulator makes those rules executable and inspectable.

What it does

  • Workflow designer with live validation, revisions, approver roles, retry policies and failure destinations.
  • Deterministic runtime: commands produce an event ledger; forbidden moves and approval bypasses are refused and recorded.
  • Simulated jobs on a controllable clock with injectable faults; retries reuse the same idempotency key so side effects are not repeated.
  • Replay, step-through, fork from a snapshot, side-by-side comparison and an invariant checker.

Engineering choices

  • Event sourcing with two checks: re-executing the commands must reproduce the stored ledger exactly, and folding the ledger alone must give the same state.
  • Everything that looks like infrastructure is explicitly simulated in the page; no queue or network.

Tested results

  • 37 Vitest tests, including an exhaustive transition matrix and tamper detection; 8 Playwright tests.
  • Independent acceptance review on 2026-10-19: 5 defects fixed with regression tests, including stale approvals after a reject-and-resubmit loop.
  • Published 2026-10-19: CI green on the first run on Linux, GitHub Pages deployed, live check passed.

Last recorded verification 2026-10-19; latest recorded commit 9a6e646. The full commands and outcomes are in the repository's docs/test-report.md.

Stack

  • TypeScript
  • React
  • Vite
  • zod
  • Vitest
  • Playwright

Candid limitations

  • Simulation only: no real queue or distributed execution; roles are labels, not identities.

How it was made

Directed and reviewed by the owner; specification, code, tests and documentation written with Claude Code (AI). A separate Claude Code session that did not write the code then re-ran every check and fixed what it found; that is an AI review, not a human code audit. See the repository's AI_ASSISTANCE.md.