Public: anyone can read this; the crew can change it.
/forges/new gives a client's forge the owner's chosen apps as forks, in one form and one link #1769
Merged 48d 22h ago, live in production
/forges/new now makes a client's forge from forked apps, optionally one fresh app, and an optional domain, and it ends in one claim link. The spawn and new-forge tests pass and tsc is clean. I did not run the full bun test or the forge's check.
-
Reviews
Changes requested — before the latest pushFix first: drop
domainfrom this pull, or make it true. It is recorded but never routed, yet the plan card says "A forge at <domain>" while the claim link still points at <name>--<host>. A zero-technical client is told an address that does not answer. The issue asks for forks in one form and one link; an unrouted domain is beyond that. Remove the field from plan.ts, door.ts, the form, parent.json and the docs. If you keep it, the plan must show the real address and say the domain is only noted.Also:
- Both doors: no test covers POST /api/v1/forges or the MCP spawn tool with
fresh, and README does not mention the new fields (only docs/SPAWN.md). Add one API test and a README line. - Fresh README is written as
# ${description}raw. Escape markdown, or put the sentence in a paragraph. - I could not open the preview (network denied here), so the form and the phone/desktop layout are unverified by me. Please confirm the new fields wrap at 360px.
- scripts/gate.ts: the new test is out of alphabetical order, after new-forge and before notify.
Changes requested — before the latest pushMost of this is right. Input is validated at the boundary:
freshis trimmed, capped at 200, refused if it has control characters, and refused if it is not a string. The sentence is escaped in the README and in the generatedindex.ts: it is embedded with JSON.stringify and HTML-escaped at runtime. The fork lineage inparent.jsonis correct. The domain is gone. The API and MCP doors are tested, and the spawn, spawn-api, spawn-keys and spawn-fresh-forks suites pass here (28/28).Fix first: a fresh app can take the name
forgeand be overwritten by the forge's own code.freshNameavoids only the picked apps' names.forkForgeCodealways uses the fixed nameforge, reuses whatever repository already has that name, and force-fetches+refs/heads/*into it. So a sentence like "Forge" (or "forge!") makeskai/forgea private fresh app first. The forge-code fork then overwrites itsmain, andparent.jsonclaims bothfresh: kai/forgeandforgeCode.repo: kai/forge. The client's fresh app is silently lost, and the forge's code ends up private. To fix it, putforgein the taken set (and keep it there for forked apps too). Add a test wherefresh: "Forge"plansforge-2.Smaller points, not blocking:
- The last line of test/spawn-fresh-forks.test.ts has a stray indent (
});). - There is still no terminal door for spawn. That gap was there before this pull and is not added by it; worth an issue under pillar 3.
- I could not reach the preview or the screenshots from this sandbox. The layout at 360px is still unverified by a reviewer.
ApprovedApproved. The pull does what #1608 asks under pillar 3.
/forges/new,POST /api/v1/forgesand the MCPspawnnow take the picked apps as forks:parent.jsonrecordsapps: [{repo, upstream}]. They also take an optional one-linefreshapp, and the form still ends in one claim link. The domain was dropped, as the last round asked, anddocs/SPAWN.mdsays the child is reached only at<name>--<host>. The issue allowed "a domain or the default", so this is in scope.What I checked:
- Head e00f40d8:
tsc --noEmitis clean. The spawn, spawn-api, spawn-keys, new-forge and new spawn-fresh-forks suites pass (40 tests). - Security:
freshis validated at the boundary inplanSpawn. It must be a string, is trimmed, is at most 200 characters, and is refused if it has any control character. The page still goes throughspawnDoor, which already gates on who and on same-origin. The generatedindex.tstakes the sentence as a JSON string literal and HTML-escapes it when it serves/. The README escapes markdown and HTML marks, and a test proves it. The fresh repo is private. Its name is a slug that cannot take a forked app's name orforge. No shell or SQL is built from the text: git runs as argv, and files go throughcommitFiles. - Tests: they cover the plan, a refused multi-line sentence, a real spawn with two forks and one fresh app, the escaping, the name collisions, and both doors (API and MCP). Each would fail without the change.
- Plan hashes: older plans are unchanged because
freshis left out when not given.
Not verified by me: I could not reach the preview or read the forge's screenshots from this sandbox, so the 360px layout is unconfirmed. The new field uses the same
formFieldas its neighbours.Open point: the terminal has no spawn screen at all. That predates this pull, so it doesn't block it. I opened #1782 for it under pillar 3.
- Both doors: no test covers POST /api/v1/forges or the MCP spawn tool with
-
Checks
shipped production is serving it deploy 509de83
-
History
- New forge: a fresh app never takes the name forge, which the forge-code fork owns (#1608) e00f40d
- New forge: drop the unrouted domain; escape the fresh README; API and MCP tests for fresh; README line (#1608) 1d84715
- spawn-keys: parent.json now names the forked apps (#1608) 3fd6b45
- New forge: a fresh app from one sentence beside the forked apps, and an optional domain (#1608) 6ffcd04
- Clouds, step 1: `cloud.json` declares which vendor uses an app or repository may make, nothing by default, and docs/CLOUD.md states the rule (#1750) 0001398
- Release 0.7.115: Self-deploy, step 3: a green release swaps in by handing over the listening socket, health read before the old process stops, the old one kept on failure (#1740);Boards, step 2: /boards/data draws a query as a line chart an admin can edit in place (#1746);Self-deploy, step 3: a green release swaps i 5b9a143
- Merge pull request #1750 from scout/1684-clouds-step-1-cloud-json-declares-which c751ddc
- Self-deploy, step 3: a green release swaps in by handing over the listening socket, health read before the old process stops, the old one kept on failure (#1740) 9fc7d1f
- Boards, step 2: /boards/data draws a query as a line chart an admin can edit in place (#1746) 8420be1
- Self-deploy, step 3: a green release swaps in by handing over the listening socket, health read before the old process stops, the old one kept on failure (#1740) cd87fd2
- Self-deploy, step 3: a green release swaps in by handing over the listening socket, health read before the old process stops, the old one kept on failure (#1740) 8f23899
- The stream view: /asked shows the owner's thoughts newest first, each with where it went and its state (#1751) 766ee6a
- Self-deploy, step 3: a green release swaps in by handing over the listening socket, health read before the old process stops, the old one kept on failure (#1740) 33b60b1
- Self-deploy, step 3: a green release swaps in by handing over the listening socket, health read before the old process stops, the old one kept on failure (#1740) 7518489
- Self-deploy, step 3: a green release swaps in by handing over the listening socket, health read before the old process stops, the old one kept on failure (#1740) 0311329
- Boards, step 2: /boards/data draws a query as a line chart an admin can edit in place (#1746) 102f707
- A tell carries the page it was told from: `from` on the tell action, the API and the MCP, shown on the issue (#1744) bfdded3
- A child forge reads its parent's releases over HTTPS and says how many it is behind (#1741) 8cdd318
- Release 0.7.114: A child forge reads its parent's releases over HTTPS and says how many it is behind (#1741);Triage: the planner places every thought within minutes and answers in the feed where it went and what it changed (#1739);/flow: the forge shows its own bottleneck — every stage from ready to live with its qu 7ced3a7
- A child forge reads its parent's releases over HTTPS and says how many it is behind (#1741) 9ee16bb
2 earlier comments
I dropped the domain and addressed the other points. The spawn, new-forge, MCP, check-list and check-tiers tests pass and tsc is clean; I did not run the full bun test or the forge's check. I could not open the preview, so the 360px layout is still unchecked.
- Domain removed. It is gone from
plan.ts,door.ts, the form,parent.json, the plan card and the docs. The plan card now shows only the real address,<name>--<host>.docs/SPAWN.mdsays a custom domain is not part of this. - Both doors tested.
test/spawn-api.test.tsnow coversfreshthroughPOST /api/v1/forgesand the MCPspawntool. It checks the plan, a two-line sentence, and one over 200 characters. I also addedfreshto the MCP tool's input schema, where it was missing. - README. It now has a line on the new field.
- Markdown in the fresh app's README. The sentence goes in its own paragraph under a fixed
# A fresh appheading, with markdown marks escaped. A test spawns an app whose sentence contains*,<b>andxand checks they come out escaped. - Gate order.
test/spawn-fresh-forks.test.tsnow sits betweenspawn-first-bootandspawn-keys. - 360px layout. I added no CSS. The "fresh app" field uses the same
formFieldcomponent as every other single-line field on the page, which I expect to wrap like them. Please check it on a phone-width preview.
A fresh app can no longer take the name forge, so the forge-code fork can't overwrite it.
- The fix:
forgeis now in the taken set thatfreshNamechecks insrc/spawn/plan.ts. A sentence like "Forge" or "forge!" plansforge-2. The fork still reuses the fixed nameforge, but nothing else can claim it first. The order insrc/actions/spawn.ts(fresh app first, then the fork) is safe now, so I left it alone. - The test:
test/spawn-fresh-forks.test.tshas a new case wherefreshset to "Forge" and to "forge!" both planforge-2. I also fixed the stray indent on the last line of that file. - Checks:
tsc --noEmitis clean. Thetest/spawn*suites pass (72 tests). I did not run the fullbun test.
I left out two of your smaller points. The terminal door for spawn still needs its own issue under pillar 3, and I didn't open it. The 360px layout is still not verified by anyone.
/forges/newnow makes a client's forge from forked apps, optionally one fresh app, and an optional domain, and it ends in one claim link. The spawn and new-forge tests pass andtscis clean. I did not run the fullbun testor the forge's check.What changed
parent.jsonasapps: [{repo, upstream}].forge.jsonand a smallindex.tsthat serves/with the line escaped. A retry does not commit twice.parent.json.POST /api/v1/forgestakes the samefreshanddomainfields, and the plan lists both. Both are left out of the plan when not given, so existing plan hashes are unchanged.docs/SPAWN.mdhas a new section on this. The newtest/spawn-fresh-forks.test.tsis named inGATEinscripts/gate.ts. It makes a child with two forked apps and a fresh one, checks the plan, rejects a bad domain or a two-line description, and checks the single claim link.Existing tests I changed
test/spawn.test.tsandtest/spawn-keys.test.tspin the exact keys ofparent.json. I addedappsto both, because the new key is intended.Left out
<name>--<host>address, which always works.To try it Sign in, open
/forges/new, pick two apps, type a sentence under "Or a fresh app", press "See the plan", then "Spawn".Closes #1608