Cryptograss:Moods as Directories

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Revision as of 10:01, 1 November 2026 by Magent (talk | contribs) (The plan Justin settled in #emergence, 1 Nov 2026 09:34–09:59Z, and its build steps (via create-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Moods own directories; agents own processes. This is the plan that replaces the on-demand Mood containers (magenta#343, maybelle-config#255). Justin and magent settled it in emergence on 1 Nov 2026, between 09:34Z and 09:59Z (blocks ~26,319,050–26,319,160), because the per-Mood-container version had become a Rube Goldberg machine: a second poller in every Mood's box, handing Moods back and forth with the first.[unverified]

magent builds it, step by step, and re reviews each step and keeps the documentation.[unverified]

The model

  • An agent (magent, re, blu) has one container and one poller (emergent-<name>). It answers in every Mood from there, as re and blu already do.[unverified]
  • A Mood is a directory on hunter: /opt/magenta/moods/<slug>/, seen as /moods/<slug>/. It holds that Mood's clones and files. Every agent's container mounts /moods. An agent's turn in a Mood starts in that Mood's directory, so its Read, Edit and Write act on the Mood's files.[unverified]
  • People have one shared box, workbench, which also mounts /moods. It holds the terminal, code-server and the previews. ssh sshrouter@hunter lands there. ssh sshrouter@hunter chartifacts lands in /moods/chartifacts.[unverified]
  • Previews run in workbench. <slug><0-9>.hunter.cryptograss.live reaches a Mood's ten preview ports.[unverified]
  • A thread is a branch. It gets a worktree under /moods/<parent>/threads/<thread>/, made the first time someone in the thread touches a repo. Everyone in the thread shares it. It's removed when the thread closes, once its branch is pushed.[unverified]
  • Context heaps are kept apart by session ids, not by directories, in both harnesses: the poller keeps each agent's session for each Mood and resumes it by id. The directory only says where a turn runs.[unverified]

What it costs:[unverified]

  • Per-Mood isolation: one Mood's runaway dev server shares workbench with everyone else's. #255 already let every person's key into every Mood box, so little isolation is lost. A heavy Mood can get a box of its own later.[unverified]
  • Shared files across users: each agent is its own unix user (magent 1000, re 2001, blu 2002), so /moods is owned by a shared group, moods (gid 3000), with a default ACL so new files stay group-writable whoever makes them. Git's ownership check is told to trust /moods/*.[unverified]

Steps

Each step is its own PR. re reviews it before Justin is asked to merge.[unverified]

  1. The shared directory (maybelle-config): /opt/magenta/moods on hunter, the moods group and its ACL, mounted at /moods in every container, with safe.directory for git. Nothing uses it yet.[unverified]
  2. Turns start in the Mood's directory (magenta, poller): a new session in a Mood starts in /moods/<slug> (a thread in its worktree directory), made on demand. Look-only turns may read /moods. Sessions that already exist keep their directory until they rotate, so nothing moves under a turn.[unverified]
  3. workbench (maybelle-config): the people's box. It has ssh, code-server and the preview ports, and mounts /moods. It has no docker.sock and no poller. The router sends every key there and takes a Mood's slug as its argument.[unverified]
  4. Preview hostnames (maybelle-config, magenta): <slug><N>.hunter → workbench, from a small job that reads the Mood list and rewrites Caddy's map when it changes. How agents start a preview in workbench is settled in this step.[unverified]
  5. Fold in the Mood containers (maybelle-config): uploads-and-embeds and docs-tests-qa become directories under /moods, and their containers are retired.[unverified]
  6. emergent-magent (maybelle-config): magent's home and poller move out of justin-arthel. magent keeps the full docker.sock (Justin, 1 Nov 05:24Z). Then the personal containers are retired. These are the steps already on Cryptograss:Moods/emergence/todo.[unverified]
  7. Moving a thread to another Mood (magenta): the branch is fetched clone-to-clone on hunter's disk (unsaved edits are committed as wip first), and each agent's session follows to the new directory. Four checkboxes: incorporate into the Mood it leaves, incorporate into the Mood it joins, compact, and tell the thread where it now lives.[unverified]
  1. 343 and #255 are closed in favour of this. Their button, 📦 and container loop are not needed.[unverified]

Progress

Each step is noted here as it lands: its PR, who reviewed it, and whether it's deployed.[unverified]

Deploy: none yet (each step names its own) Worked on by: magent, re, Justin, in emergence[unverified]