Repository navigation
fix(api): name saved repository, Credential Proxy deploy and protected source refusals - #3732
Conversation
… refusals Finding 2536, slice 2. Saved repository selections the policy no longer approves answer 409 (the request sent none); provisioning status passes the fixed repository and Credential Proxy texts through; protected deploy admission, protected source update/rotate and the delete fence and device login 503s name what blocks and what to do.
# Conflicts: # tests/integration/postgres-agent-provisioning.test.mjs
…e refusals Breaking-changes notice for the status changes (saved selections 400 -> 409, Credential Proxy deploy admission 503/404 -> 409, protected source update and rotate 404 -> 409), with the oldest notice moved to the earlier page to stay under the word cap. Reference and guide pages name the new answers. Tests: the postgres provisioning file shares one repository policy helper; the protected source rotate check sends no body.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
The withdrawal test deployed two protected sources on a Proxy without policy reduction and expected the old generic 404; deploy now answers 409 RESOURCE_CONFLICT with the CredentialProxyAdmissionError text.
|
Codex review: needs maintainer review before merge. What this changesThis PR gives saved repository, protected deployment, credential-source, and device-login refusals specific status codes and recovery messages. Example: Deploy an Agent saved with repository project and profile git-write after Namespace policy permits only git-read.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes misleading refusals still present on main, and no actionable introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherOCC authorizes resource operations and checks admission; typed errors leave through the controller's HTTP mapper or the durable provisioning status. flowchart LR
Request[API request] --> IAM[Exact operation authorization]
IAM --> OCC[OCC admission]
OCC --> Mapper[HTTP error mapper]
Mapper --> Response[Status and recovery message]
OCC --> Worker[Provisioning worker]
Worker --> Status[Provisioning status]
Technical reviewBest possible solution: Land the focused typed-refusal repair with its documented status changes and existing authorization, cleanup, and resource-concealment boundaries preserved. Do we have a high-confidence way to reproduce the issue? Current-main source shows the affected refusals reaching generic HTTP mappings or request-error classification; focused regression and mutation results are reported, but this read-only review ran no target code. Is this the best way to solve the issue? Typed fixed messages and explicit request-versus-saved origins repair the existing owners without globally exposing arbitrary errors or adding a parallel admission path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 80ee1d538b7b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 26, 2026, 3:10 AM ET / 07:10 UTC. |
Problem
Finding 2536, second slice (first slice: #3725). Several refusals still reached clients as the generic
404 NOT_FOUND,409 ...already existsor a retryable503, although the caller could already read the resource and the cause was a rule they can act on:400on deploy and onGET .../repository-approval-scopes, as if the request had sent them (review of fix(api): name repository, standing approval and credential source field refusals #3725, nit 1).Agent provisioning could not complete.for fixed, ID-free repository refusals (nit 2).503(retry later) for Installation configuration that never changes by retrying, and404for plan shapes the Proxy cannot serve.404for a source the caller had just read.A required platform dependency is unavailable.Change
SavedRepositorySelectionError(409): stored-state callers (deploy, standing-approval scope read, Agent update approving, provisioning worker plan, repository credential admission) resolve withorigin: "saved". Request-sent selections keep the400from fix(api): name repository, standing approval and credential source field refusals #3725. Text:The saved repository selections are no longer approved for this Namespace: repository policy changed after they were saved. Choose approved ones from the repository options, or ask an Installation administrator to approve them again.ComputeRepositoryCredentialsUnsupportedError(409, the fix(api): name repository, standing approval and credential source field refusals #3725 text as a class), andprovisioningFailureMessagepasses it,RepositoryBindingSelectionError,SavedRepositorySelectionErrorandCredentialProxyAdmissionErrorthrough to the job status (precedentRepositoryDriverNotConfiguredError; all fixed texts that name no resource).CredentialProxyAdmissionError(409) for the five Credential Proxy plan refusals inadmitProxyPlan(Installation-wide access without a Proxy, Proxy sources without a selected Proxy, several sources without policy reduction, no Sandbox Driver, other sources beside repository Git). Each names the Installation rule and the fix, for example:Installation-wide repository access (profile github-installation) needs a Credential Proxy, and this Installation selects none. Choose another repository profile, or ask an Installation administrator to select drivers.credential_proxy.A live-adopted source without aprovider/modeldefault becomes a400namingagents.defaults.model.409 RESOURCE_CONFLICT,...create a new source, bind it in place of this one, then delete this one.RetryLaterError(aDependencyUnavailableError, still503, message passed verbatim):Retry the deletion in 70 seconds; nothing else needs to change.andThe sign-in service did not complete this device login, so it was cancelled. Start a new device login. ...409.Every retyped site throws only after the caller's grant and lookup succeed; plain
ScopeViolationErrorstays the generic404, so missing and unreadable resources still answer alike. The full site list, with what stays generic and why, is kept outside this repository; left for a follow-up are credential source create refusals and the Compute protected-execution admission catch-all (it swallows the Driver's reason). The Kubernetes Computealready existsfamily never reaches the HTTP mapper as409(runtime credential, log and diagnostic calls are wrapped), so it is not retyped here.Verification
tests/helpers/refusal-text.mjs: saved selections on deploy and approval scopes (409), the installation-access Credential Proxy deploy (409, no revision), provisioning status for the Compute and saved-selection refusals (postgres), protected source update and rotate (postgres), the fence seconds (70 seconds, then1 second), and the device-login poll.400: deploy and approval-scope tests fail;503: the installation-access deploy test fails;409against403);503against403).404for the one-source refusal; it now asserts the409text, pinned 20/20 the same way.tsc --build(sources and tests), eslint on touched files and prettier on touched docs and tests are clean.Risks
400for saved selections, or503/404for these deploy and protected-source refusals, see409/400. The breaking-changes notice lists each.PROVISIONING_REJECTED) instead of retrying them; they could not succeed without an Installation change.