Skip to content

Require org_slug on POST /v1/apps (match real Fly) — v0.3.1#53

Merged
lex00 merged 2 commits into
mainfrom
fix/require-org-slug-v0.3.1
Jul 12, 2026
Merged

Require org_slug on POST /v1/apps (match real Fly) — v0.3.1#53
lex00 merged 2 commits into
mainfrom
fix/require-org-slug-v0.3.1

Conversation

@lex00

@lex00 lex00 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Fidelity fix found by testing chant's fly lexicon against real Fly: POST /v1/apps on real Fly rejects a request without org_slug (HTTP 400 "authorization: request doesn't contain org_slug"), but mudflaps accepted it (201). That let a plan which would fail on real Fly pass offline — false confidence.

Fix

createApp now returns 400 with the exact real-Fly error when org_slug is empty. Updated the 8 test call sites that created apps without an org, and added a negative test (TestCreateAppRequiresOrgSlug).

Verify

go build/vet/test/-race green; golangci-lint v2.12.2 0 issues. Live: POST /v1/apps {"app_name":"x"} → 400 (org_slug error); with org_slug → 201.

Cuts as v0.3.1.

🤖 Generated with Claude Code

lex00 and others added 2 commits July 11, 2026 22:28
Real Fly rejects app creation without org_slug with HTTP 400
("authorization: request doesn't contain org_slug"). mudflaps only
checked app_name and returned 201, letting a plan that would fail
against Fly pass offline. Enforce org_slug in the createApp handler
with the exact real-Fly error string.

Tests: add OrgSlug to every CreateAppRequest HTTP call site and a
negative test asserting 400 + an org_slug error body.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00
lex00 merged commit 0c111a9 into main Jul 12, 2026
2 checks passed
@lex00
lex00 deleted the fix/require-org-slug-v0.3.1 branch July 12, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant