Skip to content

feat(examples): golden example L3 — approval gate on Temporal (#216) - #226

Merged
lex00 merged 1 commit into
mainfrom
feat/216-l3-gated-deploy
Jun 7, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/216-l3-gated-deploy

Conversation

@lex00

@lex00 lex00 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

L3 of the golden teaching example — a human-approval gate, on Temporal.

What L3 adds

deploy-gated.op.ts is L2's deploy with one addition: an approval gate before the apply, plus an onFailure rollback. A gate is a durable wait-for-signal (holds for hours, survives a worker restart), so this Op runs on Temporal — the local executor errors on a gate by design. L2's deploy stays the fast local path; this is the gated production shape.

temporal server start-dev                       # local Temporal (Docker)
chant run deploy-gated --temporal               # pauses at "Approve"
chant run signal deploy-gated approve-deploy    # releases it

Phases: Build → Approve (gate) → Apply, with onFailure Rollback.

  • deploy-gated.op.ts — the gated Op
  • chant.config.ts — typed temporal local profile (read by the generated Op worker)
  • README — L3 section; status note now L1–L3

Validation (build-only, as agreed)

No cluster/Temporal in CI. A compile test asserts the Op is well-formed — phases [Build, Approve, Apply], an actual gate step in Approve, and an onFailure Rollback. The gated run is the documented local step.

examples/examples.test.ts → 151 passed | 10 skipped
  ✓ golden example L3 — gated deploy Op > compiles with an approval gate and rollback

eslint packages/ clean.

Part of #216.

🤖 Generated with Claude Code

L3 adds a gated production shape over the same L1 declarations. deploy-gated.op.ts
inserts an approval gate before the apply, plus an onFailure rollback. A gate is
a durable wait-for-signal, so this Op runs on Temporal (--temporal), not the
local executor — L2's `deploy` stays the fast local path.

  chant run deploy-gated --temporal              # pauses at "Approve"
  chant run signal deploy-gated approve-deploy   # releases it

- deploy-gated.op.ts — Build → Approve (gate) → Apply, with Rollback onFailure
- chant.config.ts — typed temporal `local` profile (read by the Op worker)
- README — L3 section; status note now L1–L3
- test — compile check (gate present, phases, onFailure rollback)

Build-only validated, as with L2 (no cluster/Temporal in CI). The gated run is a
documented local step. examples.test.ts: 151 passed.

Part of #216.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00
lex00 merged commit c98bae2 into main Jun 7, 2026
5 checks passed
@lex00
lex00 deleted the feat/216-l3-gated-deploy branch June 7, 2026 03:09
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