Skip to content

examples: runnable differentiator journeys wired into CI (#367) - #381

Merged
scttfrdmn merged 1 commit into
mainfrom
examples/367-journeys
Jul 26, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
examples/367-journeys

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Seventh PR of v0.76.0. Turns Substrate's most unusual features from claims into runnable, CI-exercised examples.

Journeys (in test/e2e, run by the existing E2E CI job)

Each starts its own emulator.StartTestServer and uses the real AWS SDK v2, so it reads as a self-contained example:

Journey Shows
journey_throttling_test.go Seed a throttling fault via POST /v1/fault/rules, observe the SDK surface it, clear it, succeed — the failure path a retry loop exists for, fired deterministically.
journey_replay_test.go Run a workload, replay the recorded event stream through the registry deterministically.
journey_cost_test.go Run a workload, read recorded cost from the event store, gate on a budget (real numbers: ~$0.00025 across 51 requests).
journey_timetravel_test.go Pin/advance the simulated clock, observe object LastModified move with it (exactly 24h).

Enabling change

To make these work out of the box, StartTestServer now wires a FaultController (disabled; rules seedable over HTTP) and a CostController — so fault injection and non-zero cost summaries are available to every test-server user, not just these tests. Full emulator suite still green.

Scope

The 4 pure-Go journeys land here (no extra CI toolchain). Terraform/CDK/pytest journeys need external toolchains and are split to #380. Documented in examples/README.md.

Closes #367.

Four self-contained journey tests in test/e2e (already run in CI), each starting
its own emulator.StartTestServer and using the real AWS SDK v2:

- journey_throttling: seed a throttling fault via the control plane, observe the
  SDK surface it, clear it, succeed.
- journey_replay: run a workload, replay the recorded event stream through the
  registry deterministically.
- journey_cost: run a workload, read cost from the event store, gate on a budget.
- journey_timetravel: pin/advance the simulated clock, observe object
  LastModified move with it.

To make these work out of the box, StartTestServer now wires a FaultController
(disabled; rules seedable via POST /v1/fault/rules) and a CostController, so
fault injection and non-zero cost summaries are available to every test server.

Documented in examples/README.md. Terraform/CDK/pytest journeys (external
toolchains) split to #380.

Closes #367.
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 88baca1 into main Jul 26, 2026
12 checks passed
@scttfrdmn
scttfrdmn deleted the examples/367-journeys branch July 26, 2026 06:55
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.

examples: add end-to-end journeys (Terraform, CDK, pytest, throttling, replay, cost gate, time-travel)

1 participant