Repository navigation
fix(coolify)!: type database responses, environment uuids and the errors alchemy's provider hits - #1497
Draft
jensdev wants to merge 1 commit into
Draft
fix(coolify)!: type database responses, environment uuids and the errors alchemy's provider hits#1497jensdev wants to merge 1 commit into
jensdev wants to merge 1 commit into
Conversation
…ors alchemy's provider hits
- Environment gains `uuid`.
- App, database and service creates need environment_name or environment_uuid, not both.
- GET /databases and /databases/{uuid} return database models (spec: string); POST /databases/<engine> returns {uuid, internal_db_url, external_db_url} (spec: no body).
- Env var values, database passwords and connection URLs are sensitive.
- ApplicationBuildPack gains `dockerimage`.
- Typed ProjectHasResources, EnvironmentHasResources, EnvironmentVariableAlreadyExists, Conflict on PATCH /databases/{uuid}.
- CoolifyServiceErrors gains TokenScopeForbidden, ActionNotAuthorized and CoolifyHostRequiresAdmin (403s observed live).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Corrects the Coolify SDK where the spec disagrees with the API, for the new alchemy Coolify provider (companion PR linked below). Six patches and three service errors:
environment-uuid:Environmentgainsuuid.environment-selector-optional: app, database and service creates requireenvironment_nameorenvironment_uuid, not both.database-responses:getDatabase/listDatabasesreturn database models (the spec saysstring).createDatabase<Engine>returns{ uuid, internal_db_url?, external_db_url? }(the spec says no body). Connection URLs and passwords are sensitive.env-sensitive:EnvironmentVariable.value/real_valueare sensitive.build-pack-dockerimage:ApplicationBuildPackgainsdockerimage.errors:ProjectHasResources/EnvironmentHasResources(400) on deletes,EnvironmentVariableAlreadyExists(409) on env creates,ConflictonupdateDatabaseByUuid.CoolifyServiceErrorsgainsTokenScopeForbidden,ActionNotAuthorizedandCoolifyHostRequiresAdmin, three 403s any operation can return, matched by message (rule 1).Breaking (rule 11): response types change, and operations gain error types.
The failing call
Live, against Coolify v4.7.6 on 2026-11-24, with a token limited to one project:
Operation:
listServers/listTagsRequest:
GET /api/v1/serversResponse:
403 {"message":"This API token is limited to selected projects, environments, or resources, so it cannot use this endpoint."}Operation:
createProjectRequest:
POST /api/v1/projects {"name":"alchemy-scope-probe"}Response:
403 {"message":"You are not authorized to perform this action."}Operation:
createDatabasePostgresqlRequest:
POST /api/v1/databases/postgresqlwithserver_uuidof the server running CoolifyResponse:
403 {"message":"Only an admin can place resources on the server that runs Coolify."}Operation:
createEnvironment/getEnvironmentByNameOrUuidResponse:
201 {"uuid":"…"}, then the environment with itsuuid, which the spec'sEnvironmentlacks.For the other patches, the evidence is Coolify's own API code at coollabsio/coolify
main@ 5c987814 (each patch'sdescriptionnames the file):DatabasesController::database_by_uuid/databasesserialize the models.createdDatabasePayloadreturnsuuid/internal_db_url/external_db_urlwith 201.ProjectController::delete_project/delete_environmentreturn 400 "… has resources, so it cannot be deleted."create_envreturns 409 "Environment variable already exists. Use PATCH request to update it."create_applicationsetsbuild_pack = 'dockerimage', and returns 422 "You need to provide at least one of environment_name or environment_uuid."pnpm patches:audit coolify: 6 files, 6 needed.Checklist
!in the title, for examplefix(axiom)!: redact API tokens(rule 11)pnpm generate <pkg>output and itsdistilled.generatedAtstamp (rule 12)pnpm lintpasses, and any lint-disable comment has its reason in this body (rule 4)Note
This comment was left by an agent on behalf of @jensdev
model: opus 5.5
harness: Claude Code 2.1.329
As an agent I have read the CONTRIBUTING.md and AGENTS.md and understand the risks of getting @jensdev flagged as untrustworthy if I regularly violate the outlined rules