Public: anyone can read this; the crew can change it.
Packs come from the forge: each app is a forge mirror, each pack is a forge repo #10455
Packs now come from the forge, but only part of the issue is done. The live forge has no packs/ mirrors or marked packs yet, so /packs will be empty until the owner sets those up. bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/design-lint.ts and the new and changed pack tests pass.
stopped parked by the crew
3 earlier comments
Packs now come from the forge, but only part of the issue is done. The live forge has no packs/* mirrors or marked packs yet, so /packs will be empty until the owner sets those up. bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/design-lint.ts and the new and changed pack tests pass. I did not run the full suite or pack-compat, which fetches the live packs forge. A scaffolded-app typecheck test failed in this sandbox, and it fails the same way on the base branch.
Done
- Pack format.
pack.jsonapps now givesource: "packs/2048", a forge repo. A URL is refused. /packsand marking./packs, the home presses and the terminal screen read the repos the admin marked, from a newpack_repotable. The migration is pinned.
- Marking. PUT and DELETE /api/v1/repos/:owner/:name/pack mark and unmark, admin only (everyone else gets 404), for public repos whose pack.json name matches the repo name. A refresh job re-reads each marked pack hourly. If the file breaks, the pack keeps its last good text.
- Reading. GET /api/v1/packs and /api/v1/packs/:name list them.
- Source tree.
packs/and the DockerfileCOPY packsare gone. The two old packs are kept as fixtures intest/fixtures/packs/; those are the texts to commit intopacks/gamesandpacks/business. - Deploy.
deployPackforks each app from its forge mirror into the person's account with lineage, then absorbs it if the pack asks. Re-running keeps what exists.
- No mirrors on the target. If the target forge has no mirror, as with pack up on a new machine, it makes the app and clones history from the packs forge (FORGE_PACKS_URL, default https://forge.open-platform.sh), never from GitHub.
- Test. test/packs-forge.test.ts deploys with github.com refused and checks that no request leaves for GitHub. It also checks that the fork's parent is the mirror.
/packs/<name>path clash.packsis also the owner of the mirrors, so/packs/<name>is the pack page when that pack is listed and the repo page otherwise.- Docs.
docs/features/packs.mdis updated.
Not done
- Bringing in the five upstreams as
packs/*mirrors and markingpacks/gamesandpacks/businesson the live forge. This is an owner step using the existing origin mirrors, which already re-sync on their schedule.packsis a reserved username, so the account has to be made by an admin. - Showing licence and original authors on a mirror's repo page.
- A new account is blocked from forking by the forge's existing new-account cooldown, so a brand-new person's deploy hits a 403 until it passes. I left that rule alone.
How to try it
- As an admin, make a public repo
packs/gameswith apack.jsonwhose name isgames. PUT /api/v1/repos/packs/games/packwith an admin token.- Open
/packs, then/api/v1/packs. - Deploy from a signed-in account with
FORGE_URL=… FORGE_TOKEN=… bun scripts/pack.ts deploy games.
🤖 Generated with Claude Code
I added an empty commit with the missing line and pushed it. The gate check failed because the pull adds src/http/api/packs.ts and no commit message gave a reason for it. The commit carries this line:
Why now: apps fork from forge mirrors, so the pack list must be readable before any app can be created from a pack.
I ran bun scripts/gate.ts before pushing and it printed no error. The code is unchanged, so I did not re-run the type check or the tests.
The pull still needs the forge's check to pass again on the new push.
I fixed two of the three failing checks and pushed. I couldn't reproduce the third (the unreached-modules test), and I haven't seen the forge's check on this push yet.
- OpenAPI coverage: I added OpenAPI rows for the four pack routes:
GET /api/v1/packs,GET /api/v1/packs/{name},PUT /api/v1/repos/{owner}/{name}/packandDELETE /api/v1/repos/{owner}/{name}/pack. I regeneratedsrc/contract/openapi/routes/index.tswithbun scripts/openapi-routes.ts. - Session phase:
GET /api/v1/packsanswers 200 without a session phase, so I added it toUNTIMEDintest/route-timing-coverage.test.ts. It is a public list read by one indexed query with no page to phase. The reason is written beside the entry. - Unreached modules:
test/unreached.test.tspasses here, and every unreached file is already on the allowlist. A cause I haven't found would show up in the forge's check log.
Locally the OpenAPI, route-timing and unreached tests, scripts/gate.ts and tsc --noEmit pass. I did not run the full suite.
Parked by the crew: the check stayed red through 2 automatic tries
Packs now come from the forge, but only part of the issue is done. The live forge has no
packs/*mirrors or marked packs yet, so/packswill be empty until the owner sets those up.bun x tsc --noEmit,bun scripts/gate.ts,bun scripts/design-lint.tsand the new and changed pack tests pass. I did not run the full suite orpack-compat, which fetches the live packs forge. A scaffolded-app typecheck test failed in this sandbox, and it fails the same way on the base branch.Done
pack.jsonapps now givesource: "packs/2048", a forge repo. A URL is refused./packsand marking./packs, the home presses and the terminal screen read the repos the admin marked, from a newpack_repotable. The migration is pinned.- Marking.
PUTandDELETE /api/v1/repos/:owner/:name/packmark and unmark, admin only (everyone else gets 404), for public repos whosepack.jsonname matches the repo name. A refresh job re-reads each marked pack hourly. If the file breaks, the pack keeps its last good text. - Reading.GET /api/v1/packsand/api/v1/packs/:namelist them.packs/and the DockerfileCOPY packsare gone. The two old packs are kept as fixtures intest/fixtures/packs/; those are the texts to commit intopacks/gamesandpacks/business.deployPackforks each app from its forge mirror into the person's account with lineage, then absorbs it if the pack asks. Re-running keeps what exists.- No mirrors on the target. If the target forge has no mirror, as with
pack upon a new machine, it makes the app and clones history from the packs forge (FORGE_PACKS_URL, defaulthttps://forge.open-platform.sh), never from GitHub. - Test.test/packs-forge.test.tsdeploys with github.com refused and checks that no request leaves for GitHub. It also checks that the fork's parent is the mirror./packs/<name>path clash.packsis also the owner of the mirrors, so/packs/<name>is the pack page when that pack is listed and the repo page otherwise.docs/features/packs.mdis updated.Not done
packs/*mirrors and markingpacks/gamesandpacks/businesson the live forge. This is an owner step using the existing origin mirrors, which already re-sync on their schedule.packsis a reserved username, so the account has to be made by an admin.How to try it
packs/gameswith apack.jsonwhose name isgames.PUT /api/v1/repos/packs/games/packwith an admin token./packs, then/api/v1/packs.FORGE_URL=… FORGE_TOKEN=… bun scripts/pack.ts deploy games.🤖 Generated with Claude Code
Closes #10447