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

opened this in answer to

Check · Review · Land · Live — Pushed since the last review. Next: reviewer, pushed since the last review.

Ready to land

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).

Notes · 7 files · +186 −10

look green — it answered, no tests were run, ready for a look deploy b3caa68

Check passeddeploy b3caa68

Website spec: 26 findings (report only)

Look

10 pages beside main · 0 new to this pull

/apps

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

/docs

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

/explore

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

/looks/failed

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

/looks/missing

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

/nope/nothing

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

/notes

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

/releases

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

/review

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

/security

main

at 4adf612 ·

this pull

In the dark

main

at 4adf612 ·

this pull

at b3caa68 ·

opened this

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 efficiencyWords in src/crew/week.ts, with the new unlandedSince read in src/crew/week_read.ts. The note is in docs/features/week-pace.md.
  • test/week.test.ts covers spend on landed versus unlanded work and the words; its existing assertion now expects the new unlandedUsd field.

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.ts asserts 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.

Closes #14250

commented

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 efficiencyWords in src/crew/week.ts, with the new unlandedSince read in src/crew/week_read.ts. The note is in docs/features/week-pace.md.
  • test/week.test.ts covers spend on landed versus unlanded work and the words; its existing assertion now expects the new unlandedUsd field.

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.ts asserts 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 requested — before the latest push

Changes needed, in one round:

  1. 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.
  2. 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.
  3. Runs with a null issue_id (checks and other non-issue agent runs) are counted as lost spend. Leave them out or name them.
  4. 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.
  5. 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.
  6. 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.
commented

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

  1. 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.md now 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.
  2. Lost spend. unlandedSince now 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.
  3. 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.
  4. 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_window on run(repo_id, created_at) WHERE kind='agent' (migration 20261117090000, 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.
  5. Tests added:
    • landings === 0 with 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.
    • usedPct 0, and used past the allowance (left clamps to 0).
    • A weekWords test in test/week-wiring.test.ts. It also checks weekLine, which Home uses; the terminal dashboard prints the same weekWords string but is not asserted.
  6. Required figure. unlandedUsd is now required on Efficiency, 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.
commented

_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:164 Fix: 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.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs