feat(secrets): reuse named organization secrets across Boxes #3185
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.73) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.73 · 437 lines diff across 5 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.364
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.073
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #3185"
general
weight: 0.35
DorianZheng
TL;DR
Boxes can share a named organization secret, keep an inline secret private to one Box, and use both in the same creation request.
Design #3168 · API and lifecycle documentation
How it works
Save
openaiwithPOST /api/v1/secrets. Create Box A with an inline value and{"secret":"openai"}, then create B with the same named reference. The API resolves each name in the caller's organization and binds the ID to the Box and Runner's single-use fetch credential.| Action | Result |
| --- | --- |
| List with
GET /api/v1/secretsandread:secrets| Each entry contains the immutable ID and name. || Stop and restart A | Its inline and shared credentials remain usable. |
| Destroy A | The cleanup worker removes A's private records. B keeps the shared credential. |
| Delete the shared ID while B exists |
DELETE /api/v1/secrets/{secret_id}returns 409, including while B is stopped. || Delete after B is destroyed | With
write:secrets, the owner gets 204 after Secret Server confirms removal. A repeat request also returns 204. |Both private cleanup and pending organization deletions retry every 30 seconds. A retry uses the original ID, so a replacement with the same name remains usable.
Verification
The design review flagged incomplete source and SDK coverage in its research snapshot. Two concurrent Boxes now exercise opposite-order references in PostgreSQL. The review also recommended separate proof for the earlier orphan recovery change.
Unresolved findings
The rebase push included two commits already on upstream
main. The push audit retained both historical title findings.push@b0cac35:F1— upstreamf0ed993ebusesci:without a scope.push@b0cac35:F2— upstream45e0f1e75has a 104-character title. The repository limit is 72.Rebase audit tracking issue