Repository navigation
feat(codegen): rolling-spec drift detection for aws, azure, github (#526) - #531
Merged
Merged
Conversation
) Add checkRollingUpgrade(lexiconDir): regen from current-latest via #524's regenLexicon, diff the fresh API surface against the committed surface.snapshot.json, and report { lexicon, hasUpgrade, severity, delta, validation }. For azure it also computes a per-provider API-version delta. The diff/decision logic is factored into pure functions (classifyDelta, diffRollingSurface, computeAzureApiVersionDelta, diffAzureApiVersions, extractAzureProvider) unit-tested with fixture snapshots — no live upstream required. Adds `chant dev rolling-upgrade <dir>`, a dry-run reporter that prints the surface delta and the PR label an upgrade would carry (additive -> minor, breaking -> major). It only reports; PR automation and scheduling are #527. Seeds the github surface baseline (22 entries). The azure baseline is deferred: seeding it requires a full live regen over the 21MB ARM tarball, left to the runner (#527).
lex00
force-pushed
the
feat/526-rolling-upgrade
branch
from
July 1, 2026 23:17
fb1edd5 to
4204db3
Compare
4 tasks
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 #526. Part of #523. Builds on #524's
regenLexicon+ surface-diff tooling.What
Rolling lexicons (aws, azure, github) pin no version constant — "latest" is fetched on every regen. This adds drift detection: regen from current-latest, diff the produced API surface against the committed
surface.snapshot.json, and report whether the surface moved.checkRollingUpgrade(lexiconDir)Calls #524's
regenLexicon(never reimplements it), diffs the fresh surface vs the committed baseline, and returns:hasUpgrade— true only when the surface actually changed.severity—additive(new resources / optional props / attrs) orbreaking(removed / now-required / changed).apiVersionDelta— azure only: per-provider API-version changes (added / updated / removed), derived from the ARM provider prefix of each resourceType.The diff/decision logic is pure and unit-tested with fixture snapshots (no live upstream):
classifyDelta,diffRollingSurface,computeAzureApiVersionDelta,diffAzureApiVersions,extractAzureProvider.CLI (report-only)
chant dev rolling-upgrade <dir>regenerates, diffs, and prints the delta plus the PR label an upgrade would carry (additive → minor,breaking → major). Dry run only — it never opens a PR, updates a branch, or writes the baseline. PR automation + scheduling are #527.Baseline seeding
main(feat(codegen): shared lexicon regen-validate + API surface-diff tooling #524).checkRollingUpgradehandles the missing-baseline case (treats the whole surface as added).Scope
No runtime PR automation, branch management, or scheduled workflow (that's #527). No changes to k8s/gcp/docker/gitlab (#525). Shared CLI-file edits kept minimal/additive.
Validation
npx tsc --noEmit -p packages/core/tsconfig.json— clean.npx vitest runon rolling-upgrade + lexicon-regen + surface-snapshot — 61 passed.chant dev rolling-upgrade lexicons/githubregenerated from the cached latest spec and correctly reportedhasUpgrade: false(unchanged surface → no PR).