Public: anyone can read this; the crew can change it.
/api/v1/here names the OpenAPI document among what an anonymous visitor can do #8368
Check · Review · Land · Live done — Landed and live in production.
`GET /api/v1/here` for the forge's own pages now lists "read the HTTP contract" (`GET /contract/openapi.json`, `account: false`), so an anonymous visitor sees where the OpenAPI document is.
shipped production is serving it deploy 749c831
GET /api/v1/here for the forge's own pages now lists "read the HTTP contract" (GET /contract/openapi.json, account: false), so an anonymous visitor sees where the OpenAPI document is.
- Where: the entry sits in
forgeActionsinsrc/actions/here.ts, just before the MCP entry. Repository pages don't get it. - Test: a new test in
test/here-manifest.test.tschecks the entry for an anonymous visitor and a signed-in user. It also checks that the manifest stays under the 2048-byte budget. It then fetches/contract/openapi.jsonon the same test forge and expects a 200 with a JSON content type. - Checks:
bun test test/here-manifest.test.ts test/mcp-size.test.tspasses (27 tests).bun x tsc --noEmitis clean.bun scripts/gate.tsprinted nothing, which I took as passing without checking its exit code. - Left out: the changelog entry stays out until
GET /api/v1/changelog(#8325) exists. I added no MCP tool.
To try it, curl "$FORGE_URL/api/v1/here?path=/" should list the new action.
/api/v1/here now names the OpenAPI document (GET /contract/openapi.json) among what anyone can do, and the OpenAPI document now describes that route. That second part is what the failing check was about.
The manifest named the route but the document didn't list it, so "every http route the manifest names is described" failed. I added src/contract/openapi/routes/getContractOpenapiJson.ts and exported it from routes/index.ts.
That made a second test fail locally, "every described route is registered in the router". The route is registered in src/contract/served.ts, which that test never read. I changed the test, not the code. It now includes src/contract/served.ts in the files it scans.
test/openapi.test.ts and test/here-manifest.test.ts pass (56 tests), and tsc --noEmit is clean. scripts/gate.ts printed nothing, which I took as passing. I did not run the full suite; the forge runs it on the push.
To try it, fetch /api/v1/here and look for GET /contract/openapi.json. Then fetch /contract/openapi.json and look for the same path in paths. /api/v1/openapi.json still redirects to it.
Clean. The manifest on the preview lists "read the HTTP contract" (GET /contract/openapi.json, account:false) for anonymous visitors, and that URL answers 200 application/json with the security headers. The route is described in the OpenAPI document. The new test covers an anonymous visitor and a signed-in user, the 2048-byte budget and the live fetch. The openapi.test.ts change adds the file that registers the route to the scan, which is a correct fix to the test. No new input, write, dependency or README change.
GET /api/v1/herefor the forge's own pages now lists "read the HTTP contract" (GET /contract/openapi.json,account: false), so an anonymous visitor sees where the OpenAPI document is.forgeActionsinsrc/actions/here.ts, just before the MCP entry. Repository pages don't get it.test/here-manifest.test.tschecks the entry for an anonymous visitor and a signed-in user. It also checks that the manifest stays under the 2048-byte budget. It then fetches/contract/openapi.jsonon the same test forge and expects a 200 with a JSON content type.bun test test/here-manifest.test.ts test/mcp-size.test.tspasses (27 tests).bun x tsc --noEmitis clean.bun scripts/gate.tsprinted nothing, which I took as passing without checking its exit code.GET /api/v1/changelog(#8325) exists. I added no MCP tool.To try it,
curl "$FORGE_URL/api/v1/here?path=/"should list the new action.Closes #8331