Public: anyone can read this; the crew can change it.
Registry: updates arrive as pulls (#6009) #17127
Check · Review · Land · Live done — Landed and live in production.
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.
-
Reviews
ApprovedReviewed every changed line. No security finding. The GET read uses requireReader. POST, the MCP
updateand the terminaluall go through requireRepoAdmin, and the API and MCP also need an admin-scope token. The branch name is built from registry constants, with the version sanitised. Nothing is merged without a person. The pull is repeat-safe: one branch per item and version, and a closed pull is not offered again. Both doors are present (API, MCP, the terminal screen'sukey), the how-to is in docs/features/app-registry.md and README is untouched. OpenAPI rows and the route-timing allowlist entry are in.Minor, for a fix-forward and not a blocker: (1) the terminal test depends on the earlier test having merged the button pull, so it is order-dependent; (2) the duty module itself has no direct test, only its sweep; (3) the merge is simulated with a SQL UPDATE rather than a real merge.
-
Checks
shipped production is serving it deploy c1c75da
-
History
- Merge remote-tracking branch 'origin/main' into torque/17039-registry-updates-arrive-as-pulls-6009 d7df8e7
- Terminal Capacity screen: say what N checks or crew runs take of the machine (the bridge's room line, slotRoom) (#17124) 9185139
- Production can't read forge.json: the release image doesn't carry it, so check limits fall back to defaults (#17131) 0febd50
- Data: object buckets with price reads and binding to an app secret (#17086) 00243fc
- A runner's red on one or two tests re-runs only those tests here, never the whole check (#17110) dea7ade
- Spike: a tiny Linux computer inside the forge process with unkernel (github.c… (#17126) cd8b6d6
- Automate a review finding as a lint or test: Stray blank line before the closing of the describe block; remove it. (#17104) 6be5e30
- One keymap (c): runs, issues, files and the whole terminal answer the map's keys, one meaning per key at both doors (#17012) 6de23f3
- One page shows my forge's upstream and downstream flows: what I follow, what I offered, what my forks offered me (#17079) 87a7ad4
- Registry updates: describe the two routes in OpenAPI and name the listing in the untimed allowlist (#17039) 8755dd1
- Sentinel: 2 deploy runs wait with no slot being used (#17123) c8785d3
- Protection test covers the crew falling back to Landlock when bwrap is missing (#17125) 6e85472
- runner-adopt: the lease test leaves no check queued, so the next test's claim cannot take it (#17118) c7160ee
- A test's leaked process can no longer hang the gate: a shard's output is cut 5 s after it exits (#17117) bb265f4
- Load highlighter grammars only for the file kind opened; split src/tui/screens/workspace.ts (#17109) 2c7070a
- The fast tier guesses for an unseen file by its importers, and reads no doc through a helper the suite runs (#17111) d4b9f5a
- A release that passed its stay-up watch is not called wrong because the last health probe could not connect (#17103) 763fd5a
- The ten test files that cost pull checks the most seconds each finish in under 30 s, with no test skipped (#17030) d1623ea
- Edges: snapshots as an infra kind, offered before retire (#17094) 8cf0295
- Every cloud's boot config is plain ASCII: strings are written as escaped YAML, and anything else is refused (#17113) 4a4be72
3 earlier comments
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 asmeta.versionin/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/updateslists the items that are behind.POST …/app/registry/updatesopens the pulls and needs a repository admin with an admin-scope token. - MCP:
app_registrytakesaction: "behind"or"update". - Terminal: the Registry items screen shows
version 0 → 1 available, anduopens the pulls. - Duty: an hourly
registry-updatesmaintenance duty makes the same offer for every app, as the person who noted each install. - Docs:
docs/features/app-registry.mdhas 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 }] }.
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:
GETandPOST …/app/registry/updateshad no entry in the contract. I added one row for each undersrc/contract/openapi/routes/and regeneratedindex.ts. That fixes "every JSON route the router serves has an OpenAPI row…". - Untimed list: the
GETlisting is a single indexed read with no page to time. I added it toUNTIMEDintest/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.tsandtest/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.
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.
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.
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 --noEmitis 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
version, served asmeta.versionin/r/<name>.json. All three items start at"1". Bump it whenever an item's files change.registry/<item>-<version>. It writes the item's files whole at their targets, and the default branch is untouched until someone merges.Where it is reachable
GET …/app/registry/updateslists the items that are behind.POST …/app/registry/updatesopens the pulls and needs a repository admin with an admin-scope token.app_registrytakesaction: "behind"or"update".version 0 → 1 available, anduopens the pulls.registry-updatesmaintenance duty makes the same offer for every app, as the person who noted each install.docs/features/app-registry.mdhas a new section describing all of this.Reused:
editFileswithnewBranchandopenPull,pullForBranchandrecordInstalled. The gate noted three similarity matches (registryBehind,reposWithItems,updateBody). They are different reads, so I left them as they are.Not done
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/buttonand{"version":"0"}. ThenPOST …/app/registry/updates, which answers{ updates: [{ item: "button", state: "opened", pull: N }] }.Closes #17039