Repository navigation
fix(api): name the OpenShell Proxy, Gateway and service-account refusals - #3739
Conversation
…als (wip) Finding 2536 slice 4: installation-wide access without the preview opt-in is a 409; gateway registration and version states are 503s that name them; a stored source that breaks a later OpenShell Gateway rule is a 409 naming the replacement, and a tenant-gateway token_url at registration a 400 by field; a service account credential from another Backend is a 409.
# Conflicts: # tests/helpers/refusal-text.mjs
…status text Conformance rows for each new answer; deploy cases for the preview opt-in, the gateway version and a protected source beside installation-wide Git; exact service-account binding texts; a provisioning job refused for installation-wide access names the refusal in its status. Docs: breaking-change notice and the two pages that describe the changed answers.
The newest entry put the breaking-changes page over its word cap, and the earlier 2026-10-24 page is full, so the four later 2026-10-24 entries move to a new page linked from every notices page.
…oke after admission The job re-checks the service account's Backend binding; a mutant that drops ServiceAccountBackendBindingError from the provisioning status pass-through survived because only admission was tested. Also shortens the earlier 2026-10-24 notices intro to stay under the word cap with the new link.
|
🦞👀 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. |
…config refusals static-egress still expected the generic DependencyUnavailableError for a gateway without the protected egress middleware, and sandbox-driver-startup expected registerSource to throw CredentialSourceConfigError, which it now wraps.
# Conflicts: # tests/helpers/refusal-text.mjs
|
Codex review: needs changes before merge. What this changesThis PR gives OpenShell Proxy, Credential Gateway, and service-account refusals specific HTTP statuses and actionable messages. Example: Deploy an Agent using github-installation access without observedHookPreviewWorkspace enabled.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-authored PR addresses concrete diagnostic failures still present on main, with one minor recovery-message defect to correct. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherOCC authorizes credential-source and Agent operations, invokes the selected Drivers, and converts their failures into HTTP responses or durable provisioning status. flowchart TB
Caller[API caller] --> API[Authenticated HTTP API]
API --> OCC[OCC authorization and lifecycle]
Worker[Provisioning worker] --> OCC
OCC --> Drivers[OpenShell and Backend validation]
Drivers --> Errors[Typed refusal errors]
Errors --> API
Errors --> Status[Provisioning status]
Technical reviewBest possible solution: Retain the existing typed-error approach and give the gateway-version refusal a recovery instruction that preserves its required preview setting. Do we have a high-confidence way to reproduce the issue? Main's Driver errors and HTTP mapper establish the reported generic responses; source inspection also establishes the introduced recovery-message defect without executing target code. Is this the best way to solve the issue? Specific error subclasses reuse existing HTTP and worker owners while preserving validation predicates, authorization checks, and registration cleanup behavior. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f6df182455c2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
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, 6:05 AM ET / 10:05 UTC. |
Problem
Finding 2536, slice 4 (the last planned slice). Some OpenShell Credential Proxy, Credential Gateway and service-account refusals still answered with a generic status that hides the fix:
github-installationaccess and noobservedHookPreviewWorkspaceon the Proxy returned a retryable503, but retrying never helps.503text.token_url) answered a generic404. A stored source whosehost/base_url/token_urlno longer meets a gateway rule also answered404on update and attach.409 "already exists".Change
CredentialProxyAdmissionError("installationPreview")(409): names the Installation setting and who changes it. Provisioning status passes it through (same class as the other Proxy admissions).RetryLaterError("proxyRegistration" | "previewGatewayVersion"): still503(operator-fixable live gateway state), now with fixed, ID-free text.registerSourceruns the type's validation with the tenant placement before any gateway write. A failure is a newCredentialSourceRegistrationConfigError(aScopeViolationErrorthat OCC already passes through), which maps to400with/config/<field>, likevalidateSourceConfig.StoredCredentialSourceConfigError(field)(aResourceStateConflictError):409naming the field and the fix (replace the source).ServiceAccountBackendBindingError("noBinding" | "mismatch")(aResourceStateConflictError) replaces the two plain conflicts invalidateServiceAccountBackendBinding. Provisioning status passes it through.gitAlonedeploy refusal, the installation-preview / gateway-version refusals, and the provisioning-status pass-through of a Proxy admission refusal in the PostgreSQL provisioning journey (sharedrepositoryProvisioningFixture/workerFailure). Identical answers for missing and unreadable resources useassertSameAnswer. All texts live intests/helpers/refusal-text.mjs.Not changed, recorded in the finding's site list:
requireRepositoryGitTransport(installed-driver.ts) cannot be reached from a request: a repository Driver exists only whenrepositoryis configured, a Proxy requiresprotecteddelivery, and installation config checks the same thing at startup.dedicatedSandboxstays: it cannot be reached with today's Drivers, but not in every composition provably.deleting; changing that is a contract change (RFC).Verification
gitAlone, both service-account reasons, and both provisioning-status pass-throughs. The service-account pass-through first survived, so a job-level test now moves the ChatGPT Backend's workspace after admission.Risks
503→409,404→400,404→409); covered by the breaking-changes entry. Missing or unreadable resources still answer403/404; every new text is fixed, ID-free and at most 256 characters.validateSourceConfigapplies, plus the tenant placement.