martha room --follow: the owner follows the whole crew room and speaks in it (lazymartha#6, package 4a) #364

Closed
opened 2026-12-02 11:04:58 +00:00 by saturnus · 1 comment
Member

Purpose (feature): the owner follows the whole crew room from outside any member, as JSON lines on stdio, and says something into it, so lazymartha's room pane (martha-ai/lazymartha#6, package 4) has a child to run.

DECIDED 2026-12-02 "Whole room" (Raf: the owner sees the whole room, not only the lines addressed to the owner).

What changes from the design (lazymartha#6, r=2 section)

The design reads the room through readRoomThroughItsGate and admit_a_room_message, which gate mesh rooms by node id. martha's runtime never calls that read (only its tests do): the crew room in martha is the martha_channel rows stream (keep_the_crew_channel/crew_channel.ts). Members write it with say_to_the_crew (send_a_crew_message), and each member is handed only the rows addressed to it (hand_a_crew_message_to_its_member). Following a mesh room would show the owner nothing.
So:

  • No node id and no mesh key for the owner. The owner's place in the room is the declaration's owner name, which already exists.
  • "Whole room" is a reader, not a widened mesh gate. The owner's reader yields every channel row, in order. The member path is unchanged: a member is still handed only its own rows.
  • The owner's line is appended through the channel's one append, as the owner's. The row carries an owner mark that only the owner's append sets, because nothing stops a member being declared under the owner's name.

Refused, each by a test

  1. A member is handed a row that is not addressed to it, or to the crew: the member path stays as it is.
  2. A member's send carries the owner's mark: a row from say_to_the_crew never has it, even when the member's name equals the owner's.
  3. The owner sends to a name that is neither a member nor the crew: nothing is written, and the answer names the roster.
  4. martha room runs from inside a member: it is refused as every owner act is. This one is wired after martha#361 (PR 363) lands, because it shares that PR's files.

Harm each change could do

  • The owner's reader shows text a member wrote. That text reaches a person's terminal, not a model, and goes out as JSON strings; the TUI draws it as text.
  • A row marked as the owner's would carry the owner's authority to members. Only the owner's append can set the mark, and that append runs only outside a member (refusal 4).

Done when

  1. martha room --follow prints each channel row once, oldest first, as one JSON line (position, from, to, text, sent_at, by_owner), then each new row as it lands.
  2. A line on its stdin ({"to": "crew" | [names], "text": ...}) is appended as the owner's, and the result is printed as one JSON line.
  3. The four refusals above, each with a test that fails when its guard is removed.
  4. The whole npm test passes.

Refs martha-ai/lazymartha#6

Purpose (feature): the owner follows the whole crew room from outside any member, as JSON lines on stdio, and says something into it, so lazymartha's room pane (martha-ai/lazymartha#6, package 4) has a child to run. DECIDED 2026-12-02 "Whole room" (Raf: the owner sees the whole room, not only the lines addressed to the owner). ## What changes from the design (lazymartha#6, r=2 section) The design reads the room through `readRoomThroughItsGate` and `admit_a_room_message`, which gate **mesh** rooms by node id. martha's runtime never calls that read (only its tests do): the crew room in martha is the `martha_channel` rows stream (`keep_the_crew_channel/crew_channel.ts`). Members write it with `say_to_the_crew` (`send_a_crew_message`), and each member is handed only the rows addressed to it (`hand_a_crew_message_to_its_member`). Following a mesh room would show the owner nothing. So: - **No node id and no mesh key for the owner.** The owner's place in the room is the declaration's `owner` name, which already exists. - **"Whole room" is a reader, not a widened mesh gate.** The owner's reader yields every channel row, in order. The member path is unchanged: a member is still handed only its own rows. - **The owner's line** is appended through the channel's one append, as the owner's. The row carries an owner mark that only the owner's append sets, because nothing stops a member being declared under the owner's name. ## Refused, each by a test 1. A member is handed a row that is not addressed to it, or to the crew: the member path stays as it is. 2. A member's send carries the owner's mark: a row from `say_to_the_crew` never has it, even when the member's name equals the owner's. 3. The owner sends to a name that is neither a member nor the crew: nothing is written, and the answer names the roster. 4. `martha room` runs from inside a member: it is refused as every owner act is. This one is wired after martha#361 (PR 363) lands, because it shares that PR's files. ## Harm each change could do - The owner's reader shows text a member wrote. That text reaches a person's terminal, not a model, and goes out as JSON strings; the TUI draws it as text. - A row marked as the owner's would carry the owner's authority to members. Only the owner's append can set the mark, and that append runs only outside a member (refusal 4). ## Done when 1. `martha room --follow` prints each channel row once, oldest first, as one JSON line (`position`, `from`, `to`, `text`, `sent_at`, `by_owner`), then each new row as it lands. 2. A line on its stdin (`{"to": "crew" | [names], "text": ...}`) is appended as the owner's, and the result is printed as one JSON line. 3. The four refusals above, each with a test that fails when its guard is removed. 4. The whole `npm test` passes. Refs martha-ai/lazymartha#6
Author
Member

Landed: main dc3fa0e6 (e140180a "Land martha-ai/martha#364 (PASS r=1)", batch PR 371; Jupiter PASS r=1 on 28b8909b..e4a8d6ad). Done when: 1-3 are in the landed tree (e4a8d6ad is an ancestor of main, the files match); 4: the whole npm test passed on the tip, and the land PR runs (ci 6945, suite 6946, heavy 6947) are green on dc3fa0e6.

Landed: main dc3fa0e6 (e140180a "Land martha-ai/martha#364 (PASS r=1)", batch PR 371; Jupiter PASS r=1 on 28b8909b..e4a8d6ad). Done when: 1-3 are in the landed tree (e4a8d6ad is an ancestor of main, the files match); 4: the whole npm test passed on the tip, and the land PR runs (ci 6945, suite 6946, heavy 6947) are green on dc3fa0e6.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha#364
No description provided.