Public: anyone can read this; the crew can change it.
A wake counts against the forge's owner once it is claimed and against the forge itself until then, never against whoever sent it #13903
Check · Review · Land · Live done — Landed and live in production.
Issue #13813. forges.wakesperpersonhour (default 30) was counted against the ledger's ownerId, which is whoever sent the forge. All 18 forges on production were sent by one admin, so the whole host had 30 wakes an hour; measured on 2026-11-16, one list call spent 15 of them and the ramp needed the limit raised to 200.
shipped production is serving it deploy 4adf612
Approved. The wake budget is keyed on the forge plus its claimant, or on the forge alone until claimed, and never on the sender. The refusal says whose wakes are spent, the wait, and the limit by its label and URL. The page and the plain-text answer carry the same sentence. Tests cover the key, the wording, and two forges from one sender not sharing a budget. The how-to is updated in docs/features/forge-sleep.md, and README is untouched. It is a narrow fix with no new dependency. I read the diff and tests only; I did not fetch the preview or open the phone and desktop screenshots.
Two things I would do next:
- The refusal shows the owner's username to anyone who loads a sleeping forge, signed in or not. Decide whether that is public anyway. If not, say "its owner" without the name on the unauthenticated waking page.
- The key changes when an unclaimed forge is claimed, so claiming resets that forge's budget. Add a test that pins this on purpose, or carry the count across. The
freshexpression in wakeGate (src/spawn/host.ts) is also dense and would read better as a named helper.
Issue #13813.
forges.wakes_per_person_hour(default 30) was counted against the ledger'sownerId, which is whoever sent the forge. All 18 forges on production were sent by one admin, so the whole host had 30 wakes an hour; measured on 2026-11-16, one list call spent 15 of them and the ramp needed the limit raised to 200. A room of people each waking their own forge would have been refused with "waking too often, try in N s".Whose budget a wake now counts against (
wakeBudget,src/spawn/sleep.ts; read inwakeGate,src/spawn/host.ts)Never against the sender: the ledger's
ownerIdis no longer read for wakes (it still counts a person's forges and storage).Two things decided from the code, said plainly
forges.per_personandforges.storage_mbexempt site admins in code and in their own words ("site admins are not counted"). The wake limit never did, in code or in words, so that is taken as intended: an admin's own forge is counted like anyone's. What ends here is only the accident that every forge an admin sent for someone else was counted as the admin's.The refusal says whose wakes are spent, when the forge can be woken again, and the limit by the name it has in admin limits and where that is; the page and the plain answer (git, API) are the same sentence, and
Retry-Afteris unchanged:Unclaimed: "... all of the 30 wakes an hour a forge has until someone claims it."
Cost: one read of the sleeping forge's own tables (off the serving thread,
childPerson, at most 2 s) before a wake is granted; a forge that is awake, or whose wake is already granted, is not asked. If the read does not come in time the wake counts against the forge itself.Not in this pull: the limit's value and every other limit are unchanged, and none is added. The parent's own questions (
x-forge-parent, the proof at spawn) still spend a wake, as the issue notes; with the budget per forge that is one of 30 for the new forge, not one of the sender's.Checked:
bun x tsc --noEmitexit 0;bun scripts/gate.tsexit 0; on Linux in the 0.7.614 image, the always-run set pluswake-budget(new) andforge-sleep: 1493 pass, 0 fail. The new test's "forges one admin sent do not share a budget" is the measured failure: with the limit at 1, the second forge's first wake was refused before.🤖 Generated with Claude Code