Skip to content

test(lexicons): cross-lexicon lifecycle integration (aws, gcp, k8s, azure) - #170

Merged
lex00 merged 1 commit into
mainfrom
test/163-lifecycle-integration
Jun 2, 2026
Merged

lex00 merged 1 commit into
mainfrom
test/163-lifecycle-integration

Conversation

@lex00

@lex00 lex00 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Closes #163.

What

Proves the seam between core's lifecycle drivers and the real lexicon plugins — previously only createMockPlugin fixtures exercised this path. One matrix row per cloud, each driving two core entry points with the cloud edge mocked:

  1. live-import driver (@intentius/chant/cli/commands/import liveImportFromPlugins): real exportResources → IR → generated source written to a temp dir.
  2. changeset path (@intentius/chant/lifecycle/change-set buildChangeSet): real describeResources → diffLive verdicts (create / adopt / noop).

Notable assertion

Confirms the audited safe default: a live, undeclared, unmarked resource classifies as adopt, never delete — because real describeResources does not populate the live ownership marker. The owned → delete path stays covered by change-set.test.ts with synthetic metadata.

Placement

Per-lexicon (lexicons/<cloud>/src/lifecycle-integration.test.ts) rather than in packages/core, to avoid a core→lexicon reverse dependency. Each row imports core via the @intentius/chant/* subpath exports (which resolve to core source under vitest).

Verification

  • npx vitest run lexicons/aws lexicons/azure lexicons/gcp lexicons/k8s packages/core/src/lifecycle — 2279 passing.
  • npx tsc --noEmit -p packages/core/tsconfig.json + eslint — clean.

The full runLifecycleDiff CLI handler remains covered by lifecycle.test.ts (mock plugins); this PR adds the real-plugin coverage it lacked.

…zure)

Proves the seam between core's lifecycle drivers and the REAL lexicon
plugins — not createMockPlugin fixtures. One row per cloud, each driving:

- core's live-import driver (liveImportFromPlugins): real exportResources
  -> IR -> generated source, with the cloud edge (spawn/exec) mocked
- core's changeset path (buildChangeSet): real describeResources ->
  diffLive verdicts (create / adopt / noop)

Confirms the audited safe default: a live, undeclared, unmarked resource
classifies as adopt — never delete — because real describeResources does
not populate the live ownership marker.

Placed per-lexicon (not in core) to avoid a core->lexicon reverse
dependency; each row imports core via @intentius/chant subpath exports.

Closes #163
@lex00
lex00 merged commit 50e84f5 into main Jun 2, 2026
9 checks passed
@lex00
lex00 deleted the test/163-lifecycle-integration branch June 2, 2026 18:09
@lex00 lex00 mentioned this pull request Nov 20, 2026
78 of 84 tasks
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.

test(core): cross-lexicon mocked-CLI lifecycle integration

1 participant