fix: cost-allocation tag activation is backfillable; the stamp is not - #212
Merged
Conversation
Four places in cost-pipeline state that activating a cost-allocation tag is irreversible — "It is not retroactive… There is no backfill", "nothing before it is ever attributed", "Spend inside that window is unattributable permanently". A doc-contract check enforced that wording, so the claim was not merely written down, it was held in place. It is wrong. AWS ships cost-allocation tag backfill: a management account can request up to twelve months, and it updates Cost Explorer, Data Exports and the CUR automatically on their next 24h refresh. One request at a time, one per 24 hours. The API is reachable today — `aws ce list-cost-allocation-tag-backfill-history` returns an empty request list rather than an error. What backfill genuinely cannot do is invent tag values. AWS states the constraint directly: "the resource tag must be historically assigned to the AWS Resource for the backfilled cost data to be available." Backfill applies the tags' current activation status across history; a resource that ran untagged stays unattributable no matter when the switch is flipped. So the advice these documents give is right and the reason they give is not, and the difference decides what you hurry. The switch is repairable at the cost of a backfill request. The stamp is the irreversible half, which is why this component tags its own buckets at install rather than waiting for the first tenant. ──────────────────────── the gate ──────────────────────── check-doc-contracts.sh required the README to contain the string "not retroactive" — a gate whose pass condition was a false statement, and which would have rejected this correction. It now requires the README to say which half is recoverable, and its explanation carries the distinction rather than restating the error. Proven red by removing every occurrence of the word from the README and watching it fail, then green on restore. The first attempt at that proof was itself broken: the placeholder still contained the substring the check greps for case-insensitively, so the gate passed and looked vacuous when the test was the thing at fault.
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.
The claim
Four places in
cost-pipelinestate that activating a cost-allocation tag is irreversible:README.md:96— heading: "activation is not retroactive"README.md:111-113— "Every hour before activation is permanently NULL for that key. There is no backfill."main.tf:776— "Activation is not retroactive, so nothing before it is ever attributed."main.tf:1202— "Spend inside that window is unattributable permanently"And
check-doc-contracts.shrequired the README to contain the stringnot retroactive, so the claim wasn't just written down — it was held in place by a gate.It's wrong
AWS ships cost allocation tag backfill: a management account can request up to twelve months, and it updates Cost Explorer, Data Exports and the CUR automatically on their next 24h refresh. One request at a time, one per 24 hours.
Reachable today in this account:
What is actually irreversible
Backfill applies the tags' current activation status across history. It does not invent tag values. AWS states the constraint directly:
So the advice these docs give is right and the reason is not — and the difference decides what you hurry:
Which is exactly why this component stamps
PlatformIdon its own buckets at install rather than waiting for the first tenant. That behaviour doesn't change; its justification becomes true.The gate
A gate whose pass condition is a false statement would have rejected this correction. It now requires the README to say which half is recoverable.
Proven red by removing every occurrence of the word from the README and watching it fail, then green on restore. Worth recording that the first attempt at that proof was itself broken — the placeholder still contained the substring the check greps for case-insensitively, so the gate passed and looked vacuous when the test was the thing at fault.