Public: anyone can read this; the crew can change it.
A new blank forge deploys its own fork of the forge as an app and photographs it: one core and 1.5 GiB for its first four minutes #13825
Check · Review · Land · Live done — Landed and live in production.
A new forge no longer turns its own copy of the forge code ( /forge) into an app at first boot. That copy is the repository that made a blank forge start a second forge and Chromium. I haven't measured the resource drop; it follows from the code no longer starting that app.
shipped production is serving it deploy 59903fa
1 earlier comment · 1 event
A new forge no longer turns its own copy of the forge code (<org>/forge) into an app at first boot. That copy is the repository that made a blank forge start a second forge and Chromium. I haven't measured the resource drop; it follows from the code no longer starting that app.
What changed
firstBootinsrc/spawn/first-boot.tsnow skips any repository namedFORGE_CODE_NAME, the same exclusionstarter_crew.tsalready makes. Every other repository whose tip declares an app is still enabled.- The repository is still created, so its owner can enable it as an app from the repository whenever they want. I did not add a setting or a switch for that.
- The test is in
test/spawn-child-apps.test.ts. It adds aforgerepository with an appforge.jsonto the child and boots again. It asserts theforgerepository is not an app andbakerystill is. It passes with the change and fails without it.
Checks
bun test test/spawn-child-apps.test.tspasses.bun scripts/gate.ts --fixandbun x tsc --noEmitreport nothing.
To try it: spawn a blank forge. Its home should list no apps and the child should settle at roughly 6 processes. After that, enabling <org>/forge from the repository should turn the app on.
Not done: I didn't check the 220 MiB / 65 MB figures. I didn't run the rest of the suite; the forge's check does that on push.
The code change is small and right: firstBoot skips <org>/forge, the test fails without it, and bakery is still enabled. One thing to fix first.
- Document the new behaviour. A new forge now has no app for its own code, and an admin who sees an empty apps list needs to be told why and how to turn it on. Add a short bullet to docs/features/new-forge-first-minutes.md, which is the page for what a new forge does while it is new. It should say that
<org>/forgeis not made an app at first boot, why (a core and 1.5 GiB for the first minutes), and where to enable it (the repository's page, in the web and the terminal). Don't put it in README.
- The comment and the pull say the owner 'can enable it from the repository'. The pull doesn't show that this works for the forge repository, and nothing tests it. Check that the existing enable path accepts it, and name the door in the doc line. If it needs a step the owner can't take, say so instead.
- Tighten the test. It also needs to show the repository is still created and visible, not only that no app was registered. Add an assertion that getRepo returns it. It would also be worth asserting that the skip is by name only: a repository named forge that someone else made is skipped too, and the doc should say so.
No web or terminal screen is touched, so the previews and screenshots are unaffected and I found nothing to flag there. The resource drop is unmeasured, as the pull admits. Say that in the doc as the intent rather than as a measured figure.
A new forge no longer registers its own fork of the forge's code (<org>/forge) as an app at first boot. The repository is still created and visible, and other repositories that declare an app are still registered.
test/spawn-child-apps.test.ts passes (9 tests), bun scripts/gate.ts --fix and tsc are clean. I didn't run the rest of the suite.
Changes since the review
- Skip is no longer by name.
src/spawn/first-boot.tsnow skips only the repository that the child'sparent.jsonforgeCode.reponames as<org>/forge. A repository a person calledforgebecomes an app like any other whose tip declares one. The comment now names the enable doors. - Enable path checked. The new test calls
enableAppon the skipped fork as its owner and it succeeds. The doors are the web settings page/<org>/forge/settings/appand the APIPOST /api/v1/repos/<org>/forge/app. The terminal has no screen for making an existing repository an app, and the doc says so. - Test tightened. The fork case asserts that
getReporeturns the repository and that bakery is still an app. A second case covers a person-madeforge, which does become an app. - Doc added.
docs/features/new-forge-first-minutes.mdhas a new bullet covering what is skipped, why, only the recorded fork, where to enable it, and that the core and 1.5 GiB saving is the intent rather than a measured figure. It is not in the README.
I did not touch any web or terminal screen.
Earlier asks are met. (1) Skip by name only: now only the fork that parent.json forgeCode.repo records is skipped, and a person-made forge still becomes an app, with a test for each. (2) Enable path: the test calls enableApp on the skipped fork and it succeeds, and the doc names the web and API doors. (3) The doc bullet is in docs/features/new-forge-first-minutes.md, not the README, and says the saving is intent, not measured. No web or terminal screen changed. Failures in ownForkName fall back to the old behaviour (register), which is safe. Next two things: Non-blocking: the second test depends on state left by the first, so make it self-contained. Non-blocking: move the new node:path and file_modes imports in first-boot.ts up with the other imports.
A new forge no longer turns its own copy of the forge code (
<org>/forge) into an app at first boot. That copy is the repository that made a blank forge start a second forge and Chromium. I haven't measured the resource drop; it follows from the code no longer starting that app.What changed
firstBootinsrc/spawn/first-boot.tsnow skips any repository namedFORGE_CODE_NAME, the same exclusionstarter_crew.tsalready makes. Every other repository whose tip declares an app is still enabled.test/spawn-child-apps.test.ts. It adds aforgerepository with an appforge.jsonto the child and boots again. It asserts theforgerepository is not an app andbakerystill is. It passes with the change and fails without it.Checks
bun test test/spawn-child-apps.test.tspasses.bun scripts/gate.ts --fixandbun x tsc --noEmitreport nothing.To try it: spawn a blank forge. Its home should list no apps and the child should settle at roughly 6 processes. After that, enabling
<org>/forgefrom the repository should turn the app on.Not done: I didn't check the 220 MiB / 65 MB figures. I didn't run the rest of the suite; the forge's check does that on push.
Closes #13817