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 #10477

Parked opened this in answer to
Closed without merging

Packs now come from the forge. /packs reads marked pack repositories, packs/ has left the source tree, and the Dockerfile COPY packs is gone. bun scripts/gate.ts and bun x tsc --noEmit are clean, and the 76 pack-related tests pass.

Notes

stopped parked by the crew deploy 292a0fa

opened this

Packs now come from the forge. /packs reads marked pack repositories, packs/ has left the source tree, and the Dockerfile COPY packs is gone. bun scripts/gate.ts and bun x tsc --noEmit are clean, and the 76 pack-related tests pass. I did not run the whole suite, since the forge's check runs it on this push.

A wider batch of about 1,900 tests ran out of memory in my sandbox, so it proves nothing either way. One unintended run of the whole suite was still going when I pushed, and I never saw its result.

I still owe two things. I did not write the schedule that re-syncs the upstream mirrors, and I did not mirror the five upstreams into packs/*. The mirrors need the owner's hand, and /packs stays empty until the owner marks a pack. The licence, authors and upstream link on a mirror's repo page are not covered either.

What changed

  • A pack is a repository. An admin marks a repo holding a pack.json with PUT /api/v1/repos/{owner}/{name}/pack. DELETE unmarks it, and GET /api/v1/packs and GET /api/v1/packs/{name} read the marked ones. Anyone can make a pack by making a repo; the owner decides which appear on /packs. A migration adds the marking, the routes are in OpenAPI, and the code is in src/packs/marked.ts and src/http/api/packs.ts.
  • A pack lists forge repos. The source of each app is now a forge repo such as packs/2048, not a GitHub URL.
  • Deploying forks from the mirror. Deploying a pack forks each app from its forge mirror into the person's account, with lineage. The test that proves GitHub is never touched is in test/packs-forge.test.ts.
  • Readers moved to the repos. The web /packs page, the studio home and the terminal packs screen read the marked repos. scripts/pack.ts and scripts/pack-compat.ts are updated to match.
  • Old pack files kept as test fixtures. packs/games/pack.json and packs/business/pack.json are now test/fixtures/packs/games.json and business.json.
  • Merged main. One new test, test/keys-packs.test.ts, called catalog() without a database. It now publishes the fixture packs first.

How to try it

  1. Open /packs.
  2. Open /api/v1/packs.
  3. As an admin, run PUT /api/v1/repos/packs/games/pack, then reload /packs.

The first two come back empty until step 3.

Follow-up issues

  • The scheduled upstream re-sync.
  • Mirroring the five apps and showing their credit on the repo page.

Closes #10447

3 earlier comments
commented

Packs now come from the forge. /packs reads marked pack repositories, packs/ has left the source tree, and the Dockerfile COPY packs is gone. bun scripts/gate.ts and bun x tsc --noEmit are clean, and the 76 pack-related tests pass. I did not run the whole suite, since the forge's check runs it on this push.

A wider batch of about 1,900 tests ran out of memory in my sandbox, so it proves nothing either way. One unintended run of the whole suite was still going when I pushed, and I never saw its result.

I still owe two things. I did not write the schedule that re-syncs the upstream mirrors, and I did not mirror the five upstreams into packs/*. The mirrors need the owner's hand, and /packs stays empty until the owner marks a pack. The licence, authors and upstream link on a mirror's repo page are not covered either.

What changed

  • A pack is a repository. An admin marks a repo holding a pack.json with PUT /api/v1/repos/{owner}/{name}/pack. DELETE unmarks it, and GET /api/v1/packs and GET /api/v1/packs/{name} read the marked ones. Anyone can make a pack by making a repo; the owner decides which appear on /packs. A migration adds the marking, the routes are in OpenAPI, and the code is in src/packs/marked.ts and src/http/api/packs.ts.
  • A pack lists forge repos. The source of each app is now a forge repo such as packs/2048, not a GitHub URL.
  • Deploying forks from the mirror. Deploying a pack forks each app from its forge mirror into the person's account, with lineage. The test that proves GitHub is never touched is in test/packs-forge.test.ts.
  • Readers moved to the repos. The web /packs page, the studio home and the terminal packs screen read the marked repos. scripts/pack.ts and scripts/pack-compat.ts are updated to match.
  • Old pack files kept as test fixtures. packs/games/pack.json and packs/business/pack.json are now test/fixtures/packs/games.json and business.json.
  • Merged main. One new test, test/keys-packs.test.ts, called catalog() without a database. It now publishes the fixture packs first.

How to try it

  1. Open /packs.
  2. Open /api/v1/packs.
  3. As an admin, run PUT /api/v1/repos/packs/games/pack, then reload /packs.

The first two come back empty until step 3.

Follow-up issues

  • The scheduled upstream re-sync.
  • Mirroring the five apps and showing their credit on the repo page.
commented

This push fixes two of the five failing tests. The other three I couldn't run here, so they are unconfirmed.

What I fixed

  • child quota > room for small but not large is refused only for large: a small child forge now holds 2048 MiB (src/spawn/sizes.ts, from the merged main change a95789f9f), so the test's 2000 MiB limit refused it. I raised the limit to 4500 MiB, which still fits small and refuses large (8192 MiB).
  • an allowed module that has become reached leaves the list: scripts/unreached-allow.json still named src/kernel/why_now.ts, which no longer exists. I removed the entry.

I merged origin/main first. Both tests also fail on a clean checkout of origin/main, so my packs change did not cause them.

Still failing in the check, not run here

  • "a child forge spawned into a cell serves its app at …"
  • "a real child forge > boots in its own forge:<name> cell …"
  • "live previews > a fresh account's second preview is refused …"

All three need a cell or a live preview, which this sandbox can't run, and none touches packs. I think the 2 GiB small-child change from main is the likelier cause for the two child-forge ones, but I haven't checked. If they fail again, I'll need the check log to go further.

bun x tsc --noEmit, bun scripts/gate.ts and the two fixed test files are clean locally.

Pull description (unchanged): packs now come from the forge. A pack is a repository marked with a pack.json, and each app forks from a forge mirror. An admin marks one with PUT /api/v1/repos/packs/games/pack. To try it, open /packs, then /api/v1/packs.

commented

I found no cause in this pull for the four failures, so I changed no code. I pushed an empty commit to re-run the check, so whether they still fail is not known yet.

  • Pack tests: The two non-cell tests pass here. They are "a pin's cart > a captured cart plays sandboxed…" and "a repository name with markup in it is escaped in the select…". test/build-cart.test.ts and test/feed-composer-language.test.ts passed three runs in a row, and the four failing test files together passed once.
  • Cell tests: The two child-forge cell tests need a unix socket, so they are skipped in this sandbox and I could not run them. Both timed out at 14–15 s in the 89-shard run.
  • Diff against main: This pull's changes to origin/main touch nothing the four tests depend on. They cover the pack marking, the packs API, a migration, main.ts and home.ts, with no change to src/spawn, src/arcade or the composer. origin/main has no new commits since the merge.
  • Likely cause: The cart test depends on a 50 ms sleep and an asynchronous capture settling, and the cell tests depend on how fast a child boots. Both are sensitive to a machine loaded by many shards. This is my reading, not something I confirmed.

bun scripts/gate.ts and bun x tsc --noEmit printed nothing and ran before the push.

If the same four fail again, the full check log is what I need next: the failure messages above were cut off, and the cell tests are the ones I can't reproduce.

🤖 Generated with Claude Code

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs