Skip to content

feat(examples): golden example L4 — the lifecycle dial (#216) - #227

Merged
lex00 merged 1 commit into
mainfrom
feat/216-l4-lifecycle-dial
Jun 7, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/216-l4-lifecycle-dial

Conversation

@lex00

@lex00 lex00 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

L4 of the golden teaching example — the observe → reconcile → authoritative dial, over the same L1 declarations.

What L4 adds

Three composite-generated Ops, one per dial position:

Op Direction What it does
observe.op.ts (WatchOp) — scheduled snapshot + live diff; reports drift, changes nothing
reconcile.op.ts (ReconcileOp) cloud → code on drift, regenerate the affected TypeScript and open a PR
apply.op.ts (ApplyOp) code → cloud apply via kubectl; deletes are owned-only (marker-scoped prune)

chant.config.ts gains an ownership marker (stack: getting-started) so reconcile/apply can scope to chant-owned resources. No state file — authority stays with kubectl; ownership is read from the live marker.

README gains an L4 section; status note now L1–L4.

Validation (build-only, as agreed)

Running these needs a cluster, so CI validates they compile to well-formed Ops:

examples/examples.test.ts → 152 passed | 10 skipped
  ✓ golden example L4 — lifecycle dial > observe / reconcile / apply Ops all compile

L1 getting-started still green with the ownership config; eslint packages/ clean.

Part of #216.

🤖 Generated with Claude Code

L4 adds the observe → reconcile → authoritative dial over the same L1
declarations, each a composite-generated Op:

- observe.op.ts (WatchOp)     — scheduled snapshot + live diff; reports drift
- reconcile.op.ts (ReconcileOp) — cloud → code; regenerate + open a PR on drift
- apply.op.ts (ApplyOp)       — code → cloud via kubectl; owned-only deletes

chant.config.ts gains an `ownership` marker so reconcile/apply can scope to
chant-owned resources (no state file — authority stays with kubectl, ownership
read from the live marker). README gains an L4 section; status note now L1–L4.

Build-only validated, as with L2/L3 (running them needs a cluster). Compile
tests assert all three Ops are well-formed. examples.test.ts: 152 passed.

Part of #216.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00
lex00 merged commit 2114999 into main Jun 7, 2026
5 checks passed
@lex00
lex00 deleted the feat/216-l4-lifecycle-dial branch June 7, 2026 03:23
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