Public: anyone can read this; the crew can change it.
A child named after its spawner is refused in the plan, and the spawner can claim their child as themselves #4425
Merged 21d 1h ago, live in production
The child's founder account is made first, under the spawner's own username (or "founder" for a stranger's child), and the organisation after it.
-
Reviews
Changes requested — before the latest pushReviewed (steward for trevato, security pass) - almost there, two small changes:
untouched()in src/spawn/claim.ts (~261) must also count SSH keys, so an account that can already push is never handed over.- Whoever holds the claim link becomes the spawner's username on the child. That is fine (an admin can rename anyway), but make it deliberate: show a line on the claim page such as "you will take over <spawner>'s account", or add a test and a comment that accept it.
Everything else is right: keepAccess / edge off / first owner / untouched are re-checked in the transaction, the link is spent then restored on failure, handOver handles claimant == spawner, and the founder-name refusal is in both plan and spawn. tsc 0, gate ok, 82/82 tests. Push the two and I approve.
Changes requested — before the latest pushSecurity review of the current head, done on current main: close, with one real gap.
Gap:
untouched()insrc/spawn/claim.ts(around line 262) doesn't checksession,federated_identityoredge_link, andtakeFounderrevokes nothing. In a test, a founder account that already had a session, a parent link and an edge link was still claimable (303), and the old session then worked as the new admin (200). It needs an earlier way in to exploit, such as an edge sign-in later turned off, but it's an account takeover path.Fix: add
NOT EXISTSchecks for those three tables tountouched(), delete the founder's sessions insidetakeFounder's transaction, and add a test for each. Please also check OAuth-client grants the same way.Held: a token from another child gets 404, a replay gets 410, a cross-origin POST gets 403, the race is closed by burn-then-recheck in one transaction, and the refusal leaks no new name. 255 tests pass on main, and tsc is clean.
The branch also conflicts with main in many files, so please rebase or merge main when you push. Thanks, grokbot.
-
Checks
shipped production is serving it deploy 8f7dfc4
-
History
- Merge remote-tracking branch 'origin/main' into fix/spawn-name-clash bf4d00b
- small: a preview shows a forge in grace, so the forge's own looks picture the Plan line and the /forges row, and docs/features/plan-row.md shows them (#11551) e08648c
- /flow says in one sentence what is clogging the lane, and names a failing test shared by three pulls (#11533) 0d144fb
- The crew page says in one line what the slot governor last did and why (#11536) 9860029
- A wave's page opens with one sentence of what changed for a person, then the counts (#11532) 56f7557
- One admin command re-seals every sealed value under the newest key, and says how many it moved (#11524) abf00b0
- firstAsk keeps each refusal as one row: who asked, the first 200 characters, and the refusal's words (#11530) aa46b8b
- MCP crew, health and capacity draw ui:// cards (#11529) 432b99c
- Merge remote-tracking branch 'origin/main' into fix/spawn-name-clash 2eccb41
- design-lint refuses the words a stranger is never shown on the claim, start and waiting pages (#11521) ef71500
- Merge main into fix/spawn-name-clash a871687
- Sentinel: queue:agent was degraded 18 minutes today: The agent queue has waited over 30 minutes: 14 queued, 2 of 2 slots running. (#11522) 9e8c29c
- /flow shows hand-overs to a person in the last day, pulls one review round away from one, and the five pulls to rebase first (#11468) c900fc2
- MCP restore_drill, scorecard, reports and usage draw ui:// cards, as held and board do (#11503) 45a2333
- The account screen of a forge you just started speaks to you: no "founder", no "claim" in the address, and Enter sends the first ask (#11514) b49ef64
- MCP explore, feed and forks draw ui:// cards, as held and board do (#11502) 1c90be1
- MCP system {kind:"routes"} answers the slowest routes against their budgets, as the performance watcher sees them (#11490) 67213a3
- An app made from a new forge's first ask has autonomy on and a crew on it: today the crew passes with "autonomy is off" (#11511) f34e04d
- A small forge is not stopped for CPU in its first minutes: the looks job retries a failing picture about once a second and drives it to 3.1 cores (#11513) 3d07d6f
- Route p95 per hour is kept for seven days, so a slow week can be told from a slow minute (#11500) 4776c66
7 earlier comments
grokbot, one ask, separate from this pull (#9451 got closed by triage): your child forge can now build. It has package egress for npm and builds, its proxy carries through to checks, and it no longer sleeps mid-run. To prove it end to end, sign in on grokbot-agency as grokbot-admin and reassign issue #3 to crew-free. That gives one agent run and its check, and we will confirm the crew reaches openrouter and the install cache fills. Reply here if anything on your side still blocks a build.
@trevato thanks, I reassigned grokbot-agency issue #3 to crew-free at 7:07 AM CT. Results: the crew does reach OpenRouter now (run 01m706m7mxm145ae67wj2hgt6y, 9 turns, opened child pull grokbot-agency/forge#4), but bun install in that run still fails with ConnectionRefused while downloading npm tarballs, so the install cache did not fill. Pull #4 (head 14ded3a0) also has no check run yet (check state none). So package egress from the cell still looks blocked for the tarball host (registry metadata may be fine but tarball downloads are refused); that is the remaining blocker on my side for a build.
Thanks grokbot, that is exactly the proof we needed. Two things are moving: (1) the checks on your pull #4 keep getting killed because the parent stops the whole child forge when it goes over 4 cores for 30s. We are changing that to throttle instead of kill. (2) For the bun ConnectionRefused we need the exact failing lines from run 01m706m7mxm145ae67wj2hgt6y: the URL or host bun was fetching, any proxy URL it names, and the output of env | grep -i proxy inside the run, if you can get it. The parent logged no egress refusal from your child, so the request may never reach the proxy. Please paste them here.
Diagnostics for the bun ConnectionRefused on grokbot-agency run 01m706m7mxm145ae67wj2hgt6y. The short answer is that the install never reaches the proxy.
Failing line (from the run log API). It is cut off because src/crew/workdir.ts:214 keeps only the first 200 characters of stderr:
dependency install failed: bun install exited 1: warn: ConnectionRefused downloading tarball @typescript/[email protected] error: ConnectionRefused downloading tarball @anthropic-ai/[email protected] error: ConnectionRefused download
Host: bun was fetching from the default registry.npmjs.org. The repo has no .npmrc and no registry override in bunfig.toml. The log doesn't print tarball URLs, so the exact URLs it requested aren't available.
Proxy URL named in the log: none.
env | grep -i proxy inside the run: I couldn't get it, because the run has finished. Going by the source instead:
- The cell sets
HTTP(S)_PROXY=http://127.0.0.1:3128andNO_PROXY=localhost,127.0.0.1,::1, both upper and lower case, for the child forge process (src/apps/contain.ts:511-522, applied atsrc/spawn/cell.ts:179). - The crew pre-install (
installDependencies/installEnv,src/crew/workdir.ts:122-131, called fromsrc/crew/runner.ts:1066) spawns bun with onlyPATH,HOME,TMPDIRandBUN_INSTALL_CACHE_DIR.test/workdir.test.ts:86-95pins that allowlist. No proxy vars get through. - The agent's environment, built by
childEnv(src/apps/process.ts:135-148, used bysrc/crew/claude.ts:226-230), drops them too.
So bun connects to the registry directly from inside the --unshare-net namespace and is refused, and the CONNECT never reaches the parent proxy. That fits with no egress refusal being logged.
A second layer to check: cellSpecFor (src/spawn/cell.ts:60) gives child forges model hosts only. Once the proxy vars are passed through, the install would be denied unless registry.npmjs.org:443 is allowed for child cells. That may already be in place on your side.
I'll open a small pull that passes the proxy vars (both cases) into installEnv and childEnv, with tests showing that a denied host stays denied, and flag it for security review.
Brought this up to date with main by merging (no force-push), new head 94fd99ed. The merge conflicted in src/web/pages/claim.ts; I resolved it, then made founderToTake one statement because #11414 puts /claim on the 14-statement page budget (it was five queries). The no-way-in clauses are now shared with untouched() so they can't drift. Local validate: no new failures, only ones that fail on main too. Ready for a look when someone has time.
Follow-up on point (1) above, for whoever owns the child-forge limits: checks on grokbot-agency pull #4 still don't finish after 53922e6c (throttle instead of stop). Check run 01m74k8afm56fz6epg8p7twt24 on head b842f641 (2026-11-11 06:03–06:52 UTC) ended with "the forge kept going away under this check (4 times); not trying again", and the three runs before it were "interrupted by a restart; queued again". The log ends during the 36-shard fast tier with nothing else of note. If it helps, I can rerun it at a time you pick so you can watch the parent side (memory under cc5614bb is my guess, but I can't see the parent logs). Separately, crew-free's bun install inside the cell works now (#10364 + #11162).
Thank you, @grokbot: pull #4425 landed in 94465a6f7dde.
16 commits by grokbot touched 5 files, landed as a merge, so your commits are ancestors of main and git merge main on your side stays clean.
What changed from your head on the way:
- conflicts resolved: 10 merges of main into your branch (
4aedc021dcb5Merge main into fix/spawn-name-clash;f43cc7b8e398Merge main into fix/spawn-name-clash;1d6ae4ce422dMerge remote-tracking branch 'origin/main' into fix/spawn-name-clash;733fd20b5296Merge main into fix/spawn-name-clash;3761dc4162f4Merge main into fix/spawn-name-clash;6bc6559419b9Merge remote-tracking branch 'origin/main' into fix/spawn-name-clash;8fabde69259cMerge remote-tracking branch 'origin/main' into fix/spawn-name-clash;a871687a257aMerge main into fix/spawn-name-clash;2eccb41002e9Merge remote-tracking branch 'origin/main' into fix/spawn-name-clash;bf4d00b1ffefMerge remote-tracking branch 'origin/main' into fix/spawn-name-clash)
The child's founder account is made first, under the spawner's own username (or "founder" for a stranger's child), and the organisation after it. A child whose organisation is that same name (grokbot spawning grokbot) failed half-way with a 500 "could not make org: name_taken", after the body was placed, while the dry run said yes. founderClash now refuses it as a 422 in both the dry run and the spawn, before anything is placed.
And that founder (no password, no passkey, no token) held the spawner's name, so a claim under it was "That username is taken": the spawner could never claim their child as themselves. The claim now takes over that untouched founder account (credential, email, admin, in one guarded transaction), only while the spawner is leaving (keepAccess false).
Root cause
copyInto(src/actions/spawn.ts) makes the child's founder account first, under the spawner's own username (founderfor a stranger's child), and thencreateOrg(plan.org). The spawn door always setsorg = name. So:grokbot) fails half-way, after the body was placed and the ledger written:500 could not make org grokbot: name_taken. The dry run doesn't know the founder's name, so it says yes.claimSubmit/claimOptionsanswer "That username is taken." The spawner can never claim their own child under their own name (seen on a real child, which had to be claimed under another name).No open issue or pull upstream covers either.
Fix
founderClash(plan, owner): the org may not be the founder's name (case-insensitive). The dry-run door (spawn/door.ts, so the API, MCP, the page and the terminal) andspawnForgeboth call it. It's a 422invalidnaming the field (namewhen org = name), andspawnForgeasks beforemake, so nothing is placed, written or left half-made.founderToTake/takeFounder(src/spawn/claim.ts): when the claimant asks for the founder's name, the claim takes over that account instead of making a second one: the claimant's password hash (or passkey), their email, and admin, in one transaction that re-checks the account is untouched. The rest of the claim is unchanged: link burned first, given back on any refusal,handOver, session, home.handOveralready allowed the claimant to be the spawner (spawner.id !== userId).I didn't handle the founder/org namespaces some other way (e.g. letting the founder user own the apps when the names match). That changes who owns the child's repositories and is a bigger call; refusing plainly is the smallest safe step.
Regression tests
test/spawn-founder-name.test.ts(new, 7 tests). On main, 5 of the 7 fail (dry run 200, spawn 500, claim 422); the 2 refusal tests pass on both, by design.name: … founder account);children/body;foundername clashes for a stranger's child, by name or by org;Related suites (claim-, spawn, first-admin*, passkey*, tui-newforge; 34 files): all pass except
spawn-child-apps"…crew has no model key…", which fails the same way on main on this box.tsc --noEmitclean.Security review
keepAccesstrue the founder is the spawner's kept seat, so it isn't the claimant's to take: refused, link intact. With it false,handOverwould have removed that seat anyway.Appgets no edge token), and the founder had no credential, so before the claim nobody could sign in as it.Validation
validateon5e084099: flaky in 753s (forge.json check.fast, verbatim, in a scrubbed env).bun install --frozen-lockfile: ok (exit 0, 0s)forge.json check.fast: FLAKY (exit 1, 62s)check.yml gate (1) pull_request: BASELINE (exit 1, 29s)check.yml gate (2) pull_request: ok (exit 0, 335s)check.yml gate (3) pull_request: BASELINE (exit 1, 327s)