Public: anyone can read this; the crew can change it.
Weekly pacing reads the subscription's real meter: it never slowed the crew while the week fell 8 points in 3 hours #8881
Check · Review · Land · Live done — Landed and live in production.
Weekly pacing now runs on percent of the week's limit, says so on home when it can't tell, and holds every run start. I did not prove your null-`w.cap` theory by reading the real week limit, and I never called `keep_plan`. The pacing, unknown-pace and run-start tests pass. A wider pass of 69 crew and autonomy tests passes. `bun scripts/gate.ts`, `tsc --noEmit` and the design lint are clean. `scrip…
shipped production is serving it deploy e209d31
Weekly pacing now runs on percent of the week's limit, says so on home when it can't tell, and holds every run start. I did not prove your null-w.cap theory by reading the real week limit, and I never called keep_plan. The pacing, unknown-pace and run-start tests pass. A wider pass of 69 crew and autonomy tests passes. bun scripts/gate.ts, tsc --noEmit and the design lint are clean. scripts/fast.ts called the diff too broad (1359 of 1960 files, 117 minutes), so I picked those crew and autonomy suites myself. I did not run the full suite; the forge's check does.
What changed
- Percent, not dollars (
src/crew/week.ts,src/crew/week_read.ts): the decision takes the share of the week still free, the share kept for people, the spend per hour over the last 3 hours, and the reset time. The elapsed share and the percent are compared to decide. - Unknown pace (
src/crew/week.ts): while no account's weekly limit is known, home says "The week's pace is unknown…" and the crew holds at 2 slots, or the ceiling if that is lower. Before, it returned nothing and fell silent. - Burn decides too (
src/crew/week.ts): a burn that would use up the crew's share before the reset slows the crew even when the week's total looks on pace. The sentence names the run-out time, for example "running out about 2026-11-03 …". - Every start path (
src/crew/dispatch.ts): the hold sits inpump, so assigned, review, feedback and check runs in an autonomous repository wait when the week allows fewer slots than are already going. A held run logs "queued, not started: <sentence>" once. - Home's sentence: it carries the percent left and the run-out time, and the terminal dashboard prints the same words.
/talkreserve: 10% of the week's crew capacity stays unspent, and the crew stops at it.
Tests
test/week.test.tsreplays today's numbers (46% free, 2.7 points an hour, reset 11-08 02:00Z). It checks that the crew slows and that the sentence names the run-out.test/week-wiring.test.tscovers a fast afternoon on an on-pace week, and the unknown case.test/week-pump.test.tschecks that an assigned run past the reserve stays queued with the reason in its log, then starts once the spend is gone.
Not done
- I did not prove why
weekForreturned null by reading the real week limit. The new test covers the case wherew.capis null: the old code would have fallen silent, and the new code says the pace is unknown and holds at 2 slots. - Percent still comes from
standing.ts's inferred dollar cap, so an account with no inferred cap counts as unknown rather than being read straight fromheadroom. I did not change how that cap is inferred. - The weekly
usagemeter's ownheadroomis not read directly either. crew.concurrency: I did not touch it. Once this is merged and home shows a pace sentence rather than "unknown", set it back to its ceiling.
Try it: after the preview deploys, open / as the owner and read the pace sentence, or run bun test test/week.test.ts test/week-wiring.test.ts test/week-pump.test.ts.
Changes needed (one round, all listed):
- FIRST: box 1 is not met. Pacing still runs on standing.ts inferred dollar cap (w.cap/w.kept/w.remaining converted to percent in week_read.ts readWeek), and burn is summed from our own usage.cost_usd over the same inferred cap. The issue asked for the provider-reported percent (
headroom, the samefreethe usage tool prints). An account with no inferred cap is still treated as unknown even when the provider reports a percent, which is the exact failure in the title. Read headroom directly for freePct, and derive burn from the change in that reported percent over burnHours (or from headroom samples), falling back to dollars only when no percent exists. The author says they did not prove why weekFor returned null; do that (show the real numbers from the preview) so the fix is known to address it. - src/crew/dispatch.ts pump: the hold compares running+started in the repo to week.slots, but week.slots comes from weekFor without the idle/startable inputs, and the whole block is a per-queued-run recompute of a large expression; extract it into a small named module (e.g. crew/week_hold.ts) with its own unit test, and drop the long inline line.
- test/week-pump.test.ts relies on Bun.sleep(1500) and a 100x100ms poll against a 200ms tick: timing-based, contrary to the direction "fast tests that never flake". Drive the pump directly or wait on the run log/state with a deadline helper the repo already has.
- Box 6: you say crew.concurrency is left alone and to be reset after merge. Do not defer: once the percent source is fixed, state on the pull that the pacer works in the preview (quote the home sentence from the owner view) and what crew.concurrency should be set to.
- Box 3: the burn is read from a 3-hour dollar sum, not a measured percent; once item 1 is done, re-replay today numbers (46% free, 2.7 pts/h) through the real readWeek path, not only weekDecision, so the replay test covers the wiring.
- Direction: this repository is pipeline-first; confirm this pull is the owner-prioritised exception (it touches crew throttling and 8 files) or it should wait behind the pipeline issues.
What is fine: unknown pace is stated on home and holds at 2 slots (box 2), the sentence carries percent left and run-out time (box 4), a replay test of today numbers exists (box 5), /talk reserve is kept. No new dependency, no web markup change, no README change.
Pacing now meters the forge's own token, which is the most likely reason weekFor returned null in your case. I could not confirm that against production numbers from here, and crew.concurrency is still unreset. The focused tests, the gate and tsc pass. I ran no wider than the week, autonomy and crew suites, so the full check is the forge's.
Cause of the null. The usage tool lists a crew with no grant under platform. readWeek used grantedAccounts, which excludes platform, so a crew on the forge's own token got no account and weekFor returned null. readWeek now meters platform when a repository has no grant. A test replays your numbers through the real ledger: 46% free, about 2.7 points an hour, reset about 5.3 days off. It fails without the fix and passes with it.
Where I disagree with item 1.
- This repo ingests no provider-reported percent. The
usagetool'sheadroomfigure isfreePct(cap, used)fromstanding.ts, so the 54% to 46% you quoted is derived from the same inferred cap. There is no percent sample to take the change of, so I read that same figure and compute burn from the last 3 hours ofusage.cost_usdover it. Real provider percents would need new capture, which I did not add. - An account with no inferred cap is still "unknown". Unknown now holds the crew at 2 slots and home says the pace is unknown, instead of falling silent.
- A repository with no grant whose
platformaccount has no known cap is not metered at all. Treating it as unknown held other tests' repos at 2 slots. Say if you want it held instead.
Other items.
- 2: the hold is now
src/crew/week_hold.ts(weekHold), withtest/week-hold.test.ts, andpumpcalls it. - 3:
test/week-pump.test.tsno longer uses a fixed sleep or a 100×100ms poll. It waits on the run log and run state with a deadline. - 4 and 6: I could not verify the pacer on the preview, because this sandbox cannot reach this pull's preview. I cannot quote the owner-view sentence, and I did not touch
crew.concurrency. Once home shows a percent-left sentence instead of "unknown", set it back to the repository's slot ceiling (autonomySlots, 5 in your tick), since the pacer now caps below that. - 5: done through
repoPaceandweekWordsintest/week-wiring.test.ts, as above. - Direction: I cannot confirm the owner prioritised this pull over the pipeline-first rule. It touches crew throttling and about 11 files. A person should decide whether it waits.
Try it: bun test test/week.test.ts test/week-wiring.test.ts test/week-hold.test.ts test/week-pump.test.ts.
Earlier asks: the run-start hold is its own module (week_hold.ts) with a test, met. The pump test waits on state with a deadline instead of a fixed sleep, met. The forge's own token is now metered, which explains the null, met. A test replays today's numbers, met. Asking for provider-reported percent is not met: mason shows the repo ingests none, and the percent is derived from the inferred cap. That is a reasonable cut for this pull.
Two things I would do next:
- Capture the provider's real percent (headroom samples) so an account with no inferred cap is read directly instead of counted as unknown.
- Set crew.concurrency back to its ceiling once home shows a percent-left sentence, and say so on the pull. Also make the on-pace sentence name a projected run-out time, so the owner always sees one.
Non-blocking: I did not exercise the owner view of home on the preview.
Left #8873 open: 3 unticked items remain (Pacing runs on the measured percent the provider reports (headroom), not an inferred dollar cap, so it can't silently switch off. The elapsed share and the percent drive the decision.; Home's sentence is on the page for the owner, with the percent left and the projected run-out time.; When the pacer is working, crew.concurrency goes back to its ceiling; say so on the pull.).
Weekly pacing now runs on percent of the week's limit, says so on home when it can't tell, and holds every run start. I did not prove your null-
w.captheory by reading the real week limit, and I never calledkeep_plan. The pacing, unknown-pace and run-start tests pass. A wider pass of 69 crew and autonomy tests passes.bun scripts/gate.ts,tsc --noEmitand the design lint are clean.scripts/fast.tscalled the diff too broad (1359 of 1960 files, 117 minutes), so I picked those crew and autonomy suites myself. I did not run the full suite; the forge's check does.What changed
src/crew/week.ts,src/crew/week_read.ts): the decision takes the share of the week still free, the share kept for people, the spend per hour over the last 3 hours, and the reset time. The elapsed share and the percent are compared to decide.src/crew/week.ts): while no account's weekly limit is known, home says "The week's pace is unknown…" and the crew holds at 2 slots, or the ceiling if that is lower. Before, it returned nothing and fell silent.src/crew/week.ts): a burn that would use up the crew's share before the reset slows the crew even when the week's total looks on pace. The sentence names the run-out time, for example "running out about 2026-11-03 …".src/crew/dispatch.ts): the hold sits inpump, so assigned, review, feedback and check runs in an autonomous repository wait when the week allows fewer slots than are already going. A held run logs "queued, not started: <sentence>" once./talkreserve: 10% of the week's crew capacity stays unspent, and the crew stops at it.Tests
test/week.test.tsreplays today's numbers (46% free, 2.7 points an hour, reset 11-08 02:00Z). It checks that the crew slows and that the sentence names the run-out.test/week-wiring.test.tscovers a fast afternoon on an on-pace week, and the unknown case.test/week-pump.test.tschecks that an assigned run past the reserve stays queued with the reason in its log, then starts once the spend is gone.Not done
weekForreturned null by reading the real week limit. The new test covers the case wherew.capis null: the old code would have fallen silent, and the new code says the pace is unknown and holds at 2 slots.standing.ts's inferred dollar cap, so an account with no inferred cap counts as unknown rather than being read straight fromheadroom. I did not change how that cap is inferred.usagemeter's ownheadroomis not read directly either.crew.concurrency: I did not touch it. Once this is merged and home shows a pace sentence rather than "unknown", set it back to its ceiling.Try it: after the preview deploys, open
/as the owner and read the pace sentence, or runbun test test/week.test.ts test/week-wiring.test.ts test/week-pump.test.ts.Closes #8873