VersionControl:PRs/maybelle-config/259

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
maybelle-config#259: hunter: the Mood containers fold into /moods; magent's poller is its only one (Moods as Directories, step 5)
State 🟣 merged 2026-11-01 14:31:31
Worked on by magent, re, justin
Moods #emergence
Deploy hunter, after #256, #257 and #258 (one redeploy covers all four)
Branch fold-mood-containers → production, by magent-cryptograss
Opened · last pushed 2026-11-01 10:32:58 · 2026-11-01 10:32:54
Step 5 of [Cryptograss:Moods as Directories](https://pickipedia.xyz/wiki/Cryptograss:Moods_as_Directories). **Stacked on #258, which is stacked on #257, which is stacked on #256.** Merge in order.

**What it does**
- **Retires uploads-and-embeds and docs-tests-qa.** uploads-and-embeds was delivery-kid before #251, which is merged but never deployed: `delivery-kid-arthel` is still the running one, so both names are in `retired`.
- **Folds their workspaces into `/opt/magenta/moods/<slug>`,** once and whole (`hunter/scripts/fold_mood_homes.py`, inventory `folds`): clones, worktrees, uncommitted edits, and branches on no remote. It's a move on one disk, so nothing is copied.
  - Each worktree's absolute paths (its `.git` file and its `gitdir`) are rewritten from `/home/magent/workspace/` to `/moods/<slug>/`.
  - The group `moods` gets the lot, with its ACLs.
  - A `.folded-from` file records what came from where. A name the Mood's directory already has stays where it was, and the file says so.
- **justin-arthel's poller becomes magent's only one** (`magent_only_poller` → `--only-poller yes`). The sessions in the retired containers stay on their homes' disk and aren't resumed. A mention in those Moods starts over from the record, instead of waiting on a container that no longer exists.
- **Retiring no longer `chdir`s.** A container whose directory was never made (uploads-and-embeds, since #251 never deployed) is skipped instead of failing the deploy. `chdir` ran before `removes` could say there was nothing to do.
- **The old `<name>0-9` hostnames come back through `moods.caddy`** (step 4), from workbench, once the containers are retired.

**Tested**
- **On a copy of uploads-and-embeds' real workspace** (334M, in a throwaway container): the fold moved games, magenta, maybelle-config, memory-lane and pickipedia. From `/moods`, all 21 worktrees resolve with **none prunable**, and the uncommitted edits are all there (8, 1 and 1, the same as before). `getfacl` shows `group:moods:rwx` and the default ACL.
- **Unit tests:** `test_fold_mood_homes.py` (5 new, against real git worktrees, including git agreeing on the repointed paths) and a new `--only-poller` test. The hunter suite now has 64 tests, all passing.
- **`render_diff.py` against production:** the two containers' sites, ports and router entries go, and nothing else changes.

**Heads-up for Skyler:** uploads-and-embeds' work, including branches on no remote and uncommitted edits, will be at `/moods/uploads-and-embeds`. Reach it with `ssh sshrouter@hunter uploads-and-embeds`.

Deploy: hunter, after #256, #257 and #258 (one redeploy covers all four)
Worked on by: magent, re, Justin, in #emergence