Public: anyone can read this; the crew can change it.
A run shows which account it took and why, and Settings shows each account's place in the order #17837
Merged 4h 7m ago, live in production
A crew run now records which account it took, its place in the order, and why. Settings and the terminal number each account by that same order. It's pushed, but the full-suite check hasn't run yet.
-
Reviews
Changes requested — before the latest pushThe log line, the Settings numbers and the first test are sound, but three things need fixing in one round.
- Fix first: box 1 is untested on the page. Nothing renders the run page or Settings and checks the Account line or the 'Nth in order' text, and the pull says so. Add a test that renders the run page for a run whose log holds an account line and asserts 'Account:'. Add one that asserts a viewer who may not read the log does not see it, which is the privacy claim the pull makes. Add one that renders Settings and asserts 'in order'. Each must fail without the change.
- Design: the Account line is a hand-rolled div in the muted wall block. DESIGN.md principle 7 says a fact is a dl row. Make it a fact row beside the run's other facts (runFacts), so the terminal's
Account:comes from the same fact. It also gets the label style the other facts have, instead of reading as a footnote. - The place shown in Settings and the place a run records can disagree. accountPlaces numbers every account on the forge, while a run says 'Nth of M' over only the accounts it could reach, passed-over ones listed with full windows first. The words 'Nth in order' on Settings therefore sometimes promise something the run page does not say. Either label Settings' number as the forge-wide order, or use the same ordering code for both so there is one way to compute the order.
Smaller: lines in the new code run past 100 columns (the gate's wrap rule); the TUI shows '-' when an account has no place, which is unreadable, so omit the prefix instead.
Boxes: 1 is built but untested and not shown to me on the preview. 2 is met. 3 is met by the test of a run that skipped account 1 for a cap.
ApprovedAll earlier asks are met: the account is now a
dlfact (runFacts) shared by page and terminal, hidden where the log is hidden; Settings is labelled "Nth in the forge's order" and the unread data-place hook is gone; the passed list follows try order; the terminal no longer prints a '-' prefix. Tests cover the fact for a writer, its absence for a stranger, the terminal line and the Settings places.Next two things I would do: (1) Non-blocking: add a test for a full-window plan standing between accounts in
passedInOrder. (2) Non-blocking: on the 360px phone the muted 'Nth in the forge's order' beside the name may wrap awkwardly; consider putting it on its own muted line. -
Checks
waiting merged; waiting for the forge to restart on it deploy de6ec9b
-
History
- Account is a run fact both doors share; Settings says forge's order; passed list follows try order; page and Settings tests 5611d20
- run-steps test: a granted account's run also notes its place in the order 45a0360
- Rewrap comments ba943ba
- A run shows which account it took, its place in the order and why; Settings numbers each account (#17828) d23ac71
- Talk's Stop stays for the whole answer, with words in the box too (#17819) b51ab2e
- The changelog credits a model only when a run backs it (#17807) e780a4e
- The decider can be compared with SubQ Snap in the background, off by default, and decides nothing (#17795) c0cee92
- small: the '+ New forge' page has one primary next action, with phone and desktop looks on the pull (#17818) 6cc8e61
- GET pulls/:number runs an uncapped diff and renders it on the serving thread (#17812) 153cbb3
- Full suite red: 2 files in check run 01m8wzswcz0vr3fz25ryd619jz (#17814) 8f7dfc4
- A Talk build's version strip is in sight when its preview opens, on a phone and at 1000 px (#17810) bdc702e
- Talk says what a long turn is doing and how long since its last step, across every stream (#17808) dcfa7ed
- A Talk build starts no crew run and no review, and only a person publishes it (#17803) cd1d5b7
- Only a check writes a retry decision's outcome, and it says which one (#17796) c2d976e
- A crew run that hits the turn limit wraps up, and says so in its run and its pull (#17809) b35dca2
- app-home-batched boots one forge for the file, and each test has its own account and repositories (#17805) 4763617
- A follow-up in Talk always carries what the person asked; tool steps are what gets cut (#17804) 7af0ffd
- A crew run can spend a granted OpenAI-type account, on the OpenAI runner, per run (#17787) b43bdad
- Talk: the model is a button beside Send, with a list you can type in, and plain names (#17794) 191cbc2
- A release asks scripts/return-check.ts before it promotes (#17793) 7618050
2 earlier comments
A crew run now records which account it took, its place in the order, and why. Settings and the terminal number each account by that same order. It's pushed, but the full-suite check hasn't run yet.
What changed
pickSubscriptioninsrc/core/subscriptions.tsreturns anorderfor the picked account: its place, how many accounts were in the order, and each account passed over with the reason. A resting account reads "resting: <provider's words>", a spent one "its $N budget is spent", a full plan "its weekly window is full for the crew".settleSpendwrites one log line from it, for exampleaccount: second, 2nd of 2 in order: first passed over (resting: usage cap reached). A run that took the first account in order saysfirst in order. The wording is in the newsrc/crew/account_choice.ts.- The run page shows that line as "Account", under the run's facts. The terminal run view shows it as
Account:. Both show it only to someone who may read the log, so account names don't reach people who can't see the log. - Settings → Subscriptions and the terminal's Crew subscriptions screen number each account by its place (
accountPlaces: an admin's rank first, a plan before a key, then name). docs/features/crew-accounts.mdhas a how-to section.
Tests: test/account-choice.test.ts has a run that skipped account 1 for a cap ("usage cap reached") and names it as the reason. It also covers the first-in-order case, the Settings places and the ordinals. That test and about ten related suites pass, and so does tsc. A first gate run (before the rewrap commit) flagged accountPlaces, which the gate says is 0.65 like readLevels in src/flow/valve_store.ts; I read it as a false positive, since the two do different things.
Not done
- The line is stored in the run's log, not in a new database column. Runs made before this show nothing.
- The place shown in Settings is the static order; it doesn't account for per-repository grants or which accounts a given run could reach.
- I didn't add a test that renders the run page itself; the log line and the Settings places are tested directly.
- The commit lines say
No look:andNo door:because no page inapp.looksshows these two pages, and the doors arerunlog.tsandsubscriptions.ts.
Try: open a crew run's page on the preview and read the Account line. Then open /settings/subscriptions and read each account's "Nth in order".
[
{"go": "/settings/subscriptions", "look": "each account's title row", "expect": "a small 'Nth in order' next to the name, 1st for the first account a run tries"},
{"go": "a crew run's page, /<owner>/<name>/runs/<id>", "look": "under the run's facts", "expect": "an 'Account: <name>, Nth of M in order: …' line, naming what was passed over and why; absent on runs made before this change"}
]I fixed the failing check by updating one stale test assertion, and I've pushed the fix. test/run-steps.test.ts now passes: 34 tests, 0 failures. I did not run bun x tsc --noEmit or the rest of the suite.
The test "a granted account > is the account the run works on, noted on the run and the meter" expected only "subscription: work plan". This pull makes a run also note which account it took and its place in the order, so it now reports a second line, "account: work plan, 1st of 1 in order: first in order". The test was wrong, not the code. I added that line to the expected list.
- Gate: the
--fixrun changed nothing. It still notes four files with comment lines over 100 columns and leaves the rewrap to the nightly run. It also flagsaccountPlacesinsrc/core/subscriptions.tsas similar toreadLevelsinsrc/flow/valve_store.ts. I left both alone. - Commit: it carries
No door: test-only change.
A run now shows which account it took, its place in the order and why, and Settings numbers each account in the forge's order. I ran the three affected test files (account-choice, run-page-links, run-steps), tsc, the design lint and the dead-code tests. All pass. The account-choice and run-page-links tests are the new ones. I haven't looked at the preview myself, so box 1 is still unseen there.
Changes
- Fact row.
runFactstakes anaccountinput and emits an "Account" fact. The run page draws it in thedlwith the other facts, and the terminal prints it asAccount: …from the same fact. I removed the muted#run-accountdiv and the extra terminal line. A viewer who may not read the log gets no account fact. - Tests.
- The run page for a log holding an account line shows
<dt>Account</dt>to a writer. - The same page, fetched by a stranger who may read the run but not its log, has neither the fact nor the cap text.
- The terminal run view prints
Account:. - The Settings page shows "1st in the forge's order" and "2nd in the forge's order".
Each asserts something that wasn't there before. I didn't revert the change to watch them fail.
- The run page for a log holding an account line shows
- Order, option 1. Settings' number is now labelled "Nth in the forge's order", with the unread
data-placehook removed.accountPlacesis documented as the forge-wide order that a run's place narrows to what it can reach. I did not merge the two into one ordering function. A run's order depends on the repository, the scope tier, last use and the crew fallback, so a single shared order would be wrong for one side. If you want the shared function anyway, say so. - Passed list. A new
passedInOrderbuilds it in the order the pick tries accounts. A full-window plan stands where the reach list put it, not ahead of the resting ones. I did not add a test for a full-window plan sitting between accounts, so that case is untested. - Terminal. An account with no place shows its plain name, with no
-prefix. - Docs and commit.
docs/features/crew-accounts.mdis updated, and the commit has aDirection: … (#17828)line.
The gate still notes four files with comment lines over 100 columns, and it left the rewrap to the nightly run. It also still flags the accountPlaces / readLevels similarity, which I read as a false positive.
[
{"go": "/<owner>/<repo>/runs/<a crew run's id>", "look": "the run's facts list, as a person who may read its log", "expect": "an \"Account\" row with the same label style as Branch and Started, reading e.g. \"work plan, 2nd of 3 in order: first passed over (resting: usage cap reached)\""},
{"go": "/<owner>/<repo>/runs/<the same run>", "look": "the facts list while signed out, on a public repository", "expect": "no Account row and no account words anywhere on the page", "ask": "Is hiding it from non-readers of the log what you want?"},
{"go": "/settings/subscriptions", "look": "each account's name", "expect": "a small muted \"1st in the forge's order\", \"2nd …\" beside each account"}
]
A crew run now records which account it took, its place in the order, and why. Settings and the terminal number each account by that same order. It's pushed, but the full-suite check hasn't run yet.
What changed
pickSubscriptioninsrc/core/subscriptions.tsreturns anorderfor the picked account: its place, how many accounts were in the order, and each account passed over with the reason. A resting account reads "resting: <provider's words>", a spent one "its $N budget is spent", a full plan "its weekly window is full for the crew".settleSpendwrites one log line from it, for exampleaccount: second, 2nd of 2 in order: first passed over (resting: usage cap reached). A run that took the first account in order saysfirst in order. The wording is in the newsrc/crew/account_choice.ts.Account:. Both show it only to someone who may read the log, so account names don't reach people who can't see the log.accountPlaces: an admin's rank first, a plan before a key, then name).docs/features/crew-accounts.mdhas a how-to section.Tests:
test/account-choice.test.tshas a run that skipped account 1 for a cap ("usage cap reached") and names it as the reason. It also covers the first-in-order case, the Settings places and the ordinals. That test and about ten related suites pass, and so doestsc. A first gate run (before the rewrap commit) flaggedaccountPlaces, which the gate says is 0.65 likereadLevelsinsrc/flow/valve_store.ts; I read it as a false positive, since the two do different things.Not done
No look:andNo door:because no page inapp.looksshows these two pages, and the doors arerunlog.tsandsubscriptions.ts.Try: open a crew run's page on the preview and read the Account line. Then open
/settings/subscriptionsand read each account's "Nth in order".Closes #17828