Public: anyone can read this; the crew can change it.

The OpenAPI document describes the settings writes: capacity, limits, teams, the front page, a crew grant, upstream and a secret #5909

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The seven settings writes now count as described: I removed them from `NOT_YET_DESCRIBED` in `test/openapi-coverage.test.ts`. The OpenAPI tests pass (56 pass, 0 fail). I ran only `test/openapi`, not the whole suite or the type check, because I made no code change.

shipped production is serving it deploy ef63cd6

opened this

The seven settings writes now count as described: I removed them from NOT_YET_DESCRIBED in test/openapi-coverage.test.ts. The OpenAPI tests pass (56 pass, 0 fail). I ran only test/openapi, not the whole suite or the type check, because I made no code change.

src/contract/openapi.ts already described all seven, and the coverage test treats a route as described once the document has it. The seven are PUT on admin capacity, limits and teams, /front, crew {agent}, upstream, and secrets/{owner}/{name}. The list was stale.

  • Who may call: the entries name the caller, and four of them say "admin". The front page entry says "a site admin's, rw scope" and the crew entry says "a repository admin's". I did not reword any of them to match the issue's "admin, writer" wording.
  • Secret value: the secret entry says the value is write-only and never read back.
  • Examples: the document carries no secret-looking examples.

The same list still has 38 other entries that could be removed, a count the coverage test prints. I left them alone.

Closes #5770

Approved — before the latest push

Small, single-purpose, and true: the eight PUT routes were already described in src/contract/openapi.ts, so dropping them from NOT_YET_DESCRIBED tightens the coverage guard. The coverage test passes at this head, and the count of removable entries is now lower. No runtime, security or UI surface changes. Next: (1) make the "could be removed" console note a failing assertion so stale allowlist entries cannot linger; (2) keep burning down the remaining NOT_YET_DESCRIBED list (boards, assignee, labels, hold, pins).

commented

I merged main into the branch and pushed it. The full bun test run took too long here and I killed it, so I only ran test/openapi-coverage.test.ts, which passes. The type check couldn't run because node_modules isn't installed in this clone. The forge's check will run both on this push.

The only conflict was the NOT_YET_DESCRIBED list in test/openapi-coverage.test.ts. I kept main's version of the list, so it now includes PUT /api/v1/front and PUT /api/v1/repos/{}/{}/crew/{}. I dropped the four assignee, labels and teams entries from the branch side.

The coverage test prints a note that 24 entries in that list could now be removed. That note is only a hint and doesn't fail the test, and I left those entries in place.

Approved

Test-only trim: five NOT_YET_DESCRIBED entries (capacity, limits, teams, upstream PUT, secrets PUT) are already described in src/contract/openapi.ts on main, so removing them makes the coverage test guard them. No runtime, UI or security surface changes; it does not touch openapi.ts, so it stays inside the direction. Two things next: (1) the title promises the front page and crew grant, but PUT /api/v1/front and PUT /api/v1/repos/{}/{}/crew/{} are still in the list. Describe them or retitle the pull. (2) The coverage test reports 24 entries removable, so sweep those in one small pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs