Conversation
This was referenced May 7, 2026
…gionStack from lexicon roots These three composites were exported from each lexicon's composites/index.ts but missing from the lexicon root index.ts. Examples that import them via @intentius/chant-lexicon-gcp / @intentius/chant-lexicon-k8s — including examples/temporal-crdb-deploy — failed to resolve the symbols on a fresh install (existing dev machines hid the gap because their node_modules entries were symlinks into the source tree). Fixes #21.
When source files import names that resolve to undefined (e.g. missing
re-exports from a lexicon root) without invoking them, discovery completes
with zero declarables and chant build silently writes "{}" and exits 0.
The first sign of trouble is then "kubectl apply" failing at deploy time.
Add a guard: when sourceFileCount > 0 but outputs.size === 0 (and no other
errors fired), surface a descriptive error and skip the file write. This is
the secondary bug called out in #21.
Spreading a composite instance (`...someComposite`) used to leak the framework's bookkeeping properties — `members` (the inner CompositeMembers record) and `_definition` — into the receiving object. When a parent composite did `...childResult`, its own member validation then saw a `members` key pointing at a plain object and threw 'is not a Declarable or CompositeInstance'. Surfaced in CockroachDbRegionStack which spreads NamespaceEnv's result. Fix is in the framework so the pattern works for any composite that delegates to another composite via spread.
- @intentius/chant 0.1.6 → 0.1.7 (silent-build-failure guard, composite spread fix) - @intentius/chant-lexicon-gcp 0.1.5 → 0.1.6 (root re-exports for MultiRegionVpc, GkeCrdbRegion) - @intentius/chant-lexicon-k8s 0.1.5 → 0.1.6 (root re-export for CockroachDbRegionStack)
…orts Each region's infra.ts re-exported individual GkeCrdbRegion members under short names (`cluster`, `nodePool`, `dnsZone`, ...). Composite expansion already produces uniquely-prefixed names (`eastCluster`, `centralCluster`, `westCluster`, ...), so the re-exports were duplicating the same underlying Declarables under names that collided when chant scanned the full src/ tree (e.g. for `build:temporal`).
Reflects @intentius/chant 0.1.7, lexicon-gcp/k8s 0.1.6 in the workspace lockfile. No transitive dep changes.
2c2a056 to
da77b53
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #21. Three bugs were called out in that issue, plus one I tripped over while verifying the fix end-to-end.
MultiRegionVpc,GkeCrdbRegion,CockroachDbRegionStack(and their config types) — they were exported from each lexicon'scomposites/index.tsbut not surfaced at the package root, soimport { MultiRegionVpc } from "@intentius/chant-lexicon-gcp"failed on a freshnpm install. Existing dev machines hid the gap becausenode_modules/@intentius/chant-lexicon-*was a symlink into source.chant buildsilent-success-with-empty-output (the secondary bug in lexicon root index.ts misses three composites — chant build fails silently when examples import them #21): when imports resolved toundefinedwithout being invoked, discovery completed with zero declarables, chant wrote"{}"to the output file and exited 0. First sign of trouble waskubectl applyfailing at deploy time. Now: whensourceFileCount > 0butoutputs.size === 0, surface a descriptive error and skip the file write....someComposite) leaked the framework's bookkeeping (members,_definition) into the receiving object. A parent composite that did...childResultthen tripped its own member validation with "is not a Declarable or CompositeInstance". Mademembers/_definitionnon-enumerable so spread only exposes actual member resources.temporal-crdb-deployhad per-regionexport const cluster = east.clusterre-exports that duplicated the same Declarables under names that collided when chant scanned the fullsrc/tree (e.g. forbuild:temporal). Composite expansion already produces uniquely-prefixed names, so the re-exports were redundant.Verification
out.yamlwritten.examples/temporal-crdb-deploy: 10 TS2305 missing-export errors → 0 after the lexicon fix.examples/temporal-crdb-deployend-to-end: all 8 dist artifacts produced (temporal-setup.sh,shared-infra.yaml,{east,central,west}-{infra,k8s}.yaml).Version bumps
@intentius/chant0.1.6 → 0.1.7 (silent-build-failure guard, composite spread fix)@intentius/chant-lexicon-gcp0.1.5 → 0.1.6 (root re-exports)@intentius/chant-lexicon-k8s0.1.5 → 0.1.6 (root re-export)Release plan
Once this is merged, push these three tags from
mainto trigger the publish workflows:After publish, a fresh
cd examples/temporal-crdb-deploy && npm install && npm run buildwill pick up the new versions and build cleanly.Test plan
npx vitest runpasses (1377 tests in core).npm run buildper touched lexicon prepack (covered by the existing test job in.github/workflows/publish.yml).cd examples/temporal-crdb-deploy && npm run buildproduces 8 dist artifacts with no errors.chant buildexits 1, no output file written.