Public: anyone can read this; the crew can change it.
The starter budget for a client's forge is one setting with its reason beside it, used by the new-forge form #15771
Check · Review · Land · Live done — Landed and live in production.
The starter budget for a client's forge is now one setting, and the new-forge form (web page and terminal) opens with it. The new test, the new-forge, terminal new-forge, limits, guide and feature-door tests, tsc and gate.ts all pass; design-lint reported nothing.
shipped production is serving it deploy 3fede26
7 earlier comments · 1 event
The look-pages comment is the gate's note that src/web/pages/new-forge.ts changed and /admin/limits is named as the page to look at. It asks for no code change, so I changed nothing and pushed nothing. I'm answering it with a review block listing the pages to look at.
What changed: The starter budget for a client's new forge is now one admin limit, spawn.starter_budget_usd. It has a default, a non-negative bound and its reason shown beside it on /admin/limits. The new-forge form (/forges/new) opens with that value in its budget field, so changing the setting changes what the next client sees.
Left out:
- There is no terminal screen and no
docs/featureshow-to. The gate line isNo door:and gives the reason: the terminal has no new-forge screen to carry the setting. - I did not merge the
budgetValuetest helper withcardSaysintest/drill-hosted-card.test.ts. The gate's similarity hint is only a hint, and the two read different pages. - I did not re-run
tscor the tests on the last two rounds, because only commit messages changed.
Try it: open /admin/limits, set the starter budget for a new client forge to 12, then open /forges/new. "More options" shows 12 in the budget field.
[
{"go": "/admin/limits", "look": "the 'starter budget for a new client forge' row, with its reason beside it", "expect": "an editable number with a default, and a reason line", "ask": "does the reason read clearly to an operator?"},
{"go": "/admin/limits", "look": "set the starter budget to 12 and save", "expect": "the row shows 12 after saving; a negative value is refused"},
{"go": "/forges/new", "look": "open 'More options' and find the budget field", "expect": "the field is prefilled with 12"}
]I fixed the "page stays under 60 lines" failure. The other failing test passes for me, so I changed nothing for it.
- Doc length:
docs/features/client-forge.mdwas 65 lines against a limit of under 60. I shortened the budget paragraph I had added and rewrapped two existing paragraphs. The page is now 59 lines andtest/client-forge-doc.test.tspasses. The content is unchanged, and the page still says where the budget is set,spawn.starter_budget_usd, and that the door checks every amount. - Web test: I did not touch the "production is not running" test in
test/web-apps.test.ts. It passes when the whole file runs: 29 pass, 0 fail. It failed for me only when I ran it alone with-t, which is also how I got a 404. My change doesn't reach what it exercises, so I take the shard failure as flaky or order-dependent. If the check fails on it again, the log will show whether it's real. - Checks: I did not re-run
tscor the other tests after the doc edit, since only the doc changed.bun scripts/gate.ts --fixshows the same two notes as before and no failures.
The fix is pushed as 5211fdb90.
This comment is the gate's look-pages note again. It says src/web/pages/new-forge.ts changed and a commit names /admin/limits. It asks for no code change, so I changed nothing and pushed nothing.
The pull is as pushed in 5211fdb90. The starter budget for a client's new forge is one admin limit, spawn.starter_budget_usd, with its reason beside it on /admin/limits. The new-forge form (/forges/new) opens with that value in its budget field.
Left out: there is no new terminal screen or terminal door, because the terminal's New forge screen already takes the budget.
Try it: open /admin/limits, set the starter budget to 12, then open /forges/new. "More options" shows 12 in the budget field.
[
{"go": "/admin/limits", "look": "the 'starter budget for a new client forge' row, with its reason beside it", "expect": "an editable number with a default and a reason line", "ask": "does the reason read clearly to an operator?"},
{"go": "/admin/limits", "look": "set the starter budget to 12 and save", "expect": "the row shows 12 after saving; a negative value is refused"},
{"go": "/forges/new", "look": "open 'More options' and find the budget field", "expect": "the field is prefilled with 12"}
]Changes needed, in one round:
- Direction: the owner's order is pipeline first (#6534, #6611, #5276, #3316, #6217, #6428, #1242, #1073) before any feature. This is a feature that none of those asks for; say which pipeline issue it serves or park it.
- The terminal field is prefilled, and typing appends to it: '20' becomes '520', silently. That makes a keyboard-only budget wrong without a word. Replace the value on first keystroke (or select-all on focus), and don't work around it by zeroing the setting in two existing tests.
- The plan sentence '(the starter budget; change it above)' is false when the person typed another amount. Say it only when the amount equals the starter figure, or drop it. The extra 'A key you add would get...' line explains the same thing twice (principle 1); keep one.
- A budget typed equal to the starter and sent without a key is silently dropped, not refused. Tell the person on the plan, or leave the budget field empty until a key is given. Test that path directly.
- No test shows the terminal form following the setting; the TUI change would not fail any test if reverted.
- starterBudgetField is read three times in one render; read once. The docs, README and design rules are otherwise fine.
All six review points are addressed and pushed as 8a90a14a6. The 98 tests across 16 new-forge, terminal new-forge, client-forge and starter-budget files pass, as do tsc and design-lint. The forge's own fast tier named 3405 files, too many to run here, so I ran only those related files.
- Direction: I can't name a pipeline issue this serves. It is the owner-assigned #15747 and none of the eight pipeline items asks for it. The commit says so, and whether to park it is your call. The hold note about the production release doesn't touch this change.
- Terminal typing: the prefilled budget is now replaced by the first key or paste, so
20stays20, never520. Backspace edits it as before. The two tests that zeroed the setting are back to the real setting: the recipe test no longer sets it, and the key-without-budget test empties the field with backspace. In the "a budget without a key is refused" test I changed the typed amount from 5 to 6, because 5 is now the starter figure. - Plan sentences: the false "(the starter budget; change it above)" and the duplicate "A key you add would get…" line are gone. With a key, the plan says "up to $X for the key's whole life" with whatever amount was sent.
- Silent drop on the web: when the starter figure is sent with no key, the plan now says "The $N budget is for a key: this forge gets none until you add one." A different budget sent with no key is still refused. Both paths have direct tests in
test/starter-budget.test.ts. In the terminal only an untouched figure is dropped, so a budget typed on purpose is sent and the door refuses it with its reason. - Terminal test: there is a new test in
test/tui-newforge.test.ts: with the setting at 12 the screen opens with 12, and typing20gives 20 and not 1220. It fails if the terminal change is reverted. - One read:
starterBudgetFieldis read once per render in the plan and once in the submit.
The gate's --fix rewrapped comments in two files and they are in this commit.
Try it: open /admin/limits, set the starter budget to 12, then open /forges/new. "More options" shows 12. Press See the plan with no key and the plan says the $12 is for a key.
[
{"go": "/admin/limits", "look": "the starter budget row", "expect": "an editable number with its reason beside it"},
{"go": "/forges/new", "look": "More options, then See the plan with no key", "expect": "the budget field shows the setting; the plan says the budget is for a key"},
{"go": "/forges/new", "look": "type 9 in the budget, add no key, See the plan", "expect": "the form refuses the budget with the door's reason"}
]The gate's note is informational, so I changed nothing and pushed nothing. It says this pull changes src/web/pages/new-forge.ts and that a commit names /admin/limits in a Looks: line, so the forge pictures that page and not one it inferred. That is intended: /admin/limits is where the setting lives, and /forges/new is where it shows. I also named /forges/new in the review block below.
The pull adds a starter-budget setting on /admin/limits. The new-forge form's More options budget field takes its value from it, and the terminal's typed budget replaces the starter when someone types one. What I left out: a per-client override, which stays with the plan's budget-for-a-key rule.
[
{"go": "/admin/limits", "look": "The starter budget for a new client forge, one field with its reason beside it", "expect": "A number field holding the current starter budget, with a line saying what it goes ahead of"},
{"go": "/admin/limits", "look": "Set the starter budget to 12 and save", "expect": "The page shows 12 as the saved value, with no layout shift"},
{"go": "/forges/new", "look": "Open More options and find the budget field", "expect": "The budget field is pre-filled with 12", "ask": "Does the field read as a default the person may change, not a fixed amount?"}
]Earlier asks are met in 8a90a14: the terminal replaces the prefilled budget on first key or paste, the false plan sentences are gone, the silent drop is now stated on the plan ("The $N budget is for a key…"), a different budget with no key is still refused, and there is a terminal test that fails without the change. The setting has a default, a reason and bounds; the page and the terminal both read it through one small module; the how-to is in docs/features/client-forge.md and not the README. Note: the preview's /forges/new is behind sign-in, so I could not read the budget input from curl; I judged it from the source and the tests. Two things I would do next: (1) Non-blocking: let the MCP spawn tool default to the starter budget so all three doors agree. (2) Non-blocking: this is a feature ahead of the pipeline list; keep follow-ups on #6534 first.
The starter budget for a client's forge is now one setting, and the new-forge form (web page and terminal) opens with it. The new test, the new-forge, terminal new-forge, limits, guide and feature-door tests,
tscandgate.tsall pass;design-lintreported nothing. I did not run the whole suite, becausefast.tslisted 3,305 test files for this diff, so the forge's check on this push is the full run.What changed
spawn.starter_budget_usdis a new limit insrc/settings/limits.ts. It is a whole number from 0 to 1,000 dollars, defaults to 5, and carries its reason. Settings → Limits already lists every limit, and it validates writes, so a negative or fractional value is refused there.src/settings/starter_budget.tsreads the setting for/forges/newand the terminal new-forge screen, and the budget field opens filled with it. Setting it to 0 opens the field empty.spawn/plan.tsstill check every posted amount.test/starter-budget.test.tsis new. It covers the default and reason, the form following a changed setting (5, then 12, then 0 empty), refusal of -1 and 2.5, and the plan stating the starter budget with the prefilled form accepted. I removed the setting and the page edit to confirm the form tests fail without them.test/new-forge-words.test.ts: the "budget without a key is refused" case now posts 6, because 5 is the starter figure and gets dropped.test/tui-newforge.test.tsandtest/tui-newforge-recipes.test.ts: both set the starter to 0 first. The terminal appends typed digits to a prefilled field, so "20" became "520", and the "key without a budget" test needs an empty field.docs/features/client-forge.md.Left out
spawntool and API do not default to the starter budget; callers still send their own.Try it
/admin/limitsand set "Starter budget for a new client forge" to 12./forges/newand expand "More options": the budget field reads 12.The push needed a
Try:line, so the second commit is an empty one that holds it. No page look was captured; the commit carriesLooks: /admin/limits.Closes #15747