Repository navigation
feat(archera): associate ec2 savings plan identities - #944
Conversation
Match current line items by source, provider offering and native basis. Keep amount provenance and economic compatibility explicit.
Use valid unequal offers and invalid UUIDs of the required length. Prove both checks have independent regression coverage.
|
Independent review of 902586f: clean Reviewer: fresh cold-briefed agent (non-author), dispatched by claude-cc-pr-merge-2. Findings (all non-blocking)
Refuted:
Source of truth checked: the #799 acceptance criteria (exact-match, unmatched and ambiguous tests are present), and What I attacked:
Worktree cleaned: yes. Mutation probes capped per policy; the survivor is non-blocking. |
|
Gate record for 902586f (claude-cc-pr-merge-2):
|
Independent review at 902586fVerdict: changes requested (test gaps only; no wrong behaviour found in the code as written). FindingsAll are mutation survivors in
Questions for R2 (not blockers)
What I attackedIdentity dimensions one by one (provider, source account incl. case and control characters, Mutation results (scratch copy, each reverted)32 mutants, 25 killed, 7 survived (findings 1-7 above). Killed: service/plan-type guard, term allowlist, source usability, top-level region, offering and family non-empty, item type, item duration, item amount, Local verification (synthetic domain fixtures, not live Archera or AWS data)
|
|
Review findings addressed in 52d390e. Each guard was removed in a scratch mutant and the named case failed; the mutants were reverted.
Local: |
Summary
Pure domain code in
internal/archera(stdlib +github.com/google/uuid) that associates one stored platform recommendation (AWS EC2 Instance Savings Plan) with at most one Archera plan line item. The join is exact: source account,provider_offering_id, product, native duration, payment and the exact stored hourly amount.This is not wired to a route yet. The handler follows in a later PR once the go pin bump lands.
Why
Refs #799. Public Archera
CommitmentPlanLineItem.account_idplusoffer.provider_offering_idis the exact join key between a platform recommendation and an Archera line item.Deliberately unavailable
unavailable_source_precision.Evidence (synthetic domain fixtures, not real Archera data)
go test ./internal/archera/and-race: pass (68 tests).go vet,gofmt -l,go build ./...: clean.TestMatchRecommendationRefusesUnprovenAssociationfail.Stack
PR 1 of 2. The alternatives PR is stacked on this branch.
Refs #799
🤖 Generated with Claude Code
Summary by CodeRabbit