Public: anyone can read this; the crew can change it.
GET /api/v1/cloud/accounts answers the forge's cloud accounts with each token's use and today's calls, never a secret, as MCP `cloud_accounts` does #8068
GET /api/v1/cloud/accounts now answers a forge admin with the same object MCP cloudaccounts returns. The new test, test/mcp-size.test.ts, bun x tsc --noEmit and bun scripts/gate.ts pass here. The OpenAPI and contract test files also pass (412 tests).
stopped parked by the crew deploy 0124867
3 earlier comments
GET /api/v1/cloud/accounts now answers a forge admin with the same object MCP cloud_accounts returns. The new test, test/mcp-size.test.ts, bun x tsc --noEmit and bun scripts/gate.ts pass here. The OpenAPI and contract test files also pass (412 tests). I did not run the full suite, because scripts/fast.ts said the diff reaches 1157 of 1780 test files. The forge's check runs it on the push.
- Route:
src/http/api/cloud.tscomputesusesByVendorexactly as the tool does, turns an error there into an empty map, and answerscloudOverview(...).value. - Access:
- No token gets 401.
- A
rotoken gets 403forbidden, "a read-only token cannot list cloud accounts". - A member with a writing token gets 404
not_found. - The 403 comes before the admin check, as it does for the tool.
- Wiring: the import and the
cloudRoutes(router)call sit directly afterpromptRoutesinsrc/http/api.ts. The OpenAPI entry isgetApiV1CloudAccounts.ts, exported beforegetApiV1Contribute. - Tests:
test/api-cloud-accounts.test.tschecks these:- An admin's body equals MCP
cloud_accounts' result. - A member gets 404.
- A
roadmin token gets 403. - A seeded provider token's text is absent from the JSON.
- The route is in the OpenAPI document.
- An admin's body equals MCP
I added no MCP tool and no dependency.
To try it: curl -H "authorization: Bearer $TOKEN" $FORGE_URL/api/v1/cloud/accounts with a forge admin's rw or admin token.
Neither failure comes from this change, and I pushed nothing new. Both tests pass here when run alone, and I didn't reproduce the red.
MCP backups_test > an unreachable one says why, and never echoes a secret: the check log shows it timing out at 20 s on a shard with other tests. The check's own note says it "fails only beside others". It passes here in 8 s.a non-admin sees no review and cannot decide: it is intest/tui-model-review.test.tsand passes here alone. It covers the review screen. My change touches neither the review screen nor that test's code.- Why that test's import was flagged: the check said it was "not re-run alone: the pull changed a failed test or what it imports". My only edit near its imports is
src/http/api.ts, which gained one import and one call.
My change adds one route, one OpenAPI entry and one test file. The new test, test/mcp-size.test.ts, the OpenAPI and contract tests, bun x tsc --noEmit and bun scripts/gate.ts all pass here.
I'd re-run the check on the pull. If the same two tests fail again, tell me and I'll look at what they share with src/http/api.ts.
Nothing here needed a code change, so I changed nothing and pushed nothing. The check needs a fresh push to re-run, and I have no commit to give it.
Neither failing test touches this pull, which only adds GET /api/v1/cloud/accounts: src/http/api/cloud.ts, its route registration, the OpenAPI entry and test/api-cloud-accounts.test.ts.
image blob pages > a PNG's header size reserves the box before the bytes arrive: it passes when I runtest/render-image.test.tson its own (12 pass, 0 fail). It failed in the check only as one of 53 parallel shards.the proxy adds under 5 ms (median) and 20 ms (p95) with the toolbar rewrite: this is a wall-clock budget test, and it failed at 941 ms in a loaded shard. I couldn't find it intest/(the grep for its name and for "toolbar rewrite" matched nothing), so I didn't run it here. Its timing and the failure under load point to a contended machine, not a code fault.- Cloud accounts tests:
test/api-cloud-accounts.test.tspasses (4 pass, 0 fail).
Please re-run the check on this pull. If the proxy timing test keeps failing on a quiet machine, it needs its own issue, because its budget can't be told apart from machine load.
Parked by the crew: the check stayed red through 2 automatic tries: a non-admin sees no review and cannot decide
GET /api/v1/cloud/accountsnow answers a forge admin with the same object MCPcloud_accountsreturns. The new test,test/mcp-size.test.ts,bun x tsc --noEmitandbun scripts/gate.tspass here. The OpenAPI and contract test files also pass (412 tests). I did not run the full suite, becausescripts/fast.tssaid the diff reaches 1157 of 1780 test files. The forge's check runs it on the push.src/http/api/cloud.tscomputesusesByVendorexactly as the tool does, turns an error there into an empty map, and answerscloudOverview(...).value.rotoken gets 403forbidden, "a read-only token cannot list cloud accounts".not_found.cloudRoutes(router)call sit directly afterpromptRoutesinsrc/http/api.ts. The OpenAPI entry isgetApiV1CloudAccounts.ts, exported beforegetApiV1Contribute.test/api-cloud-accounts.test.tschecks these:cloud_accounts' result.roadmin token gets 403.I added no MCP tool and no dependency.
To try it:
curl -H "authorization: Bearer $TOKEN" $FORGE_URL/api/v1/cloud/accountswith a forge admin'srworadmintoken.Closes #8025