Repository navigation
ownership: lexicons declare their own key convention (drop core's aws/azure map) - #691
Merged
Merged
Conversation
…/azure map (#686) Core's ownership.ts enumerated every provider's marker-key convention (`label`/`aws-tag`/`azure-tag`) in a central CHANNEL_KEYS map, so adding a provider with a different tag/label convention meant editing core. Now the core helpers (ownershipEntries/hasOwnershipMarker/readOwnership/ classifyOwnership) take a `ChannelKeys` object directly, and core owns only the generic stamp/detect logic plus the shared label convention (`LABEL_OWNERSHIP_KEYS`, used by k8s/gcp/temporal). The AWS colon-key (`chant:managed-by`) and Azure hyphen-key (`chant-managed-by`) conventions move into their own lexicons (`AWS_TAG_OWNERSHIP_KEYS`, `AZURE_TAG_OWNERSHIP_KEYS`), which pass them to the core helpers. `OwnershipChannel`/`ownershipKeys` are removed. Emitted tags/labels are byte-for-byte unchanged — only where the key names are defined moved. Verified: 2689 tests pass across core ownership + the aws/azure/gcp/k8s/temporal lexicons (their serializers still emit the same markers); core tsc clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 #686.
Why
packages/core/src/ownership.tsenumerated every provider's marker-key convention (label/aws-tag/azure-tag) in a centralCHANNEL_KEYSmap. Adding a provider with a different tag/label convention meant editing core.What
The core helpers (
ownershipEntries/hasOwnershipMarker/readOwnership/classifyOwnership) now take aChannelKeysobject directly. Core owns only:LABEL_OWNERSHIP_KEYS(used by k8s, gcp, and the Temporalkubectl --pruneselector).The AWS colon-key (
chant:managed-by) and Azure hyphen-key (chant-managed-by) conventions move into their lexicons asAWS_TAG_OWNERSHIP_KEYS/AZURE_TAG_OWNERSHIP_KEYS, which pass them to the core helpers.OwnershipChannelandownershipKeysare removed.Verification
tscclean; 2689 tests pass across core ownership + aws/azure/gcp/k8s/temporal. New focused tests lock the aws/azure key constants in their lexicons.