Cryptograss:Motion workspaces

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search

A design for moving hunter from per-person workspaces to per-Motion workspaces. Draft for pushback.[unverified]

What the survey found

Block 26,085,700 (2026-09-30), read-only survey of hunter.[unverified]

  • A Motion's working state is scattered across people's homes. A session is filed under the directory it last ran in, not where it began: this Motion's main session started in the home directory and is now stored under a memory-lane worktree.[unverified]
  • A woken turn can only resume a session whose file and directory still exist, in one person's container.[unverified]
  • Justin's home holds 54 extra git worktrees, at least 32 on branches already merged.[unverified]
  • Claude Code appears to delete transcripts about 30 days after their last use. The homes are not an archive; memory-lane is.[unverified]
  • Every hunter deploy recreates all four user containers, ending every live session.[unverified]
  • Previews are per person: justin1.hunter… serves whatever runs on port 4001 in Justin's container. DNS is already a wildcard; certificates are not, and Let's Encrypt allows about 50 new names a week across cryptograss.live.[unverified]
  • Every container mounts the Docker socket read-write, so each can control the others. Code-server is published over plain HTTP.[unverified]

Proposal

Separate three things that per-person containers mix:[unverified]

  • Identity and credentials belong to a person: SSH key, GitHub token, Claude login and billing.[unverified]
  • The workspace belongs to a Motion: its checkouts, its working directory, its session transcripts, its preview.[unverified]
  • Runtime is incidental: whichever process runs a turn.[unverified]

Concretely:[unverified]

  1. A host directory per Motion, /opt/magenta/motions/<slug>/, mounted into every participant's container at ~/motions/<slug>. Everyone runs as uid 1000, so ownership already lines up.[unverified]
  2. Inside it: the Motion's checkouts (git worktrees, one branch per Motion by default) and its session transcripts. Container startup links each Motion's transcript folder into ~/.claude/projects, so a session started in a Motion's directory is stored in the Motion, and any participant's container can resume it.[unverified]
  3. Sessions route themselves. A session whose working directory is inside ~/motions/<slug> is claimed for that Motion by the importer, so nobody has to claim anything by hand.[unverified]
  4. magenta.sh <motion> opens or joins the Motion's workspace: its directory, a tmux session named for it.[unverified]
  5. The poller wakes sessions from the Motion's own folder. Whose Claude account answers is a Motion setting: the natural default is the person who opened it.[unverified]
  6. One preview per Motion, run from the Motion's checkout against the live record, read-only, at <slug>.hunter.cryptograss.live. That needs a wildcard certificate (a DNS challenge through Caddy), or a handful of named ones within the weekly limit.[unverified]

Fixes that don't wait for the design

  • Set Claude Code's transcript retention very high in the deployed settings, so resuming never depends on a file having been touched recently.[unverified]
  • Recreate containers on deploy only when their image or configuration changed, as maybelle already does.[unverified]
  • Prune merged worktrees (with each person's say-so).[unverified]
  • Remove the stray containers left from this work: a hand-started staging Postgres and an orphaned Playwright container.[unverified]
  • Put code-server behind Caddy's TLS, or stop publishing it on all interfaces.[unverified]

Open questions

  • Two people's turns in one checkout at once: a worktree per participant within the Motion, or a lock?[unverified]
  • Which DNS provider serves cryptograss.live, and can Caddy get a wildcard through it?[unverified]
  • Does a Motion's poller run in the opener's container, or in a small runtime of its own?[unverified]
  • Migration: new Motions start in their directory; existing sessions stay where they are.[unverified]