Expand description
borg top [--dir DIR] [--once] [--json]: the drones of each collective, one screen.
Local drones come from presence records (presence.rs), remote ones from what the mesh daemon
last heard from members (only for a collective that may sync). Drones are designated by start
order across both, Borg style: “Two of Five”. --dir shows only the collective DIR routes to;
otherwise every collective on this machine that has drones. On a terminal it is a live screen until
q (top_live.rs); piped, or with --once, it prints the text once; --json prints the same data
for scripts.
Messages (msg.rs): each local drone’s unread count (what its next prompt or tool call shows), and
the collective’s last few messages, one line each. A remote drone’s reads are claimed on its node.
A sender is named by what its line claims, with the node the mesh checked it against (sender).
The messages to the engineer the screen shows some of the text of are acknowledged as theirs when no
session runs it, as borg inbox acknowledges what it lists from a terminal (engineer_looks,
acknowledge): a drone’s borg top, printed or live, acknowledges nothing; --json acknowledges
nothing.
Lesson selection (select.rs): one line per collective once its summary has folded a graded check,
or while a policy other than the default (a switch) or the monitor’s revert decides (Selection);
--json carries it in full as select. borg status prints the same line, borg web the rest.
borg itself (version_line): one line over the collectives when a newer release exists (update.rs)
or a member’s mesh protocol differs from this node’s (protocol.rs), none otherwise. borg status
and borg doctor say the rest; --json leaves it out.
Structs§
- Budget
- An engineer’s budget for the collective (
collectives.jsonbudget, select.rsbudget_of): the pool tokens its checks may read per session on average, what they read per session, and the price per pool token the policy weighs a larger pool against (select/policy.rsprice, λ). - Count
partofwhole(a share), named.- Draws
- The test’s checks at one k (
Test::by_k): uniform draws give each s aboutran / (k + 1). - Drone
- Estimate
- An effect and its interval, as the policy reports them.
- Evaluation
- The monitor’s weighted estimate (select/policy.rs
Monitor), the auto-revert’s evidence, and how far it can be trusted. - Inbox
- The messages side of a collective’s screen.
- Latency
- One harness’s stop check latency against its stop budget, over the stops’ model calls the summary
keeps (select/summary.rs
Pool::stops, the newestLATENCY_KEEP). - Measurement
- What the checks measure for the learned policy without costing the fixed rule any quality: under the
fixed default the placebo collects the not-now labels the fixed rule’s own history cannot give
(tasks/todo.md, amendment 2026-10-29). Counted over the applies the summary keeps, as
labelscounts its placebo rows (select/summary.rsApply, its route and label). - Selection
- Lesson selection (select.rs) as the monitor shows it: one line per collective in
borg statusandborg top, in full on borg web’s Conscience tab (/api/select). Every number is read from the store’s selection summary (select/summary.rsload: its counts, its fit, its monitor) and the policy’s own functions, never refitted here; only shares, the declaration’s difference and the latency quantiles are taken of the summary’s counts. A section the summary does not carry yet is empty, which every surface shows as not measured yet, never as 0. Spend is measured and shown, and priced only under a budget an engineer set for the collective (budget). - Spend
- One cost source’s spend over the sessions folded (
Selection::sessions). - Test
- The randomised question-count test of the learned policy (select/policy.rs
choose; docs/delivery.md “The question-count test”), all-time as the summary counts it (select/summary.rsExperiment), never recounted from the log. On a live check, of the k lessons below grade 3 the fixed rule delivers and that may go free, s drawn uniformly in 0..=k are asked and the rest handed over: nothing is withheld. - Yield
- The pool’s yield at fill positions
from..to(0 first): of the lessons shown there, those applied, and the fitted chance (monotone over positions).
Constants§
- COLUMN_
NODE_ CHARS - Display: the characters of a node key in a drone table’s column (here, and top_live.rs’s
NODEcolumn): enough to tell a collective’s few members apart, short enough for the column. A message names its node longer (msg.rsNODE_CHARS), where the key is the one part the mesh checked. - RECENT
- Display: how many messages the screen lists.
Functions§
- acknowledge
- Acknowledges the messages to the engineer among
shown, the ones a screen of the store athomeput in front of them, as the engineer of the repo atcwd(msg.rsack_engineer), asborg inboxdoes for what it lists.doneholds the ids an earlier frame of the same screen already passed on, so a live screen asks git for the engineer and reads the log’s seen lines once per new message to an engineer, never on every frame; the ids are recorded whether the write worked or not (best effort, as the inbox’s: unacknowledged, a message holds its sender’s window until it expires). Only for a screen the engineer looks at (engineer_looks);--jsonis for scripts, not the engineer’s eyes, and acknowledges nothing. - assemble
- The drones of the collective stored at
home(pure over its inputs, for tests). - column_
node - A node key as a drone table’s column shows it: its first
COLUMN_NODE_CHARS. - drones
- The drones of the collective stored at
homeas ofnow; remote ones only if it may sync. - engineer_
looks - Whether the engineer is the one looking at a screen of the collectives whose drones are
drones:caller(msg.rscaller, the session whose shell runs this command) finds no session over any of them, asborg inboxacknowledges as the engineer only when it finds none. A harness runs a drone’s commands piped, or on a pseudo-terminal where a plainborg topis the live screen (top_live.rs), and in the engineer’s repo, so without this test a drone’sborg topwould acknowledge as the engineer what only its model saw: its senders’ windows to the engineer opened, the messages read on every node. A shell naming sessionscallercannot tell apart is a session’s too. Every collective’s drones count, not only those of the one acknowledged in: opencode’s shell names its session only through the drone of its pid, which may be another collective’s. - gather
- Every collective to show with its drones, and the line on borg itself over them (
version_line, over every collectivedirroutes to, shown or not) (top_live.rs). - inbox
- The messages of the store at
homefor itsdronesas ofnow(one read of the log, one directory listing per local drone that has a message). - judge_
length_ line - One judge’s effective length as one line (
borg status): the budget and whether evidence moved it, the answered share per prompt-size step with what it decided, and the step explored with its chance. - main
- message_
line - One message as one screen line (without its age):
sender -> recipient: text(msg.rs keeps the text on one line, its whitespace collapsed). - recipient
- Whom
tonames, as the screen says it:local(this machine’s sessions),collective(every member’s), the engineer, the drone it is, else the start of the session id (msg.rsshort_session). Another node’slocal(it never travels, msg.rsstays_here) is named with that node’s short key (msg.rsshort_node). - render
- One collective’s screen.
- render_
with renderwith the collective’s selection line under it, whenborg topshows one (Selection::shown).- resolve
- Which drone
targetnames: “local”, “collective” or “all”, a designation (“Two”, “Two of Five”, “2”) or a session id (or a unique prefix of at least 4 characters).Ok(None)is every drone. Live first, then local: an id or prefix that matches a running drone names it over an ended one (which never reads a message), and among those one on this machine over one on another node; a remote drone is named only when none here matches as well (or by its number, which names one drone of all). - selection
- The selection of the store whose lessons file is
lessons, underpolicy(select.rspolicy). - selection_
line sas one line (borg status,borg top): what decides (the default named as such, a policy opted into by its switch), then the checks folded, how often the policy deviated from the fixed rule, the learned decisions the fixed rule took over per reason (only those that happened), the question-count test (test_line), what the checks measure for the learned policy (placebos), the monitor’s reading (the auto-revert’s evidence) with its weights’ effective number and largest weight, the stops’ latency per harness against its stop budget, and what selection spent per session; a budget and its price only where an engineer set one.- sender
- Who sent
m, as the screen says it: the drone its (node,by) pair is, else its label (msg.rssender_label: the name it was sent under, else the start ofby); the engineer by email. Every part but the node is the sender’s claim, so a line from another node thanherecarries that node’s short key (as msg.rsline). - shows_
last - Whether a line of
totalcolumns, cut towidthascutcuts it (its firstwidth - 1and…; top_live.rs cuts its lines the same), still shows any of its lastlastcolumns: all of them when the line fits, else those before the…. A message’s line ends with its text, and one cut before any of it names only who wrote to whom. - to_json
- to_
json_ with to_jsonwith the messages side: each local drone’sunread, and the collective’smessages.- unread_
cell - A drone’s unread count as the screen shows it:
-where this node cannot tell (a remote or ended one). - unread_
of - Per live local drone’s session, how many of the already-read
allmessages were not shown to it (here: this node, msg.rsnode). - version_
line - The line over the collectives when borg itself needs the engineer, none otherwise: a newer release
than this borg (
checked, the last release check; ignored whilecheckis off,BORG_UPDATE_CHECK=off), then per store instores(only one withmesh/) each member nothing syncs with, and each member on an older protocol with what it misses (protocol.rsNOTES). A member on this node’s protocol, even on a newer borg, is no news here (borg statuslists it). - wake_
cell - A drone’s wake as the screen shows it:
on(it listens, the next stop starts its waiter),waiter(its waiter runs),-(it is never woken, or this node cannot tell). - word