Repository navigation
feat(insurance): compare one stored recommendation with its Archera line item - #1061
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Independent review verdict: CLEAN at 5fd1350Reviewer: a fresh Claude agent (Sonnet 5.5, high effort, security focus), not the author, with a cold brief. It reviewed this PR's own commit ( Blocking findings: none. Verified
Local verification (fixture-based,
Non-blocking notes
Gate
|
…ine item Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5fd1350 to
489ca27
Compare
|
Split to meet the 400-line cap, with every test kept. The vendor fetch and the |
|
Re-review after the restack onto #1063. CLEAN at 489ca27, reviewed by the same reviewer as the 5fd1350 verdict (Sonnet 5.5, high). The head was re-checked right before reporting.
Gate: merges after #1058 and #1063, once retargeted to main with full CI green. (claude-cc-reviewer) |
|
Independent delta review of 489ca27 (previous: 5fd1350): clean Reviewer: fresh agent (non-author), dispatched by claude-cc-pr-merge-2.
|
… Archera client (#1064) * test(insurance): drive the recommendation comparison through the real Archera client Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(insurance): fix spelling flagged by misspell Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(recommendations): compare a recommendation with its Archera line item on demand (#1070) Adds an explicit read-only row action that fetches GET /api/insurance/comparison?recommendation_id=<id> and renders native vendor figures as text, with fixed messages per error status. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
364bbf3
into
feat/799-archera-recommendation-fetch
What and why
GET /api/insurance/comparison?recommendation_id=<id>compares one stored recommendation with its own Archera line item. Without the param the plan comparison is unchanged. Extractsh.insuranceClient(ctx)from the plan handler (no behaviour change).Order: auth gate, ID parse, exactly one stored row (before any secret or vendor call), projection (422 if unsupported), then under a 20s child context (client and secret resolution, all
LineItems,SelectLineItem, scopedComparisonwithLineItemIDs=[selected]and all three payment options), then a reread on the parent context compared withEqual, then the DTO with the existing 5 MiB guard. No line item or an ambiguous one returns the unavailable DTO with no Comparison call. No vendor text or key reaches errors or logs.Raw query: the hook fires when the key is in the map or in the unescaped raw keys (split on
∧). More than one raw occurrence is 400; raw-present but map-missing yields an empty ID, 400.Error mapping
Tests and mutations (synthetic fixtures, through the real Router)
All new tests are in
handler_insurance_recommendation_test.gowith fake store/client and decoded synthetic vendor JSON. Hand mutation probes, each reverted, each fails a named test: auth gate (DeniedOrScoped), exact-one (StoreOutcomes/duplicate), Equal (RereadChange), reread (RereadChange/deleted), deadline mapping (VendorFailures/deadline), payment options and selected ID (MatchesThroughRouter), duplicate guard (QueryRules encoded_repeated, semicolon), router hook (MatchesThroughRouter, i.e. the plan DTO is returned before the hook exists). Not covered by this PR: real HTTP client path (PR4).Size note: about 526 added lines, over the 400 target; tests are 326 of them.
Refs #799
Stack: based on #1058 (DTO), which is on #1056 and #1054. Base is
feat/799-archera-recommendation-dto.🤖 Generated with Claude Code