acme: add Client.FinalizeOrder #11
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 206 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.319
Real PR Conversation Timeline
1 comments
"Review active on #11"
general
weight: 0.35
wallrj
This adds
Client.FinalizeOrder(ctx, order, csr) (*Order, error)to theacmepackage. It sends the ACME finalize request and returns the order from the CA's response. It does not wait for the certificate.cert-manager needs this for cert-manager/cert-manager#9629.
CreateCertFromOrderwaits inWaitOrderafter it finalizes, so an Order controller worker is held for as long as the CA takes to issue.This is a temporary patch. I have proposed the same method upstream in golang/go#83285. We should remove this patch when upstream has the method.
What changes
FinalizeOrderis new. It validates the order asCreateCertFromOrderdoes.CreateCertFromOrdercallsFinalizeOrder, andCreateOrderCertcalls the same internal function. They send the same requests as before.FinalizeOrderretries 5xx and 429 responses as described inClient.RetryBackoff, like every other request. The doc tells callers to set a context deadline.RetryAfterset, becauseresponseOrderalready reads theRetry-Afterheader. The new test checks this.How to merge
Please merge with a merge commit, not squash or rebase. The cert-manager PR that uses this will pin commit 22d315d8a1784ae070b7935af80bfeaf5870dc83 in
third_party/klone.yaml, and that commit must stay reachable frommaster.<details>
<summary>How this was tested</summary>
go vet ./acmepasses.go test ./acme/...passes, including the existingCreateOrderCertandCreateCertFromOrdertests, unchanged.TestRFC_FinalizeOrderfails ifFinalizeOrderpolls the order.</details>
[Claude Fable 5.2]