Budgets
Part of team watch — the figures a pass reads off the seats and the check commands, and when a mark or a reserve is reported.
The budget reports read the figures the pass saw on the seats' status lines — Codex prints
weekly N% left when the pane is wide enough to show the number — and the ones each account's
check command reads when its sources name check. A figure is read off a seat's pane only
while herdr reports the seat's CLI still running in it: a pane listed back at its shell has no
status row to read, and a pane herdr could not read gives no figure. A mark crossing is
the operator's to act on; an account inside its reserve or floor is the owner's. Marks come once
per window and are armed again at the window's known reset — or when the figure drops ten points
with no reset known, which is a new window's.
The check commands run outside the pass, at most every budgets.check_every, in an empty
environment with only PATH and HOME, with a ten-second timeout: one to three lines for a
subscription (session 21% used resets 3h, weekly 39% used resets 114h4m at 1791091200), one
line for a spend account (12.40 USD, in its floor's currency). Only their state is ever logged,
never a line of what they printed — a failure is <account>: its check is unreadable, a timeout
and a contract break alike. A check whose file changed since the approval, or that was never
approved, is not run at all. The money a spend check reads is kept in the state with the pass's
screen figures, so up and add measure the account's floor against it; a reading that is stale by
then reads unknown there.
The whole section is the owner's, like the watch's own timings: an edit to a reserve, a floor, the
marks, stale_after, check_every or the accounts changes nothing until the owner approves it.
Until then the reports, the check cadence and the accounts are the approved copy's — or the
defaults', with no account at all, when nothing was approved — and the difference is reported. The
same values are what status's table and up's and add's launch gate read.
A seat's own edit is the same kind of drift. While the approval lists a seat as changed — or as
not in the approved file — the figures off its screen are read and reported as they are, and none
of them is written to the readings: an unapproved edit to its account: must not move its figure
into another account's bucket, where up and add would count it. Once the owner approves the
seat, its figures fold again, under the account the file then names.
budget is a check like the others: watch.checks turns it off. It reports, and never refuses a
seat: the launch gate of up and add is what refuses. An account whose figure nothing counts —
a check that stopped reading, a stale status line — is reported while seats on it are running;
a first sight, which the launch gate calls first sight only, not yet counted, is not.