Skip to content

feat(aws): upgrade to the latest CloudFormation spec (#1129) - #1165

Merged
lex00 merged 1 commit into
mainfrom
feat/1129-aws-spec-upgrade
Jul 28, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/1129-aws-spec-upgrade

Conversation

@lex00

@lex00 lex00 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Regenerates the aws lexicon from a fresh fetch of the CloudFormation Registry schema zip (https://schema.cloudformation.us-east-1.amazonaws.com/CloudformationSchema.zip) — a pinless, rolling "current" spec (no version to bump, unlike the pinned k8s/gcp/docker/gitlab lexicons).
  • Re-baselines lexicons/aws/surface.snapshot.json (10,589 → 10,784 entries) via chant dev surface-diff lexicons/aws --update-snapshot --bump.
  • Bumps lexicons/aws/package.json 0.28.0 → 0.29.0 (0.x-aware minor bump for breaking severity drift).
  • No composite/component/lint-rule source changes — see "Why no code changes" below.

Why #991 failed, and why this run didn't

#991 was a prior automated attempt (opened 2026-07-20) at this same upgrade. It failed with chant lint exit 1 across the docs-snippets example, but the visible diagnostics in that issue (truncated at the automation's 2000-char-per-step cap) were all info/warning — no shown error. Reproducing the code path: docs-snippets/src/parameter-ref.ts and parameter-cross-file-ref.ts each have a new Bucket({ BucketName: Sub\${Ref(...)}-data`, ... })— a CFN intrinsic call nested inside aSubtagged template, inside a resource constructor.EVL001 (packages/core/src/lint/rules/evl001-non-literal-expression.ts) flags exactly this shape unless it can recognize Ref/GetAttas registered, fold-safe intrinsics viacontext.intrinsics— and until yesterday,runLint` never received that registry (#1106), so it flagged every such call as an error, unconditionally.

That gap was closed by #1110 (commit d889a4cc, merged 2026-07-26 22:44 — the day before this branch). With the registry now threaded through, chant lint on every one of the 19 aws examples (including docs-snippets) exits 0 today — confirmed directly (node_modules/.bin/chant lint <example> for each, plus chant dev surface-diff lexicons/aws's own lint step). This is a lexicon-upgrade-tooling fix, not an upstream CloudFormation spec issue — so this run proceeded rather than stopping.

What the new spec changed

Surface delta vs the previous baseline (severity: breaking):

  • Added: 271 (resources + property types) — mostly brand-new services/resources: SageMaker::Action/Context/Experiment/TrialComponent/MonitoringScheduleAlert, BedrockAgentCore::CodeInterpreter/TokenVault, QuickSight::Agent/KnowledgeBase, Config::Connector, SecurityHub::Connector, AuditManager::AssessmentFramework, CleanRooms::IntermediateTable, Athena::Session, EC2::TransitGatewayPolicyTable, etc.
  • Removed: 76 — almost entirely AWS's own OpsWorks::* deprecation (Stack/Layer/App/Instance/Volume/UserProfile and their nested property types — OpsWorks Stacks was end-of-lifed by AWS), plus a handful of short-name aliases that got superseded by newly-added resources sharing the same short name (see below).
  • Changed: 33 — mostly additive (Vpc gains VpcEncryptionControl, Listener/ConformancePack/CloudFormationProduct/etc. flip taggable: true, several resources gain new optional props/attrs). Two real reclassifications: AWS::DataBrew::Recipe and AWS::BCMDataExports::Export moved from top-level resources to nested property types of DataBrew::Job / BCMDataExports::Export respectively (an upstream schema restructuring, not a chant change).

Renames are short-name collisions, not breakage

Several "removed" entries are just a generated export losing its short bare name because a new resource in this spec introduced the same short name — the codegen's naming layer resolves collisions by prefixing with the service name. All of these keep an equivalent qualified export and none are referenced anywhere in lexicons/aws/src (composites, components, lint rules) or in the shipped examples:

Old short name New name Why
Blueprint (Bedrock) BedrockBlueprint new Glue::Blueprint, OSIS::PipelineBlueprint added
Session (Macie) MacieSession new Athena::Session, SSM::Session added
PromptRouterTargetModel/RoutingCriteria (IntelligentPromptRouter) qualified-only new Bedrock::DefaultPromptRouter shares the same nested property names
MetadataProperties (SageMaker::ModelPackage) qualified-only new SageMaker::Action/Context/Experiment/TrialComponent each add their own

Confirmed via npm run build (tsc, 36s, 0 errors) that nothing in the lexicon's own TypeScript source references any bare name that moved.

Byte-level output impact

Checked the one case that looked most likely to change existing example output: AWS::ElasticLoadBalancingV2::Listener flips taggable: (unset) -> true, and fargate-alb/shared-alb/shared-alb-api/shared-alb-ui/multi-service-alb both create a Listener and declare defaultTags(...). Built fargate-alb directly (chant build … -o template.json, both --fold and --no-fold) and confirmed no resource — Listener included — gets a Tags property injected either way; this project's default-tag auto-injection isn't firing at all in this build path, independent of the taggable-flag change (a pre-existing condition, not something this upgrade touches or regresses). No example's synthesized template bytes change as a result of this upgrade.

Gate evidence

just build   → npx tsc --noEmit -p packages/core/tsconfig.json    — clean, ~2s
just lint    → npx eslint packages/                                — clean, ~2s
just test    → npx vitest run                                      — 776 passed | 1 skipped (777 files)
                                                                       9098 passed | 5 skipped (9103 tests)
just check-lexicons → aws — 17/17 tier-1 checks passing
                       (github has 2 pre-existing KNOWN_FAILURES, unrelated to aws — #1069)
                       No untracked tier-1 failures.

fold-differential:    corpus 101/101 built both ways — fold: 55  run-fallback: 46  empty: 0  drift: 0
sandbox-differential: corpus 101/101 built both ways — identical: 101  excluded: 0  drift: 0

git status after regen: only lexicons/aws/package.json and lexicons/aws/surface.snapshot.json changed; no untracked files (generated artifacts are gitignored).

Test plan

  • just build
  • just lint
  • just test (full monorepo suite)
  • just check-lexicons (aws 17/17)
  • just fold-differential / just sandbox-differential — 0 drift, no classification changes
  • chant lint on all 19 aws examples individually — 0 errors
  • Direct build of fargate-alb (fold + no-fold) to confirm no synthesized-output byte changes

Re-baselines the aws lexicon's surface.snapshot.json against a fresh
fetch of the CloudFormation Registry schema zip (rolling, no version
pin) and bumps the lexicon 0.28.0 -> 0.29.0 for the breaking-severity
drift, per chant dev surface-diff lexicons/aws --update-snapshot --bump.

#991 (a prior automated attempt at this same upgrade) failed because
chant lint flagged Ref(...)/GetAtt(...) calls nested inside Sub-tagged
templates in the docs-snippets example (parameter-ref.ts,
parameter-cross-file-ref.ts) as EVL001 errors — runLint had no
intrinsic registry to recognize those as fold-safe (#1106), fixed by
#1110 the day before this run. Reproduced today: `chant lint` on every
aws example is clean (0 errors, only pre-existing info/warning
diagnostics), and the full regen/validate/build/lint pipeline passes.

No composite, component, or lint-rule source needed changes — nothing
in lexicons/aws/src imports any of the renamed/removed generated
symbols (the "breaking" delta is almost entirely upstream OpsWorks
deprecation plus short-name collisions from newly added resources:
Blueprint/Recipe/Export/Session/MetadataProperties/PromptRouterTargetModel
each disambiguate to a service-prefixed export). Verified via
fold-differential and sandbox-differential: 101/101 corpus entries,
0 drift, all classifications unchanged from main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lex00
lex00 merged commit ecf4181 into main Jul 28, 2026
5 checks passed
@lex00
lex00 deleted the feat/1129-aws-spec-upgrade branch August 3, 2026 19:21
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.

1 participant