build: undo for the 0298 move + trial-reset wipes per community (ADR 0298 d.4.5) — #2094 #2096

Closed
opened 2026-10-30 02:52:56 +00:00 by ben · 3 comments
Owner

Parent

  • Spec: #2094
  • ADR 0298 · DDR 0299 · wireframe docs/ux/wireframes/shell/shell-hb-health-board.html · flow docs/ux/flows/shell.mermaid node HB · build plan docs/superpowers/plans/2026-10-29-many-communities-one-app.md (exact names, signatures, file homes and tests per task). All land with design PR #2093.

What to build

A scripts/restore-pre-0298.sh puts a moved seat back. It moves communities/ and communities.json aside (never deleting), then restores the root from pre-0298-backup/. It refuses while the app runs or with no backup. The trial-reset wipe script learns the new layout: --community <id> wipes one folder plus its registry entry, the default wipes all of them plus the legacy entries, pre-0298-backup/ is kept unless --include-backup, and idip-keychain.json joins the state list. Plan Task 3.

Anti-goal (Ben): never disturb Whakatōhea Demo's existing seat (~/.config/IDSS on Ben's laptop). Nothing in this ticket may sync, push, deploy or open SSH to a gateway except where the ticket says so.

Acceptance criteria

  • Restore round-trips a seeded root back to its pre-move tree (diff clean apart from the aside-renamed post-0298 folders).
  • Restore refuses with no backup and while an IDSS process runs.
  • Wipe --community leaves another community's folder intact; wipe keeps pre-0298-backup/ by default; --dry-run lists both layouts.
  • scripts/tests/restore-pre-0298-test.sh passes in the offline seam sweep.

Blocked by

Task manifest

task: undo-and-trial-reset
implements_flow: shell
implements_edge: none (operator tooling)
wireframe: none
interface: |
  scripts/restore-pre-0298.sh [--root DIR] [--dry-run]
  wipe-community-env.sh --community <id> | --include-backup
seam: scripts/tests/restore-pre-0298-test.sh
unproven_by_seam: none
acceptance:
  - given: a root moved by the 0298 move
    when: restore-pre-0298.sh runs
    then: the root matches its pre-move tree and nothing is deleted
depends_on: [communities-registry-and-move]
out_of_scope: [app-code]
needs_human_decision: []
## Parent - Spec: #2094 - ADR 0298 · DDR 0299 · wireframe `docs/ux/wireframes/shell/shell-hb-health-board.html` · flow `docs/ux/flows/shell.mermaid` node HB · build plan `docs/superpowers/plans/2026-10-29-many-communities-one-app.md` (exact names, signatures, file homes and tests per task). All land with design PR #2093. ## What to build A `scripts/restore-pre-0298.sh` puts a moved seat back. It moves `communities/` and `communities.json` aside (never deleting), then restores the root from `pre-0298-backup/`. It refuses while the app runs or with no backup. The trial-reset wipe script learns the new layout: `--community <id>` wipes one folder plus its registry entry, the default wipes all of them plus the legacy entries, `pre-0298-backup/` is kept unless `--include-backup`, and `idip-keychain.json` joins the state list. Plan Task 3. **Anti-goal (Ben):** never disturb Whakatōhea Demo's existing seat (`~/.config/IDSS` on Ben's laptop). Nothing in this ticket may sync, push, deploy or open SSH to a gateway except where the ticket says so. ## Acceptance criteria - [ ] Restore round-trips a seeded root back to its pre-move tree (diff clean apart from the aside-renamed post-0298 folders). - [ ] Restore refuses with no backup and while an IDSS process runs. - [ ] Wipe `--community` leaves another community's folder intact; wipe keeps `pre-0298-backup/` by default; `--dry-run` lists both layouts. - [ ] `scripts/tests/restore-pre-0298-test.sh` passes in the offline seam sweep. ## Blocked by - #2093 - #2095 (communities registry + move) ## Task manifest ```yaml task: undo-and-trial-reset implements_flow: shell implements_edge: none (operator tooling) wireframe: none interface: | scripts/restore-pre-0298.sh [--root DIR] [--dry-run] wipe-community-env.sh --community <id> | --include-backup seam: scripts/tests/restore-pre-0298-test.sh unproven_by_seam: none acceptance: - given: a root moved by the 0298 move when: restore-pre-0298.sh runs then: the root matches its pre-move tree and nothing is deleted depends_on: [communities-registry-and-move] out_of_scope: [app-code] needs_human_decision: [] ```

swarm-claim host=bens-mac-04 run=57224
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=57224 (automated multi-host claim — lowest live claim id works this ticket)

⏩ independent reviewer for #2096 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #2096 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #2096 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261030-010251-adba28 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 2096,
  "status": "success",
  "commits": [
    "f1abee79"
  ],
  "changed_files": [
    ".claude/skills/trial-reset/SKILL.md",
    ".claude/skills/trial-reset/scripts/wipe-community-env.sh",
    "STATUS.md",
    "scripts/restore-pre-0298.sh",
    "scripts/tests/restore-pre-0298-test.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/restore-pre-0298-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Restore round-trips a seeded root back to its pre-move tree (diff clean apart from the aside-renamed post-0298 folders)": "scripts/restore-pre-0298.sh sets communities/ and communities.json aside to *.post-0298-<ts> and moves pre-0298-backup/ entries back to root; test 'round-trips a seeded root' strips the aside folders and runs `diff -r orig root` clean (scripts/tests/restore-pre-0298-test.sh)",
    "Restore refuses with no backup and while an IDSS process runs": "restore refuses (exit 1) when pre-0298-backup/ is absent and when the IDSS_RESTORE_PGREP probe reports a live process; tests 'refuses with no backup' and 'refuses while an IDSS process runs' (the latter also asserts the tree was untouched)",
    "Wipe --community leaves another community's folder intact; wipe keeps pre-0298-backup/ by default; --dry-run lists both layouts": "wipe-community-env.sh --community <id> removes only communities/<id> + its jq-dropped registry entry; default wipe keeps pre-0298-backup/ unless --include-backup; --dry-run lists both layouts — tests '--community wipes one', 'default wipe keeps backup', '--include-backup removes it', '--dry-run lists both layouts'",
    "scripts/tests/restore-pre-0298-test.sh passes in the offline seam sweep": "new test lands under scripts/tests/*.sh (auto-swept by scripts/seam-smoke.sh); runs green with 12 checks, pure bash, no toolchain/network"
  },
  "summary": "Undo script for the 0298 move plus a trial-reset wipe that learns the communities/ layout, proven by a 12-check offline seam.",
  "blockers": []
}
**close-report** for #2096 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261030-010251-adba28` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 2096, "status": "success", "commits": [ "f1abee79" ], "changed_files": [ ".claude/skills/trial-reset/SKILL.md", ".claude/skills/trial-reset/scripts/wipe-community-env.sh", "STATUS.md", "scripts/restore-pre-0298.sh", "scripts/tests/restore-pre-0298-test.sh" ], "tests": [ { "command": "bash scripts/tests/restore-pre-0298-test.sh", "exit_code": 0 } ], "criteria": { "Restore round-trips a seeded root back to its pre-move tree (diff clean apart from the aside-renamed post-0298 folders)": "scripts/restore-pre-0298.sh sets communities/ and communities.json aside to *.post-0298-<ts> and moves pre-0298-backup/ entries back to root; test 'round-trips a seeded root' strips the aside folders and runs `diff -r orig root` clean (scripts/tests/restore-pre-0298-test.sh)", "Restore refuses with no backup and while an IDSS process runs": "restore refuses (exit 1) when pre-0298-backup/ is absent and when the IDSS_RESTORE_PGREP probe reports a live process; tests 'refuses with no backup' and 'refuses while an IDSS process runs' (the latter also asserts the tree was untouched)", "Wipe --community leaves another community's folder intact; wipe keeps pre-0298-backup/ by default; --dry-run lists both layouts": "wipe-community-env.sh --community <id> removes only communities/<id> + its jq-dropped registry entry; default wipe keeps pre-0298-backup/ unless --include-backup; --dry-run lists both layouts — tests '--community wipes one', 'default wipe keeps backup', '--include-backup removes it', '--dry-run lists both layouts'", "scripts/tests/restore-pre-0298-test.sh passes in the offline seam sweep": "new test lands under scripts/tests/*.sh (auto-swept by scripts/seam-smoke.sh); runs green with 12 checks, pure bash, no toolchain/network" }, "summary": "Undo script for the 0298 move plus a trial-reset wipe that learns the communities/ layout, proven by a 12-check offline seam.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#2096
No description provided.