Description
The gcp naming rule keeps a bare name only for types in priorityNames (lexicons/gcp/src/codegen/naming.ts). When upstream adds a CRD whose short name an existing type has, both become <Service><Name>, so the existing type is renamed.
The upgrade to Config Connector v1.161.0 (#5512) renames 21 resources and their 76 property types this way, for example Note to ContaineranalysisNote because GrafeasNote arrived, and Schema to PubSubSchema. Every later upstream collision will rename something a user imports.
To decide: whether a name, once published, is kept (the surface snapshot could be the record of which type holds each bare name, so only the newcomer is prefixed), and whether a breaking lexicon upgrade ships with a note listing its renames. Nothing in chant, behold, terragucci, plywood or sql-yodeler uses the 21 renamed names today.
Activity
lex00 commentedon Nov 23, 2026
Decided 2026-11-22: published names stay stable. A type keeps the name it shipped with, and only the newcomer that shares its short name is prefixed. A breaking lexicon upgrade ships with a note that lists its renames and removals.
lex00 commentedon Nov 23, 2026
Branch
fix/gcp-stable-namesmakes gcp generation pass its committedsurface.snapshot.jsonto core'sreservedNames(added for #1459). Each published name stays with its resource type, and property type names follow because they are<Resource>_<Def>. A type with no published name gets the name the current rule gives it over the whole input. Without that step, a lone newcomer whose short name is shared only by published types would take the bare name:GCP::Transcoder::Jobwould becomeJobbesideBQJobandDataflowJob. With no snapshot, or a caller-supplied schema set, naming is unchanged.I checked this offline against main's snapshot and the v1.161.0 type list from #5512. All 22 published names that #5512 renames stay bare (
AistreamsClusteris a real removal). Every new type gets the same name #5512 gives it, no two types share a name, and a second run over the updated snapshot names everything the same.Other lexicons:
NamingStrategy(packages/core/src/codegen/naming.ts). aws and cpln already reserve published names from their snapshots. Both still have the newcomer gap above, because core leaves reserved types out of the short-name contest. This branch fixes that gap in gcp only.reservedNames, and each has asurface.snapshot.json. An upstream type that shares a short name with an existing type can rename the existing type in any of them. azure and k8s are the likeliest, since their upstream adds types often.When #5512 is regenerated after this lands, the generator has to read main's snapshot, not the branch's. The branch's snapshot already records the renamed names, and reading it would keep them.