P27 #156
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.47) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 481 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.370
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #156"
general
weight: 0.35
abendrothj
What and why
Closes #47 (P27 in
docs/V1_PLAN.md: access-request approval converges after a partial failure, and never fails open).resolve_access_requestmarked a request Approved before it looked up the listing and minted the grant and budget. If one of those later steps failed (a registry error, 502), the retry got 404, becauseresolveonly acts on Pending requests. The request stayed Approved with no grant, and the comment saying retries converge was wrong.CatalogRegistry::list_requests_for, filtered to the calling steward and Approved status, so the trait doesn't change.resolvefailed afterwards.GrantRegistry::createun-revokes), the same as a direct re-grant. Only the request's steward can do it.resolve_access_request, theCatalogRegistry::resolvedoc, the Catalog paragraph indocs/ARCHITECTURE.md, and aCHANGELOG.mdentry under Fixed. This lands before P61, so its conformance suite can pick up theresolvecontract.<!-- What changed, and why. Link the issue or the step in docs/PROJECT_SCOPE.md. -->
How it was tested
New tests in
backend/crates/platform-api/tests/research_api.rs, using stores that fail one call once (FailFirstOpenbudget ledger,FailFirstCreategrant registry):approval_retried_after_a_budget_failure_converges: budgetopenfails → 502; the request lists as approved; a research query → 429 (the grant has no ledger entry); the retry → 200 with an active grant funded with the listing's budget (25); a query → 200 with 24 remaining.deny_after_a_failed_approval_is_refused: grantcreatefails → 502; deny → 404; the steward has no grants and a research query → 403; the retry → 200 and queries work.approval_retry_by_a_non_steward_is_404: once the request is approved, approving it as the researcher, as another tenant, or with an unknown id → 404; the steward's own retry → 200.approving_a_denied_request_is_404: deny, then approve → 404, and a research query → 403.The
catalog.rsunit testrequest_lifecycle_pending_idempotent_and_resolutionnow also checks that approving an Approved request again returnsNonewhile the request still lists as Approved for its steward. The retry relies on that contract.Failure paths covered: grant-registry failure, budget-ledger failure, deny after a failed approval, retry by a non-steward or with an unknown id, approve after deny.
<!-- Tests added or changed. Name the failure paths covered. -->
Checklist
scripts/check.shpasses locallySECURITY_AUDIT_EVENTcovered byaudit_coverage.rsdocs/DATA_POLICY.md)CHANGELOG.mdupdated for user-visible changesdocs/adr/if one was made