Repository navigation
feat(insurance): decode plan line-item identity - #436
Conversation
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 16 minutes for your next included review. View limit details
Comment |
Independent review at f767908Verdict: changes requested (one medium decode gap, plus test gaps where mutations survive). Source of truth: the live Public OpenAPI schema (the two local spec files named in the brief were absent; I fetched the schema from the vendor's unauthenticated openapi endpoint and parsed it). Checked Findings
Verified correct against the schema: names; nullable fields ( Mutation results (scratch copy, each reverted; 23 mutants, suite run per mutant): killed: swap region/az, swap multi_az/flexible, account_id/region/plan_type non-nullable, accept snake-case payment on line item, drop contract_spec payment/term check, drop contract_term check, drop offering_class check, drop offer.id match, drop plan_id match, drop duplicate check, drop negative quantity, nonneg->required, drop type/commitment_type empty checks, drop provider parse, swap id/offer_id, ignore top-level payment_option. Survivors: swap instance_type/family, swap tenancy/product_description, duration optional, is_selected nullable (see 3). |
|
Independent adversarial review: CLEAN at
Local verification (macOS; httptest/JSON fixture evidence only, no live Archera calls): Full CI has not run on this head because its base is #435's branch; after #435 merges this PR is retargeted to main and must go green there (a pure rebase with empty |
|
Review at f767908 addressed in e385da8 (new commit, no amend):
Mutants run in a scratch copy, each reverted: swap instance_type/family, swap tenancy/product_description, swap region/az, plan_type to tenancy, is_selected nullable, drop empty provider_offering_id, allow zero duration, allow negative duration: all killed. "duration_seconds optional" alone and "requiredRat to ratOrNil" alone survive because they are redundant with each other (readFields already rejects null on a non-nullable field, requiredRat rejects it again); applying both together is killed by the null-duration test. Local: gofmt, go vet, go test and go test -race -short on ./insurance/... pass, go build ./... ok. Synthetic fixtures only. |
Independent review at e385da8Verdict: no actionable findings. Pass-1 findings are resolved. Resolution check (diff b0f66cd..e385da8 on
Mutants rerun (scratch, reverted): swap instance_type/family, swap tenancy/product_description, is_selected nullable, drop empty-provider_offering_id check, drop positive-duration check, positive->nonnegative: all killed. Redundancy: |
|
Delta review: CLEAN at
Still after #435; then retarget to main and CI there. CR skipped: quota (non-default base). |
|
Automated review of
Posted by a read-only review sweep. It stays silent on this commit and re-reviews only after a new push. |
eee7a2c to
7a1704f
Compare
|
#435 merged as |
bdcb291 to
0b854cf
Compare
|
First full CI against main ( Fix: new commit Main then moved to |
Reject an empty offer.provider_offering_id and nonpositive duration_seconds, assert every decoded identity field, cover null is_selected and null/missing duration_seconds, and document case-insensitive UUID joins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gofmt aligned the grouped LineItemOffer declarations with a run of more
than 40 spaces, which matches the git-secrets AWS secret-key pattern
[^A-Za-z0-9/+=]{40} and failed the allowlist self-test in pre-commit CI.
One field per line keeps the padding short. No behaviour change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
CI green on |
0b854cf to
55abc0a
Compare
|
Merge evidence at |
What
Decode plan line-item identity:
account_id,offer.provider_offering_idandselected_commitmentfrom the Public Archera CommitmentPlanLineItem schema.Why
Comparison rows join to line items by
line_item_id; this adds the typed decoder that join needs (#434).Test evidence
Synthetic httptest fixtures only; no live Archera calls.
cd pkg && gofmt -l .clean,go vet ./insurance/...cleancd pkg && go test ./insurance/...ok;go test -race -short ./insurance/...okcd pkg && go build ./...okgolangci-lintcould not run (built with go1.26, repo needs go1.27); relying on CI lint.Stack
PR 2 of 3. Base: feat/434-insurance-selected-amount (PR 1). Followed by the pagination PR.
Refs #434
🤖 Generated with Claude Code