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

Registry: updates arrive as pulls (#6009) #17127

Merged opened this

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

Merged

An app that holds a registry item at an older version than the registry's now gets one update pull. The gate passes (0 failures), bun x tsc --noEmit is clean, and the tests for this change pass, including the dead-code and hollow-work checks. I did not run the full suite; the forge's check does.

Notes

opened this

An app that holds a registry item at an older version than the registry's now gets one update pull. The gate passes (0 failures), bun x tsc --noEmit is clean, and the tests for this change pass, including the dead-code and hollow-work checks. I did not run the full suite; the forge's check does.

How it works

  • Item versions: each registry item has a version, served as meta.version in /r/<name>.json. All three items start at "1". Bump it whenever an item's files change.
  • The pull: one pull per item and version, on a branch named registry/<item>-<version>. It writes the item's files whole at their targets, and the default branch is untouched until someone merges.
  • Repeat offers: a second offer finds the existing pull and reports it instead of opening another. A pull the crew closed is not offered again until the version moves on.
  • After a merge: the next offer sees the merged pull and moves the app's installed-version note to the new version.

Where it is reachable

  • API: GET …/app/registry/updates lists the items that are behind. POST …/app/registry/updates opens the pulls and needs a repository admin with an admin-scope token.
  • MCP: app_registry takes action: "behind" or "update".
  • Terminal: the Registry items screen shows version 0 → 1 available, and u opens the pulls.
  • Duty: an hourly registry-updates maintenance duty makes the same offer for every app, as the person who noted each install.
  • Docs: docs/features/app-registry.md has a new section describing all of this.

Reused: editFiles with newBranch and openPull, pullForBranch and recordInstalled. The gate noted three similarity matches (registryBehind, reposWithItems, updateBody). They are different reads, so I left them as they are.

Not done

  • No merge with local edits: the forge does not keep the text an app installed, so it cannot three-way merge. The app's own edits show in the pull's diff as lines the update would take away, and the pull body says so.
  • No security-fix priority: security fixes do not jump the queue yet.
  • No new screen: I extended the existing Registry items screen, so a commit line says No door: with that reason.

Try: on a preview, note an item at an old version with PUT /api/v1/repos/<owner>/<name>/app/registry/button and {"version":"0"}. Then POST …/app/registry/updates, which answers { updates: [{ item: "button", state: "opened", pull: N }] }.

Closes #17039

3 earlier comments
commented

An app that holds a registry item at an older version than the registry's now gets one update pull. The gate passes (0 failures), bun x tsc --noEmit is clean, and the tests for this change pass, including the dead-code and hollow-work checks. I did not run the full suite; the forge's check does.

How it works

  • Item versions: each registry item has a version, served as meta.version in /r/<name>.json. All three items start at "1". Bump it whenever an item's files change.
  • The pull: one pull per item and version, on a branch named registry/<item>-<version>. It writes the item's files whole at their targets, and the default branch is untouched until someone merges.
  • Repeat offers: a second offer finds the existing pull and reports it instead of opening another. A pull the crew closed is not offered again until the version moves on.
  • After a merge: the next offer sees the merged pull and moves the app's installed-version note to the new version.

Where it is reachable

  • API: GET …/app/registry/updates lists the items that are behind. POST …/app/registry/updates opens the pulls and needs a repository admin with an admin-scope token.
  • MCP: app_registry takes action: "behind" or "update".
  • Terminal: the Registry items screen shows version 0 → 1 available, and u opens the pulls.
  • Duty: an hourly registry-updates maintenance duty makes the same offer for every app, as the person who noted each install.
  • Docs: docs/features/app-registry.md has a new section describing all of this.

Reused: editFiles with newBranch and openPull, pullForBranch and recordInstalled. The gate noted three similarity matches (registryBehind, reposWithItems, updateBody). They are different reads, so I left them as they are.

Not done

  • No merge with local edits: the forge does not keep the text an app installed, so it cannot three-way merge. The app's own edits show in the pull's diff as lines the update would take away, and the pull body says so.
  • No security-fix priority: security fixes do not jump the queue yet.
  • No new screen: I extended the existing Registry items screen, so a commit line says No door: with that reason.

Try: on a preview, note an item at an old version with PUT /api/v1/repos/<owner>/<name>/app/registry/button and {"version":"0"}. Then POST …/app/registry/updates, which answers { updates: [{ item: "button", state: "opened", pull: N }] }.

commented

Two of the four failures came from the new registry-updates routes, and I fixed those. I didn't reproduce the other two, so I can't say why they failed.

  • OpenAPI rows: GET and POST …/app/registry/updates had no entry in the contract. I added one row for each under src/contract/openapi/routes/ and regenerated index.ts. That fixes "every JSON route the router serves has an OpenAPI row…".
  • Untimed list: the GET listing is a single indexed read with no page to time. I added it to UNTIMED in test/route-timing-coverage.test.ts, with the reason. That fixes "no GET route answers 200 without a session phase…". Adding the entry is a change to the test's allowlist, not to the check.
  • Not reproduced: I ran test/fork-follow-history.test.ts and test/limits.test.ts, which hold the other two failing tests ("the last ten follows…" and "every change is kept with who made it and when"). Both passed, and nothing in this pull touches follows or limits. I'm treating them as flaky, but the next check run will show whether they come back.

After the fix, the OpenAPI and route-timing tests pass, and tsc --noEmit is clean. I ran the gate's --fix, which had nothing to rewrap. I did not run the full suite, so the forge's check on this push is the full run.

For the pull description: an app that holds a registry item behind the registry now gets one pull for it. This works from the API, MCP, the terminal's Registry items screen and an hourly maintenance duty. POST /api/v1/repos/<owner>/<name>/app/registry/updates opens the pulls, and GET on the same path lists what is behind. To try it on the preview, note an item at version 0 with PUT …/app/registry/button, then call the POST. The how-to is in docs/features/app-registry.md.

commented

I'm pushing nothing. No check of the head is recorded as failed, and I found no defect in the pull.

The last real failure was on commit 643d630cd. I fixed the two failures that came from this pull in 8755dd1b9. The pull's new routes were missing OpenAPI rows, and the untimed allowlist didn't name the new GET listing. After that fix, test/openapi-covers-routes.test.ts, test/route-timing-coverage.test.ts and test/openapi-routes.test.ts passed, and tsc --noEmit was clean. I did not re-run the full suite.

The other two failures from that run were "the last ten follows, newest first…" and "every change is kept with who made it and when". They passed when I ran them alone, and nothing in this pull touches follows or limits. If either comes back red on the new check, send me its assertion and I'll look.

What the pull does: an app that holds a registry item behind the registry now gets one pull for it. This works from the API, MCP, the terminal's Registry items screen and an hourly maintenance duty.

What I chose not to do: I added no new terminal screen. The existing Registry items screen opens the pulls with u, and docs/features/app-registry.md is the how-to.

How to try it: on the preview, note an item at version 0 with PUT /api/v1/repos/<owner>/<name>/app/registry/button. Then GET …/app/registry/updates lists what is behind, and POST on the same path opens one pull for each.

commented

I merged main into the branch and pushed it as d7df8e735. Git reported no conflicts in docs/features/infra.md or src/http/mcp/tools/infra.ts, so I resolved nothing by hand.

After the merge, tsc --noEmit is clean. These suites pass: registry-updates, app-registry, app-registry-doors, openapi-covers-routes and route-timing-coverage. I did not run the full suite, so the forge's check on this push is the full run.

bun scripts/gate.ts --fix printed three notes about near-duplicate code: registryBehind, reposWithItems and updateBody. They are similarity hints and left nothing to commit; the earlier check on this pull was green with the same code. Any of them would be worth a look in review.

What the pull does: an app that holds a registry item behind the registry now gets one pull for it. This works from the API, MCP, the terminal's Registry items screen and an hourly maintenance duty. The two new routes, GET and POST …/app/registry/updates, are described in OpenAPI.

What I chose not to do: I added no new terminal screen. The existing Registry items screen opens the pulls with u, and docs/features/app-registry.md is the how-to.

How to try it: on the preview, note an item at version 0 with PUT /api/v1/repos/<owner>/<name>/app/registry/button. Then GET …/app/registry/updates lists what is behind, and POST on the same path opens one pull for each.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs