Repository navigation
fix: paint AWS component status from the resource rollup, and group the logical view by component (#100) - #110
Merged
Conversation
…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
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.
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
componentStatusColorreturned early on a presentstack. 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 hadpresent: 0, absent: 3under aCREATE_COMPLETEstack, painted green.The two signals now answer the questions they can each answer:
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_COMPLETEstill readswarn, 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
describeResourcesis the thindescribe-stack-resourcespath, so the rollup counts CloudFormation's own inventory. Terminating a stack's instance out of band leaves it listedCREATE_COMPLETEand 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.
componentOftook 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 reportssourceLoc.fileproject-relative, so every node arrived assrc/<component>/…: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'sexamples/cc-aws-canonicalon Floci:The status assertion is written to fail if CFN status is still the source: any component painted
goodover a rollup that is not all-present is an error.byContainernow 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