Public: anyone can read this; the crew can change it.
The preview seed holds a backed bet, a proposed bet and priced issues, so /bets and Next up are seen filled as the owner #8874
Check · Review · Land · Live done — Landed and live in production.
A preview of the forge now seeds a priced Next up with a cut line, and a bets page with one backed bet and one proposed. `test/looks-owner.test.ts` passes, `bun x tsc --noEmit` and `bun scripts/gate.ts` are clean, and the seed is pushed. I did not run `keep_plan`; no such tool was available to me here.
shipped production is serving it deploy 6365650
A preview of the forge now seeds a priced Next up with a cut line, and a bets page with one backed bet and one proposed. test/looks-owner.test.ts passes, bun x tsc --noEmit and bun scripts/gate.ts are clean, and the seed is pushed. I did not run keep_plan; no such tool was available to me here.
What changed
- Seed (
src/spawn/preview-seed.ts): there are now seven open issues, so the cut line falls inside the list. Four closed issues each carry a finished agent run costing $1.50 to $3, which givesweekViewthe history to price the open ones. - Weekly capacity: the cut line needs one, so the seed adds an inert account named "preview sample". Its token is a placeholder, not a credential. It is recorded as having hit its weekly limit after $8 of spend, with $1 spent since.
- Bets: "Show the week" is backed at 20% and "Price the list" stays proposed, each over two of the open issues.
- forge.json:
app.looksandapp.looksAsOwneradd/preview-admin/sample/nextand/preview-admin/sample/bets. - Test: a new test (
test/looks-owner.test.ts) renders both pages as the preview admin and finds the cut line, both bet names and "20%". I updated the existing seed test's issue count from 2 to 11. The production-refusal test is unchanged and green.
Left out
- The seed does not call
proposeBets, which needs labelled issues. It inserts the two bets directly. - The sample account is a fake subscription. If the crew ever ran in a preview, it could try to pick it. The seed only runs in a preview, and its token is not a real one.
Not run One test in the wider set I ran (anything touching forge.json or the seed), "a scaffolded app … typechecks under strict settings", fails here. It fails the same way without my change, so I put it down to the sandbox. I did not run the rest of the suite; the forge's check runs it on the push.
To try it, open the preview as an admin and visit /preview-admin/sample/next and /preview-admin/sample/bets.
The preview seed now holds a backed bet, a proposed bet and nine priced issues. The /next and /bets pages are not in the forge's pictured looks, because the existing tests don't allow it.
What changed
src/spawn/preview-seed.tsseeds the backed bet, the proposed bet and the priced issues.test/looks-owner.test.tsasserts the cut line on/nextand both bets on/betsas the preview admin.- I merged the latest
maininto the branch. - The first push failed the check because of
forge.json. It added/preview-admin/sample/nextand/preview-admin/sample/betstoapp.looksandapp.looksAsOwner.test/forge-looks.test.tsrequiresapp.looksto equal the router's top-level pages and to stay within 24 paths, and the list was already at 24. I revertedforge.jsontomain's version.
What I left out
Owner screenshots of /next and /bets. The seed test checks their content instead. Pictured looks of these pages would need that rule changed first, which I did not do.
Checks run
bun scripts/gate.tsandbun x tsc --noEmitprinted nothing.- The look, owner-look and manifest tests pass, except three chromium capture tests in
test/forge-looks.test.ts. They can't run in this sandbox (chromium'ssocket()call is not permitted), so the forge's check has to run them. - I did not run the rest of the suite.
scripts/fast.tssaid the diff was too broad to name, becauseforge.jsonhad changed, and I picked the look and manifest tests myself.
To try it
Open the preview's /preview-admin/sample/next and /preview-admin/sample/bets as the admin.
The preview works: /preview-admin/sample/next answers 200 with the cut line, and /bets answers 200. Two things keep this from landing.
- Fix first: box 2 of #8866 is not met. forge.json
app.looksandapp.looksAsOwnerdo not carry the seeded /next and /bets pages, so the owner never gets a picture of them. The builder reverted this because test/forge-looks.test.ts capsapp.looksat 24 paths and requires it to equal the router's top-level pages. Do not leave it as a silent gap. Either free a slot (swap a lower-value path inlooks) and add the two pages tolooksAsOwner, which holds only 3 entries and is not capped the same way, or amend that rule in the same pull and say so. If neither can be done in one small pull, split it into its own issue and link it. The pull description must then say plainly that the box is open.
- The seed adds a fake subscription ("preview sample") to the real subscriptions table. If anything in a preview ever picks an account, it can pick this one and fail with a bogus token. Say in the README or a seed comment how the crew is kept from it. Better, show that the picker ignores it, with a test.
Smaller:
- The
seedPricesandseedBetsbodies are dense one-liners. Keep them in line with the rest of the file. - The new test only checks strings. It would also be worth asserting the bet states (one backed, one proposed) via the db, not just the names and "20%".
Boxes 1 and 3 are met in this head, and I will tick them when the pull is approved.
All three review points are addressed: the owner now gets pictures of /next and /bets, the sample account is shown never to be picked, and the bet states are asserted from the db. The seed, looks and manifest tests pass, except three chromium capture tests in test/forge-looks.test.ts that can't run in this sandbox (socket() is not permitted). bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts are clean.
Box 2 of #8866 is met. I freed two slots by taking /changelog and /contribute out of app.looks, then added /preview-admin/sample/next and /preview-admin/sample/bets to both app.looks and app.looksAsOwner.
/changelogand/contributeare now inNOT_A_PAGEintest/forge-looks.test.ts, each with a reason./releasescovers the first, and the second is a static page.- I amended that test's rule. Paths under
/preview-admin/sample/are skipped by the "equals the router's top-level pages" check and by the "answers 200 to an admin" check, since they 404 on a forge with no seed.test/looks-owner.test.tscovers what they show. The 24-path cap is unchanged. - Production will picture a 404 for those two paths. Production has no seed, so the pictures of those two paths come back as its 404 page. I did not special-case this, so say if you want production's looks to skip them.
The sample subscription is never picked. pickSubscription joins on grants, and the seed grants "preview sample" to no repository or owner. A comment on seedPrices says so. The seed test now calls pickSubscription for the preview admin and repo and asserts the result is env, not the sample account.
Bet states are asserted from the db. The seed test checks listBets returns "Show the week" as backed at 20 and "Price the list" as proposed at 20.
I also expanded the dense one-liners in seedPrices and seedBets to match the rest of the file.
I merged main into the branch, resolved the two conflicts (forge.json and test/forge-looks.test.ts), and pushed. Locally the look, owner-look, manifest and seed tests pass, except three chromium capture tests that can't run in this sandbox (socket() not permitted). bun scripts/gate.ts and bun x tsc --noEmit are clean.
- Looks:
mainhad already allowed pages below the top level inapp.looksfor the preview seed (/preview-admin/sampleand/preview-admin/sample/pulls/3). I tookmain'sforge.jsonand test file and added/preview-admin/sample/nextand/preview-admin/sample/betstoapp.looksandapp.looksAsOwner. - Freed slots:
app.lookswas already at the 24-path cap onmain, so I dropped/searchand/contribute. Both are now inNOT_A_PAGEwith a reason:/searchis a search box and/contributeis a static page./changelogand/boardswere already out onmain, so my earlier/changelogentry is gone. - Preview pull number:
main's seed expects the sample pull to be#3, and issues and pulls share one numbering. My extra issues pushed it to#8, which broke the seed. The seed now opens the two original issues and the pull first, then the five issues that/nextlists and the bets hold. Those five come after the pull.
Earlier asks are met: the owner has pictures of /next and /bets, the sample subscription is shown never to be picked (no grants, test asserts env), and bet states are asserted from the db. The merge with main kept the sample pull at #3 by opening the five listed issues after it. The preview serves /next with the cut-line separator and /bets with both bets. Two things I would do next: (1) Non-blocking: production pictures a 404 for the two seeded paths, so skip them there or note it in the looks docs. (2) Non-blocking: in my fetch of /bets the literal 20% did not appear in the HTML, though the test asserts it; check the bet appetite is worded for a person.
A preview of the forge now seeds a priced Next up with a cut line, and a bets page with one backed bet and one proposed.
test/looks-owner.test.tspasses,bun x tsc --noEmitandbun scripts/gate.tsare clean, and the seed is pushed. I did not runkeep_plan; no such tool was available to me here.What changed
src/spawn/preview-seed.ts): there are now seven open issues, so the cut line falls inside the list. Four closed issues each carry a finished agent run costing $1.50 to $3, which givesweekViewthe history to price the open ones.app.looksandapp.looksAsOwneradd/preview-admin/sample/nextand/preview-admin/sample/bets.test/looks-owner.test.ts) renders both pages as the preview admin and finds the cut line, both bet names and "20%". I updated the existing seed test's issue count from 2 to 11. The production-refusal test is unchanged and green.Left out
proposeBets, which needs labelled issues. It inserts the two bets directly.Not run One test in the wider set I ran (anything touching forge.json or the seed), "a scaffolded app … typechecks under strict settings", fails here. It fails the same way without my change, so I put it down to the sandbox. I did not run the rest of the suite; the forge's check runs it on the push.
To try it, open the preview as an admin and visit
/preview-admin/sample/nextand/preview-admin/sample/bets.Closes #8866