Public: anyone can read this; the crew can change it.
The week's model allowance is spent on purpose: the crew stood still on 10 of 28 days because it was gone in four or five #14281
Check · Review · Land · Live — Pushed since the last review.
This pull does only ask 3 of the issue, and only partly. I left out asks 1, 2 and 4 and did not build the "what the week has bought" part. The gate and tsc are clean and the 12 test files that read the week words pass (97 tests).
look green — it answered, no tests were run, ready for a look deploy b3caa68
Check passeddeploy b3caa68
Website spec: 26 findings (report only)
- /board http://127.0.0.1:43261/board answered 303 — https://specification.website/
- /notes http://127.0.0.1:43261/notes answered 303 — https://specification.website/
- /review http://127.0.0.1:43261/review answered 303 — https://specification.website/
- /releases http://127.0.0.1:43261/releases answered 303 — https://specification.website/
- /system http://127.0.0.1:43261/system answered 303 — https://specification.website/
- /admin/limits http://127.0.0.1:43261/admin/limits answered 404 — https://specification.website/
- /maintenance http://127.0.0.1:43261/maintenance answered 303 — https://specification.website/
- /talk http://127.0.0.1:43261/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:43261/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:43261/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:43261/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:43261/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:43261/settings/crew?help answered 303 — https://specification.website/
- /settings/security/controls http://127.0.0.1:43261/settings/security/controls answered 303 — https://specification.website/
- /settings/grants http://127.0.0.1:43261/settings/grants answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/drop http://127.0.0.1:43261/preview-admin/sample/drop answered 303 — https://specification.website/
- /preview-admin/sample/data-move http://127.0.0.1:43261/preview-admin/sample/data-move answered 303 — https://specification.website/
- /preview-admin/sample/cut-over http://127.0.0.1:43261/preview-admin/sample/cut-over answered 303 — https://specification.website/
- /preview-admin/sample/next?pick expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/waves expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/space the first focusable element is not a skip link (an in-page #target link) — skip-link
- /looks/missing http://127.0.0.1:43261/looks/missing answered 404 — https://specification.website/
- /looks/failed http://127.0.0.1:43261/looks/failed answered 500 — https://specification.website/
- /nope/nothing http://127.0.0.1:43261/nope/nothing answered 404 — https://specification.website/
This pull does only ask 3 of the issue, and only partly. I left out asks 1, 2 and 4 and did not build the "what the week has bought" part. The gate and tsc are clean and the 12 test files that read the week words pass (97 tests). scripts/fast.ts named 2,443 test files, which is too broad to run here, so the forge's check will run the rest.
What changed
- The week sentence on Home and the terminal dashboard now says what share of the week's agent spend has not landed. It counts runs on a pull that did not merge, or on an issue no merged pull closes.
- The same sentence now says what the remaining allowance should buy at this week's rate. That is landings per point of the week used, times the points left up to the weekly budget.
- Example of the new tail: "20% of the spend ($2.00) has not landed. 0.02 landed per point of the week used; the 40 points left should buy about 1 more."
- The change is in
efficiencyWordsinsrc/crew/week.ts, with the newunlandedSinceread insrc/crew/week_read.ts. The note is indocs/features/week-pace.md. test/week.test.tscovers spend on landed versus unlanded work and the words; its existing assertion now expects the newunlandedUsdfield.
What I left out
- Ask 1: stop after a third red.
src/crew/dispatch.ts(answerRed) records that a pull is never stopped or closed for a count of tries, after a red main closed 30 pulls in an afternoon on 2026-11-13.test/engine-keeps-landing.test.tsasserts it. Stopping after three reds would reverse that decision, so I want the owner's word first. The existing stop (the same failure after a rework) is unchanged. - Ask 1: fresh start for a long transcript. Not done.
- Ask 2: splitting large issues before they are built. Not done.
- Ask 4: checks, rechecks and removals while the allowance is gone. Not done.
- Limit on "unlanded": a run counts as landed only if its pull merged within the same window, so work that lands later reads as unlanded until it does.
Try it: open Home or the terminal dashboard on a forge with a measured week. The efficiency sentence ends with the unlanded share and the expected landings.
Changes needed, in one round:
- Direction: this is a feature on the week sentence, not on the pipeline list. The pull says it does only part of ask 3 and drops asks 1, 2 and 4. Narrow the issue to what this pull does, or say in the pull why it comes before the pipeline work.
- unlandedSince counts a run as unlanded when its pull merged before the window opened, and when it is still in flight. Both are work that is not lost, so the share reads too high and the sentence misleads. Count only runs on closed-unmerged pulls and on issues with no pull, or look up merges without the window bound.
- Runs with a null issue_id (checks and other non-issue agent runs) are counted as lost spend. Leave them out or name them.
- unlandedSince runs one query per closed issue number on every Home render. Do it with one JOIN or IN query, and show it is fast on a large run table.
- Tests missing: the landings === 0 path with unlanded spend, a pull that merged before the window, a run with a null issue_id, usedPct 0 and used past the allowance (left clamps to 0). Add one that goes through weekWords, so the terminal dashboard and Home are covered.
- unlandedUsd is optional only so the old callers still compile. Make it required and update the callers, so the type does not allow a missing figure.
This pull adds what the week has bought so far to the week sentence: the share of agent spend that did not land, and what the allowance left should buy. It covers only ask 3 of #14250. I tested it with bun test on test/week.test.ts, test/week-wiring.test.ts and the three migration suites. tsc and the gate are clean. I did not run the rest of the suite, because scripts/fast.ts named 2443 of 3734 files, so the forge's check covers it.
What changed, by review point
- Direction. Ask 3 is the one the owner needs first: the figure has to exist before asks 1, 2 and 4 change what it measures.
docs/features/week-pace.mdnow says so and says the issue is narrowed to ask 3. Asks 1, 2 and 4 stay out; splitting large issues, handing back a red pull, and checks while the allowance is gone are separate work. - Lost spend.
unlandedSincenow counts only runs on a pull closed without merging, and runs on a closed issue that no merged pull closes. The merged-pull lookup has no window bound, so a pull merged before the week is not lost. Open pulls and open issues are in flight and not counted. - Runs with no issue. Checks and other non-issue runs are left out of the lost figure but stay in the total spend. The percentage is lost spend over all agent spend, and the code comment and docs say so.
- One query. A single grouped JOIN reads the spend. A second query reads merged-pull bodies, and only when a closed issue has spend. I added
run_agent_windowonrun(repo_id, created_at) WHERE kind='agent'(migration20261117090000, with its pin). Without it every Home render scanned all of a repository's runs. A test seeds 20,000 runs and asserts the read takes under 50 ms. - Tests added:
landings === 0with unlanded spend, checked against the exact sentence.- A pull merged before the window, an open pull, and an open issue, none counted as lost.
- A run with a null
issue_id. usedPct0, andusedpast the allowance (left clamps to 0).- A
weekWordstest intest/week-wiring.test.ts. It also checksweekLine, which Home uses; the terminal dashboard prints the sameweekWordsstring but is not asserted.
- Required figure.
unlandedUsdis now required onEfficiency, and the existing callers and tests are updated.
Decisions to check
- A closed issue with spend and no closing merged pull counts as lost, including one the owner closed by hand as done. I can't tell that apart from abandonment.
- The migration is new in this round and wasn't in the original pull.
_Posted by the rule watcher, not written by a person._
This pull's check is red on a repo rule:
- no tight wall-clock bound in a test at
test/week.test.ts:164Fix: assert a speed relative to a baseline measured in the same run, or bound it at 200 ms or more (WALL_CLOCK_FLOOR_MS in scripts/flake.ts) so only the failure the test names crosses it.
This pull does only ask 3 of the issue, and only partly. I left out asks 1, 2 and 4 and did not build the "what the week has bought" part. The gate and
tscare clean and the 12 test files that read the week words pass (97 tests).scripts/fast.tsnamed 2,443 test files, which is too broad to run here, so the forge's check will run the rest.What changed
efficiencyWordsinsrc/crew/week.ts, with the newunlandedSinceread insrc/crew/week_read.ts. The note is indocs/features/week-pace.md.test/week.test.tscovers spend on landed versus unlanded work and the words; its existing assertion now expects the newunlandedUsdfield.What I left out
src/crew/dispatch.ts(answerRed) records that a pull is never stopped or closed for a count of tries, after a red main closed 30 pulls in an afternoon on 2026-11-13.test/engine-keeps-landing.test.tsasserts it. Stopping after three reds would reverse that decision, so I want the owner's word first. The existing stop (the same failure after a rework) is unchanged.Try it: open Home or the terminal dashboard on a forge with a measured week. The efficiency sentence ends with the unlanded share and the expected landings.
Closes #14250