feat(billing): Add contract-owned retention override config#370
Draft
dashed wants to merge 1 commit into
Draft
Conversation
Add RetentionConfig as a fourth Contract component, carrying contract-owned retention overrides layered on top of the package retention defaults. Each override is a sparse per-category patch keyed by billing data category, with standard and downsampled independently optional so an absent field inherits the package default. RetentionConfig also carries an optional organization-wide scalar for legacy compatibility. RetentionConfig is the raw stored input to effective-retention resolution, not the resolved policy itself. Python and Rust round-trip coverage exercises sparse standard-only and downsampled-only overrides, the inherit-standard downsampled marker, an absent organization scalar, and embedding on Contract.
|
The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).
|
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.
Stacks on #369. Adds
RetentionConfigas a fourthContractcomponent, carrying contract-owned retention overrides layered on top of the package retention defaults added in #369.Shape
Semantics
standardanddownsampledare independently optional; an absent field inherits the corresponding package default, and the two resolve as independent chains (a standard-only override keeps the package's downsampled).DataCategory, so package defaults and contract overrides always resolve against the same key.organizationis a single duration applied to standard and downsampled alike — a temporary mirror of the legacy scalar organization retention; per-category overrides are the forward-looking mechanism.RetentionConfigis the raw stored input to effective-retention resolution, not the resolved policy. Nothing consumes it authoritatively yet.Python and Rust round-trip coverage exercises sparse standard-only and downsampled-only overrides, the inherit-standard downsampled marker, an absent organization scalar, and embedding on
Contract.