Skip to content

feat(carve): carve apply — graduation + full carve-out docs (#197) - #997

Merged
lex00 merged 1 commit into
mainfrom
feat/terraform-carve-apply
Jul 22, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/terraform-carve-apply

Conversation

@lex00

@lex00 lex00 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Apply graduation — the dial-turn from observe to apply — completing the strangler-fig carve (#197). Builds on emit (#995) and bridge (#996).

chant carve apply --from <tf-dir> --select <address> --env <env> resolves the ownership marker that makes the carved resource chant-owned (reusing core's ownershipEntries) and finalizes the ordered apply runbook.

BYOL-honest

It makes no cloud call. It computes the marker + plan; the apply itself is whatever lifecycle you brought (native CLI, CI, ApplyOp), which stamps the ownership marker the emitted source carries. --write saves the graduation doc. This keeps chant out of the apply path, consistent with bring-your-own-lifecycle.

What's here

  • terraform/graduate.ts — ownership marker + tags (chant:managed-by/stack/env, mirroring the AWS lexicon's tag channel since core can't import a lexicon) + a reversible runbook.
  • carve apply command — dry-run plan by default; --write emits the graduation doc.
  • docs/cli/carve-out.mdx — documents the full emit → bridge → apply arc with an end-to-end shell walkthrough.
  • carve-arc.test.ts — end-to-end: one resource (aws_s3_bucket.assets) through all three steps, asserting they compose (selector, boundary, data-source rewrite, ownership marker).

The carve, end to end (across the three PRs)

advisor (#214) → carve emit (#995) → carve bridge (#996) → carve apply (this).

Verification

  • 12 new tests incl. the end-to-end arc; full terraform + carve suites green.
  • Core tsc + eslint clean. Verified via the real CLI.

Part of #197.

Apply graduation, the dial-turn from observe to apply. `chant carve apply
--from <tf-dir> --select <address> --env <env>` resolves the ownership marker
that makes the carved resource chant-owned (reusing core ownershipEntries) and
finalizes the ordered apply runbook.

BYOL-honest: no cloud call. It computes the marker + plan; the apply is your
lifecycle (native CLI / CI / ApplyOp), which stamps the marker the emitted
source carries. --write saves the graduation doc.

- terraform/graduate.ts: ownership marker + tags (chant:managed-by/stack/env,
  mirroring the AWS lexicon's tag channel) + reversible runbook.
- carve apply command: dry-run plan by default; --write emits the doc.
- docs: cli/carve-out.mdx documents the full emit → bridge → apply arc.
- carve-arc.test.ts: end-to-end, one resource through all three steps.

PR C of 3 — completes the boundary-bridging carve (#197). emit + bridge +
apply now compose end to end (advisor #214 → emit #995 → bridge #996 → apply).
@lex00
lex00 merged commit 57ae196 into main Jul 22, 2026
6 checks passed
@lex00
lex00 deleted the feat/terraform-carve-apply branch July 22, 2026 05:00
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