Skip to content

feat(core): graph --live observes ChantConfig.stacks in multi-stack projects - #1159

Open
lex00 wants to merge 2 commits into
mainfrom
feat/1158-graph-live-multistack
Open

feat(core): graph --live observes ChantConfig.stacks in multi-stack projects#1159
lex00 wants to merge 2 commits into
mainfrom
feat/1158-graph-live-multistack

Conversation

@lex00

@lex00 lex00 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #1158.

graph --live unioned stacks from component discovery but ignored ChantConfig.stacks, so a declared multi-stack project observed nothing (single-stack convention, no stack named after the env). Declared stack names now join the observation set — the same contract resolveStackTargets gives lifecycle snapshot/diff.

Test: multi-stack config → observeResources receives every declared stack name; existing single-stack and component-derived behaviors unchanged (25 graph-handler tests green).

Found on the aws-bench chant-deployed estate (4 stacks, 3 regions): with this change plus a per-stack-scoped build the live overlay binds; the scoped-build half of full multi-stack graph support is follow-up.

…rojects

The live graph previously only learned extra stacks from component
discovery; a project declaring its deployed stacks via ChantConfig.stacks
got the single-stack convention and observed nothing. Declared stack
names now union into the observation set, same contract lifecycle
snapshot/diff already follow.

Fixes #1158
…checks

vi.fn(() => …) fixes the mock's arity to zero, so chantConfigMock(...a)
tripped TS2556 (spread argument must be tuple or rest parameter). A rest
parameter on the impl matches how discoverComponentsMock is typed and keeps
the mock signature-compatible with the real loadChantConfig.
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.

graph --live: support multi-stack projects (iterate ChantConfig.stacks like lifecycle does)

1 participant