You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(config): tie suppression slug aliases to the library constants and cover Savings Plans spellings #1422
Drift between the alias tables.awsLegacyServiceSlugs in internal/config/types.go maps the legacy AWS slugs to canonical slugs written as string literals. mapServiceSlug in internal/purchase/execution.go holds the same pairs. The two only point at each other in comments, so a new alias added to one and not the other would bring back the suppression double-buy from fix(config): canonicalise every AWS service alias in purchase suppressions, not only ec2/compute #1420. Fix: write the canonical values as string(common.Service*) constants from cloud-commitments-go, and add a test that every legacy key in mapServiceSlug has an entry in awsLegacyServiceSlugs.
Savings Plans spelling aliases.mapSavingsPlansSlug accepts both the hyphenated and the dash-free spellings, but purchase suppressions compare them literally. This is low reach, since the frontend sends only one spelling. If it gets fixed, canonicalise only the spelling of each per-type slug. Never fold the savingsplans umbrella into the per-type slugs, because one umbrella suppression would then hide every plan type.
Verify reachability for item 2 before changing anything.
Item 2 finding, no code change: today only a direct API client can reach it.
AWS Savings Plans recs get Service from the library collector, and the only Savings Plans constants in common/types.go (~126) are hyphenated (savings-plans-compute, etc.).
The frontend sends only the hyphenated per-type slugs (frontend/src/plans.ts ~713, settings.ts ~700).
The dash-free per-type keys appear only in mapSavingsPlansSlug, where they are accepted but never emitted, and nothing in the repo produces them.
The dash-free savingsplans is the Azure Savings Plans service slug (probe_azure.go ~15), so it must never be folded into the AWS per-type slugs.
I'm leaving this open at P3 for item 2. It's fine to close it as won't-fix if nothing starts emitting the dash-free per-type slugs.
Activity
cristim commentedon Oct 26, 2026
Item 1 is in #1425.
Item 2 finding, no code change: today only a direct API client can reach it.
Servicefrom the library collector, and the only Savings Plans constants incommon/types.go(~126) are hyphenated (savings-plans-compute, etc.).frontend/src/plans.ts~713,settings.ts~700).mapSavingsPlansSlug, where they are accepted but never emitted, and nothing in the repo produces them.savingsplansis the Azure Savings Plans service slug (probe_azure.go~15), so it must never be folded into the AWS per-type slugs.I'm leaving this open at P3 for item 2. It's fine to close it as won't-fix if nothing starts emitting the dash-free per-type slugs.
test(purchase): fail the alias drift test when a legacy slug is removed
chore(config): tie suppression slug aliases to the library service co…
IAmJSD commentedon Oct 26, 2026
Claiming: working on this