The dashboard offers to create an organisation the binary does not serve #2150

Closed
opened 2026-11-27 08:39:18 +00:00 by sam · 1 comment
Owner

Why: NewOrgDialog (ui/src/org/NewOrgDialog.vue) calls POST /api/orgs through api.orgCreate, and the binary serves only GET /api/orgs. The organisations page also offers the dialog, so the button fails against archie. ui/test/api-paths.test.ts missed it because it compares paths, not methods.

Exposure: every operator who opens Settings, Organisations and presses create.

Done when: the page offers only what the binary serves (the binary resolves one organisation per deployment from the credential, and GET /api/orgs returns exactly it), or the binary gains the operation, and the conformance test compares the method as well as the path so the next one fails the gate.

**Why**: `NewOrgDialog` (ui/src/org/NewOrgDialog.vue) calls `POST /api/orgs` through `api.orgCreate`, and the binary serves only `GET /api/orgs`. The organisations page also offers the dialog, so the button fails against `archie`. `ui/test/api-paths.test.ts` missed it because it compares paths, not methods. **Exposure**: every operator who opens Settings, Organisations and presses create. **Done when**: the page offers only what the binary serves (the binary resolves one organisation per deployment from the credential, and `GET /api/orgs` returns exactly it), or the binary gains the operation, and the conformance test compares the method as well as the path so the next one fails the gate.
sam added the bugmedium labels 2026-11-27 08:39:20 +00:00
Author
Owner

Fixed in bf17e2471.

NewOrgDialog and api.orgCreate are gone; the organisations page lists the organisation the binary resolves (one per deployment, from the credential) and no longer offers to create another. That is the same shape the page already had for everything else on it: reads through GET /api/orgs, no writes the binary has no operation for.

The conformance test now compares methods: ui/test/api-paths.test.ts reads each request(...)/send(...) call in the client, takes the method: that call asks for (GET when it names none) and normalises the path the same way the OpenAPI document does, so POST /api/orgs fails against a document that serves only GET there. Proved by putting the call back: the test then fails with POST /api/orgs, and passes once removed.

task check passes on a clean worktree at the commit.

Fixed in bf17e2471. `NewOrgDialog` and `api.orgCreate` are gone; the organisations page lists the organisation the binary resolves (one per deployment, from the credential) and no longer offers to create another. That is the same shape the page already had for everything else on it: reads through `GET /api/orgs`, no writes the binary has no operation for. The conformance test now compares methods: `ui/test/api-paths.test.ts` reads each `request(...)`/`send(...)` call in the client, takes the `method:` that call asks for (GET when it names none) and normalises the path the same way the OpenAPI document does, so `POST /api/orgs` fails against a document that serves only GET there. Proved by putting the call back: the test then fails with `POST /api/orgs`, and passes once removed. `task check` passes on a clean worktree at the commit.
sam closed this issue 2026-11-27 08:41:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#2150