Skip to content

fix: paint AWS component status from the resource rollup, and group the logical view by component (#100) - #110

Merged
lex00 merged 1 commit into
mainfrom
fix/100-aws-rollup-status-and-logical-grouping
Aug 2, 2026
Merged

lex00 merged 1 commit into
mainfrom
fix/100-aws-rollup-status-and-logical-grouping

Conversation

@lex00

@lex00 lex00 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Closes #100 (B·aws in chant's CC AWS lane, chant#1198).

Depends on chant#1308 — without it the rollup never reaches behold on AWS at all.

Component status was not running on the #98 source

componentStatusColor returned early on a present stack. AWS is the only substrate that has one, so the rollup #98 added was read everywhere except the substrate it was meant to be verified against. A test locked it in — "a stack still wins where a substrate has one" — with a fixture whose component had present: 0, absent: 3 under a CREATE_COMPLETE stack, painted green.

The two signals now answer the questions they can each answer:

before after
healthy stack, 3/3 present good good
healthy stack, 0/3 present good neutral
healthy stack, 2/3 present good warn
healthy stack, 1 unobserved good accent
ROLLBACK stack, 3/3 present warn warn
IN_PROGRESS stack, 3/3 present accent accent

An unhealthy stack still decides — a failed or in-flight deploy operation is a fact no count of resources can express, and loom-db's UPDATE_ROLLBACK_COMPLETE still reads warn, unchanged from M2. A healthy one no longer overrules what the resources said.

What this does not yet buy on AWS

Recorded in the module rather than left to be inferred: chant's AWS describeResources is the thin describe-stack-resources path, so the rollup counts CloudFormation's own inventory. Terminating a stack's instance out of band leaves it listed CREATE_COMPLETE and the rollup still reports it present — verified on Floci while closing this, not assumed. A green AWS component means "CloudFormation lists all ten and the last operation succeeded", which is more than the old paint claimed but less than "live" suggests. chant#1269/#1271 applied to the thin path is what would close that.

The logical view collapsed into one box

Found by the acceptance run, unrelated to the above. componentOf took the first path segment of a node's declaring file — the component only for a project keeping its infra at the repo root. chant's documented layout puts it under a source directory, and chant reports sourceLoc.file project-relative, so every node arrived as src/<component>/…:

before                              after
VPC 10.42.0.0/16                    VPC 10.42.0.0/16
└── src                             ├── private subnet 10.42.128.0/24
    ├── appInstance                 │   └── cc-app
    └── igw                         │       └── appInstance
                                    └── cc-network
                                        └── igw

One box for the whole estate, no subnet containment. Grouping is now by the first segment below the directory every node shares — layout-agnostic, needs no knowledge of what the source directory is called, and a root-layout project is unchanged (the existing fixture covers that).

Acceptance

just e2e-aws-logical — a real deployed estate, all three views in one pass. Against chant's examples/cc-aws-canonical on Floci:

(1/3) component status  1 component, cc-canonical good 10/10, rollup present on every row
(2/3) live overlay      10 nodes, 12 edges, {"good": 10}
(3/3) logical           2 headline cards, nesting depth 3, 1 VPC box, 1 subnet box,
                        2/2 cards carrying live status

The status assertion is written to fail if CFN status is still the source: any component painted good over a rollup that is not all-present is an error.

byContainer now rides along on the logical response so the nesting is assertable at all — it was previously observable only by reading the rendered SVG. The SPA ignores it.

HEADLINE_KINDS

Left AWS-literal. That is this slot's substrate and the module's own stated contract; #101 and #102 own the GCP and Azure lenses.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FBkcXzqjyY1YKWdaDFuqKs

…he logical view by component (#100)

AWS is the reference substrate for behold's three live views, so #100's job was
to confirm they run on the #98 resource-rollup source rather than on
CloudFormation stack status. They did not, and a second defect surfaced while
proving it.

`componentStatusColor` returned early on a present `stack`. AWS is the only
substrate that has one, so the rollup #98 added was read everywhere except the
substrate it was supposed to be verified against — and a test locked that in,
with a fixture whose component had `present: 0, absent: 3` under a
`CREATE_COMPLETE` stack, painted green.

The two signals now answer the questions they can each answer. The rollup is
the presence source on every substrate; an UNHEALTHY stack still decides, since
a failed or in-flight deploy operation is a fact no count of resources can
express (loom-db's `UPDATE_ROLLBACK_COMPLETE` still reads `warn`, unchanged from
M2). A healthy stack no longer overrules what the resources said, so a partial
or unreadable component stops being rounded up to green.

What that does NOT yet buy on AWS is stated in the module rather than left to be
inferred: chant's AWS `describeResources` is the thin
`describe-stack-resources` path, so the rollup counts CloudFormation's own
inventory. Terminating a stack's instance out of band leaves it listed
`CREATE_COMPLETE` and the rollup still reports it present — verified on Floci,
not assumed. A green AWS component means "CloudFormation lists all ten and the
last operation succeeded".

The logical projection had an unrelated defect the acceptance run exposed.
`componentOf` took the first path segment of a node's declaring file, which is
the component only for a project that keeps its infra at the repo root. chant's
documented layout puts it under a source directory, and chant reports
`sourceLoc.file` project-relative — so every node arrived as `src/<component>/…`
and the whole estate collapsed into one box titled "src", with no subnet
containment. Grouping is now by the first segment below the directory every node
shares, which needs no knowledge of what that directory is called and leaves a
root-layout project unchanged.

`e2e/aws-logical-floci-e2e.sh` (`just e2e-aws-logical`) is the acceptance run,
against a real deployed estate. Against chant's `examples/cc-aws-canonical` on
Floci:

    component status  1 component, cc-canonical good 10/10, rollup present
    live overlay      10 nodes, 12 edges, {"good": 10}
    logical           2 headline cards, nesting depth 3
                      VPC 10.42.0.0/16 > [private subnet 10.42.128.0/24, cc-network]
                      private subnet > cc-app > appInstance

`byContainer` now rides along on the logical response so that nesting is
assertable at all — it was previously observable only by reading the rendered
SVG. The SPA ignores it.

`HEADLINE_KINDS` stays AWS-literal. That is this slot's substrate, and the
module's own contract; #101 and #102 own the GCP and Azure lenses.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FBkcXzqjyY1YKWdaDFuqKs
@lex00
lex00 merged commit 18a833a into main Aug 2, 2026
1 check passed
@lex00
lex00 deleted the fix/100-aws-rollup-status-and-logical-grouping branch August 2, 2026 19:52
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.

feat(aws): live overlay + logical zoom on resource-rollup status

1 participant