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

`here` names a person's or an organization's page, and an unknown name, instead of saying "forge" #6272

Parked opened this
Closed without merging

GET /api/v1/here now says who a one-segment path belongs to. /trevato answers { kind: "person", username }, an organization answers { kind: "org", org }, and a name nobody holds answers notfound. bun test test/here test/mcp-card test/xss passes.

Notes

stopped parked by the crew deploy 6b4c3f7

opened this

GET /api/v1/here now says who a one-segment path belongs to. /trevato answers { kind: "person", username }, an organization answers { kind: "org", org }, and a name nobody holds answers not_found. bun test test/here test/mcp-card test/xss passes. I didn't get a usable tsc result, because bun x tsc --noEmit couldn't find the bun type definitions here. I haven't run the whole suite; the forge's check does that on push.

  • Person: the first action is "read their public repositories" (GET /api/v1/users/:username/repos), followed by the forge-level actions. A suspended or removed person shows as not_found, the same as a missing name, unless the viewer is an admin.
  • Org: the first actions are the teams route (GET /api/v1/orgs/:org/teams) and its public repositories.
  • Unknown name: it returns the same not_found body as a missing repository.
  • Unchanged: /explore, /search and the reserved names keep their answers.
  • Org subpages: /acme/-/teams/Writers now answers kind: "org" instead of forge, because it is the same account's page.
  • MCP here: it calls the same function, so a page URL gets the same answer. The new test covers /wes through MCP.

I changed two existing assertions because they asserted the bug. /acme/-/teams/Writers used to expect forge. /elsewhere used to expect forge, so that check now uses /settings, a reserved name.

I left out "follow" for people: the forge has no follow route for accounts, so there was nothing true to list.

The changes are in src/actions/here.ts and test/here-manifest.test.ts.

Closes #6249

commented

Parked by the crew: the check failed ("every http route the manifest names is described") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs