fix(aws): ambient enumerates subnets - #1414
Merged
Merged
Conversation
A subnet holding nothing is the same shape of question as an unused security group, and #1278 left it unreachable. `describeResources` and `observeDependencies` both resolve outward from what is declared, so a subnet is recorded only when something in it is recorded — and a subnet with nothing in it is exactly what "which of my subnets are empty" is asking about. Found by measuring a snapshot rather than reading the code. An estate with seven subnets recorded five, and the two it dropped were the two with nothing in them. The default VPC's subnets are the archetype the ENUMERABLE comment already names: nothing declares them, and the only one ever recorded was the one that happened to hold an instance. VPC was already enumerable and behaved correctly, which is why this looked like a snapshot-wide blind spot and was in fact one missing table entry. The test fails without the entry — checked by removing it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KHf72NPSxiR8wMqGiRkCmf
This was referenced Aug 3, 2026
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.
A subnet holding nothing is the same shape of question as an unused security group, and #1278 left it unreachable.
describeResourcesandobserveDependenciesboth resolve outward from what is declared, so a subnet is recorded only when something in it is recorded — and a subnet with nothing in it is exactly what "which of my subnets are empty" asks about.Found by measurement
Snapshotting an estate with seven subnets recorded five, and the two it dropped were the two with nothing in them. The default VPC's subnets are the archetype the
ENUMERABLEcomment already names: nothing declares them, and the only one ever recorded was the one that happened to hold an instance.AWS::EC2::VPCwas already enumerable and behaved correctly, which is why this presented as a snapshot-wide blind spot and turned out to be one missing table entry.Effect
Before: snapshot held
subnet-default-c(the one an instance occupied) and missedsubnet-default-a/-b.After: all three are recorded, and chant answers "subnets with no network interfaces: 2 — AWS-created default VPC subnets" where it previously reported none.
The test fails without the entry; I checked by removing it.
When this lands
This alone does not make the empty-subnet question answerable. It makes the
subnets present in the snapshot; two things still suppress the count.
physical id in
replay.ts, so a regional resource seen in three regionsreplays as one. With this PR merged, chant records nine default subnets and
reports three.
vpc-defaultand itssubnets
subnet-default-a/b/cin every region. On real AWS those ids areglobally unique and Ambient regional resources are deduped account-wide, so a region's copy is lost #1416 would not be observable. Against Floci it is.
Measured after this PR: chant reports "Total subnets in estate: 5 · Subnets with
NO network interfaces: 2 · All empty subnets are in region us-east-1" against an
account holding 13 subnets, 8 of them empty across three regions. The kind is now
recognised; the per-region identity is not.
Follow-ups once merged
aws-benchchant arm vendors a packed tarball(
chant-source.sh local|published), so an unreleased build cannot be pinned onthat repo's main.
0.33.1vendored build once a release exists.mark this: a run whose dependencies were rebuilt is a different experiment even
when the code and the prompt match. chant's published
g-series numbers areagainst
0.33.1and will not be comparable — the arm needs a re-run before itsboard figures are quoted alongside the new build.
published number will be one a known defect is suppressing. Tracked in
The negative question set has results but no way to publish them chant-bench#27.