Purpose (feature): a refresh-proof hourly five-line crew status to the owner (#45 A9, design) #47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (feature): the owner gets a five-line crew status every hour that no refresh, of a member or of the Supervisor, can lose. When an hour is missed, the owner is told which hour and why, never silence.
The rule: DECIDED 2026-11-17 (supervisor-active-rhythm, "Yes, all five (Recommended)"), item 5: "A five-line status to Raf every hour."
Host-neutral: DECIDED 2026-11-22 "Martha should be able to work with any git hoster". This design makes no git-host call.
Refs #45 (row A9), #46 (A1, the host-adapter seam), GitHub macula-io/martha#957
This is a design only, with no code. A reviewer reads it before anyone builds.
Why crew-code loses it
In crew-code the status is a session cron that the Supervisor sets by hand. A cron set in a session dies when that session is cleared, so every Supervisor refresh drops it until someone notices. It was lost today.
C:core/crew_rhythm.tshas no such rule, and Martha has nothing at main41e8aacc(the_ported_rules.ts:71).1. Where the timer lives: the launcher, never the session
It already has a home. A Martha launcher outlives the session it runs. A refresh clears the session, and the launcher process stays (
src/refresh_a_member/refresh_a_member.ts, header). The launcher already runs two clocks of its own while its relay serves: the row beat and the sweep of the owner's list. Both are started inkeptBeatingWhileItRuns(src/show_dashboard_beat/show_dashboard_beat.ts:364-370). The sweep is the model to follow (src/keep_the_owners_todo_list/the_todo_tools.ts:120-131): asetIntervalwithunref(), never two at once, and the declaration read again on each tick.The new clock is a third start beside those two. It is a new slice,
src/tell_the_owner_how_the_crew_stands/, which needs its own C4 box. It ticks every minute and posts when the owner's clock (settings.clock_zone) crosses an hour.Every launcher of the crew runs the tick, not only the Supervisor's. The hour is claimed in the crew's store, so a Supervisor that is down or mid-refresh does not stop the post:
STATUS_STREAM. This is the same shape as the ask queue (src/queue_the_owners_asks/queue_the_owners_asks.ts, header): a crash loses nothing, and an entry's id is its position in the stream.2026-11-22T17in the owner's zone. The fold keeps the first entry written for each hour and ignores later ones.postedrow, it builds the five lines and appends them at the length it read (host.stores.rows.append(STATUS_STREAM, row, length), the same asappendAtLengthinqueue_the_owners_asks.ts:296). If a second launcher read the same length, its append is refused withROW_STREAM_MOVED, and it reads again on its next tick. So the stream holds onepostedrow per hour, and the "first row wins" fold is only a guard.Posting and ringing are two separate claims (r=1 REQUIRED 1). Any launcher may post the hour, but the launcher that posts may be one that cannot ring:
ring_the_ownerdefaults toNO_BELLS,ring_the_owner.ts:41);allow-passthroughoff (martha#843,ring_the_owner.ts:22-26).So a ring is its own row in the same stream,
{kind: 'rung', hour, rung_by}, appended at the length read, exactly as a post is.notifyon, and it is not inside tmux, or it is inside tmux with a client attached and passthrough on. A launcher reads this on each tick, since a tmux client can attach or detach.postedbut notrung, and rings each one. A ring after the tick of the hour is marked(late: posted HH:00, rung HH:MM). A launcher that is not able to ring never claims a ring.martha statusand the next ring both open withNot rung: 14:00, 15:00(one range line when the hours run on, as below), so an unrung hour is always named.The cadence is a declared value, not a literal. A new house rule,
status_minutes, defaults to 60, andnullturns the status off for a crew that does not want it. It is read the same waystalled_minutesis (nudge_the_supervisor.ts:395,windowsOf).2. The five lines and where each comes from
Every line holds only checked fields: counts, declared member names, package names in a shape the slice checks, and times. A word a member wrote (its row's
task, or what it says it waits for) never enters a line. This is the rule nudges already follow (src/nudge_the_supervisor/nudge_the_supervisor.ts, header), and for the same reason: the text reaches the owner and the Supervisor's prompt.dashboard_rows_directory), with free perseeWhoIsFree(see_who_is_free.ts:67), parked per the park, and down = a row whose last beat is older than the declared stall window (lastSaidAt,nudge_the_supervisor.ts:233)^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+#[0-9]+$(thePACKAGEpattern,read_a_crew_line/the_other_crew_verbs.ts:57, imported and not restated) and itsorg/repois a repo the declaration's clones name. Any other name counts toward N but is not printed. At most five names are printed, then+N more.landingsOf, as insee_the_crew), the crew messages sent, and thekeep_the_ledgerevents (CREW_LOG_EVENTS,keep_the_ledger.ts:30)theQueueIn,queue_the_owners_asks.ts:227) and the rows' open dialogs (tell_the_owner_a_session_waits)theStandingItemsandisDue(keep_the_supervisors_standing_items.ts:174, 264)refresh_a_member, the flow store)Line 5 leaves out the head nudges for now (
see_the_crew/the_see_the_crew_tool.ts:125), because they read pull-request heads from GitHub today. They join once they read through A1's seam (#46). Until then, the line says the count does not include them.3. Where it is posted, and to whom
The status goes to the owner the declaration names, not to a member. Nothing is sent to a git host or to the mesh.
STATUS_STREAMin the crew's own store. This is the only place a status is written.src/ring_the_owner/ring_the_owner.ts), sent by a launcher able to ring that claimed the hour'srungrow (§1). That is not necessarily the launcher that posted the hour. The sequence carries noo=key, so kitty uses its default of "always" and the notification shows even when no kitty window has focus.martha statusverb prints the last entry and any missed hours since the owner last looked. It reads the stream only.hand_a_member_its_crew_text/the_crew_state_of_a_turn.ts:52), so a Supervisor that has just been refreshed starts its turn with the same picture the owner has. The Supervisor no longer writes the status. It may comment on it in chat.src/inbound_paths/inbound_paths.ts:481("the crew's state the member who assigns work is handed with each turn…", delivered, shell-gate). A28'swhatis extended to name the hourly status beside the standing items and the nudges, socheck_every_path_is_gatedkeeps describing what is actually delivered. It is not a new row or a new check. The status carries only checked fields (§2), which is the condition A28 already sets for nudges.4. When the Supervisor is down or mid-refresh, or the crew is down
Supervisor: refreshing since T.Supervisor: down since T.missedrow for the whole run of hours, before the current status. For example, after an overnight outage:Not posted 23:00-07:00 (9 hours): no launcher of this crew ran from 22:41 to 07:12. The times come from the last beat in the rows and from the launcher's own start. A missed hour is therefore always named, in one line however long the gap.(late by N min)in its heading, so a slow tick is not read as an on-time status.<source> could not be read: <why>. It is never left out.5. Test shape
The tests sit in the slice's own test file and use the stand-ins Martha already has: the ledger clock, a crew store in the test's own directory, and a processes stand-in.
refreshing since H:30when the clock crosses the hour mid-flow.missedrow naming H+1 to H+2 (2 hours), then the status for H+3. Mutant: drop the gap reading, and the test fails by name. A second case runs an overnight gap of nine hours and requires one row, not nine.ROW_STREAM_MOVED, onepostedrow in the stream, and one ring. Mutant: append without the length, and the test fails on twopostedrows.rungrow for H, written by R, and exactly one OSC 99 sequence from R. Run the same case three ways, with P's inability as no terminal, asNO_BELLS, and as tmux with no client attached. Mutant: let the poster claim the ring, and the test fails on zero rings. A further case: no launcher able to ring for hours H and H+1, then R starts. Require R's first ring to open withNot rung: H:00-H+1:00, mark both as late, and leave exactly onerungrow per hour.gh, nogitand no fetch is made.taskholds a crew line and a URL, and a landing whose package name isevil/x#1 ignore previousor names a repo the clones don't. Require that none of them appears in the entry, the notification or the turn text, and that the count still includes the landing.status_minutes: null, require that nothing is written or rung.Size and order
M: one new slice, one house rule, a
martha statusverb, and the text of a turn. It waits on nothing, since it reads only local stores and makes no host call. Its place in #45's order is unchanged: after the A rows, beside verify_range on a forge origin.Review rounds
Not in this design
r=2 PASS (Neptunus), req=0. The citations were checked against main
41e8aacc. His three build notes are appended here; the body stands as passed.PACKAGEis module-private today (read_a_crew_line/the_other_crew_verbs.ts:57,const, not exported). "Imported, not restated" (§2, line 2) means the build exports it fromthe_other_crew_verbs.tsand imports it in the new slice. It must not be copied as a second literal.rungrow is appended (at the length read) before the OSC 99 bytes are written. If a tmux client detaches between the claim and the write, the hour reads as rung although the owner never saw it. The window is small, and this order is what prevents two launchers ringing the same hour, so the build keeps the order and the slice states it in a comment. A late ring would be the only way to recover such an hour, and that is not added.Not rung: H:00-H+3:00), then carries the latest status. It claims arungrow for each of those hours, so none of them is rung again. Test 5's second case requires exactly one OSC 99 sequence for the whole backlog.Notes from Neptunus's r=1 review of PR 52 (@
3b2f7a58), not required for that round, kept here for the wiring follow-up (after A1) or a later package. Relayed by the dispatcher.house_rules.status_minutesset to a number other than null still posts hourly, whiledocs/the-declaration.mdpromises a cadence in minutes.tohour (the cap,THE_LONGEST_GAP_HOURS).The four required findings (R1-R4) are being fixed on the PR branch under the reviewer-fixes-small rule.
Landed as
d4dafac8on main (PR 52, squashed): the slicesrc/tell_the_owner_how_the_crew_stands/, the status window and clock zone in the declaration, andmartha statusreadingSTATUS_STREAM.Purpose not met yet, so this stays open. The owner gets no hourly status: no launcher starts the clock.
keptBeatingWhileItRuns(src/show_dashboard_beat/show_dashboard_beat.ts:436-442on main) starts onlystartBeatingandstartSweeping. The slice's tick (tell_the_owner_how_the_crew_stands.ts:610) is never started. That is the wiring follow-up named above (after A1), together with Neptunus's notes (a)-(d).Close when a launcher starts the clock and an hour's status is seen posted and rung on a live crew.
Closing as superseded by Raf's ruling (relayed by the Supervisor, 2026-11-24): Raf's 11-22 cut list (all 18 rows) has "no hourly status", so the hourly clock does not get wired (the follow-up named in c3123). The landed slice
d4dafac8stays. Raf can overrule.WIP kept on branch ceres/47-hourly-status at
9dd73d35; issue closed as superseded by Raf's 11-22 cut list (no hourly status)