rehearsal-3: executor target — --target selfhosted joins droplet (REHEARSAL_DRIVE_TARGET, default unchanged) #522

Closed
opened 2026-08-14 06:20:50 +00:00 by ben · 2 comments
Owner

Part of rehearsal phase 3 — gateway from home (spec docs/superpowers/specs/2026-08-14-183-phase-3-home-gateway-rehearsal-design.md, plan docs/superpowers/plans/2026-08-14-183-phase-3-home-gateway-rehearsal.md).
The plan section below is the work, verbatim; its Interfaces block names what neighbouring tasks consume — keep those names exact.

Global constraints (apply to every step)

  • Use the domain glossary's vocabulary (CONTEXT.md) in ALL copy, comments,
    commit messages: founding, gateway, agent, install command,
    enrollment code — never installer/daemon/token/join-key.
  • Fail loud, never fabricate (ADR 0100): a missing artifact/secret/seam is an
    error with the real reason, never a silent skip or a made-up value.
  • x86_64 only at v1; full install is the consented mode (ADR 0024); the
    install command is a doorway, not a kept tool (ADR 0028).
  • Never write closes #NNN (or any close keyword) in commits or issue bodies
    for the standing drive issue family — say "advances #NNN". Even DESCRIBING a
    close can auto-close (2026-08-10 lesson, twice).
  • Commits that change project state update STATUS.md in the same commit
    (CLAUDE.md rule); the drive-issue minting commit (Task 9) carries the
    STATUS + runbook update for the whole arc.
  • TDD: each step's test is written and seen red before its implementation.
  • Secrets never enter .sandcastle/.env (it forwards into worker containers);
    host-only secrets live in the executor's rehearsal-env.sh (2026-07-11
    lesson).

Task 8: Machinery — the one --target selfhosted addition

Files:

  • Modify: scripts/smoke-private-path.sh (target enum + spec mapping)
  • Modify: scripts/rehearsal-cycle.sh (target from REHEARSAL_DRIVE_TARGET,
    default droplet — zero behavior change until the env is set)
  • Modify: scripts/lib/rehearsal-droplet.sh ONLY if the run-dir name is
    hardwired (drive-droplet → derive from target).

Interfaces:

  • Consumes: the existing target plumbing (smoke-private-path.sh:62's enum,
    rehearsal-cycle.sh:46's invocation).

  • Produces: --target selfhosted drives journey.selfhosted.spec.ts with the
    droplet create/evidence/teardown machinery unchanged; executor behavior is
    byte-identical until REHEARSAL_DRIVE_TARGET=selfhosted is exported in
    rehearsal-env.sh at arming time.

  • Step 1: Add selfhosted to the target enum; map it to the new spec;
    derive the run dir (test-results/drive-selfhosted). Reject --drive with
    it exactly as the droplet target does.

  • Step 2: rehearsal-cycle.sh: target="${REHEARSAL_DRIVE_TARGET:-droplet}"
    and pass --target "$target"; the GREEN-close comment text stays
    issue-number-generic (it already reads REHEARSAL_DRIVE_ISSUE).

  • Step 3: Dry-run both paths (bash -n, then --target selfhosted
    against a missing spec fails loud pre-droplet); commit — rehearsal: the executor can aim the drive at a target (selfhosted joins droplet, spec 2026-08-14).

Part of rehearsal **phase 3 — gateway from home** (spec `docs/superpowers/specs/2026-08-14-183-phase-3-home-gateway-rehearsal-design.md`, plan `docs/superpowers/plans/2026-08-14-183-phase-3-home-gateway-rehearsal.md`). The plan section below is the work, verbatim; its **Interfaces** block names what neighbouring tasks consume — keep those names exact. ## Global constraints (apply to every step) - Use the domain glossary's vocabulary (`CONTEXT.md`) in ALL copy, comments, commit messages: *founding*, *gateway*, *agent*, *install command*, *enrollment code* — never installer/daemon/token/join-key. - Fail loud, never fabricate (ADR 0100): a missing artifact/secret/seam is an error with the real reason, never a silent skip or a made-up value. - x86_64 only at v1; full install is the consented mode (ADR 0024); the install command is a doorway, not a kept tool (ADR 0028). - Never write `closes #NNN` (or any close keyword) in commits or issue bodies for the standing drive issue family — say "advances #NNN". Even DESCRIBING a close can auto-close (2026-08-10 lesson, twice). - Commits that change project state update `STATUS.md` in the same commit (CLAUDE.md rule); the drive-issue minting commit (Task 9) carries the STATUS + runbook update for the whole arc. - TDD: each step's test is written and seen red before its implementation. - Secrets never enter `.sandcastle/.env` (it forwards into worker containers); host-only secrets live in the executor's `rehearsal-env.sh` (2026-07-11 lesson). --- ### Task 8: Machinery — the one `--target selfhosted` addition **Files:** - Modify: `scripts/smoke-private-path.sh` (target enum + spec mapping) - Modify: `scripts/rehearsal-cycle.sh` (target from `REHEARSAL_DRIVE_TARGET`, default `droplet` — zero behavior change until the env is set) - Modify: `scripts/lib/rehearsal-droplet.sh` ONLY if the run-dir name is hardwired (`drive-droplet` → derive from target). **Interfaces:** - Consumes: the existing target plumbing (smoke-private-path.sh:62's enum, rehearsal-cycle.sh:46's invocation). - Produces: `--target selfhosted` drives `journey.selfhosted.spec.ts` with the droplet create/evidence/teardown machinery unchanged; executor behavior is byte-identical until `REHEARSAL_DRIVE_TARGET=selfhosted` is exported in `rehearsal-env.sh` at arming time. - [ ] **Step 1:** Add `selfhosted` to the target enum; map it to the new spec; derive the run dir (`test-results/drive-selfhosted`). Reject `--drive` with it exactly as the droplet target does. - [ ] **Step 2:** `rehearsal-cycle.sh`: `target="${REHEARSAL_DRIVE_TARGET:-droplet}"` and pass `--target "$target"`; the GREEN-close comment text stays issue-number-generic (it already reads `REHEARSAL_DRIVE_ISSUE`). - [ ] **Step 3:** Dry-run both paths (`bash -n`, then `--target selfhosted` against a missing spec fails loud pre-droplet); commit — `rehearsal: the executor can aim the drive at a target (selfhosted joins droplet, spec 2026-08-14)`.
Author
Owner

swarm-claim host=elitebook-distributed-server-03 run=5893
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=5893 (automated multi-host claim — lowest live claim id works this ticket)
Author
Owner

close-report for #522 — status success

✅ close-report gates passed — every claim verified against main; closing.

envelope
{
  "issue": 522,
  "status": "success",
  "commits": [
    "c9225c75408d9b816c82390fc4fd46746f646af7"
  ],
  "changed_files": [
    "scripts/smoke-private-path.sh",
    "scripts/rehearsal-cycle.sh"
  ],
  "tests": [
    {
      "command": "bash -n scripts/smoke-private-path.sh",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/rehearsal-cycle.sh",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/lib/rehearsal-droplet.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Step 1: selfhosted added to the target enum": "smoke-private-path.sh:66 — case now local-guest|droplet|selfhosted; unknown-target message names selfhosted (verified exit 2 on --target bogus)",
    "Step 1: selfhosted maps to the new spec": "smoke-private-path.sh — drive_spec=\"journey.$target.spec.ts\" under the uses_droplet_machinery branch → journey.selfhosted.spec.ts",
    "Step 1: run dir derived (test-results/drive-selfhosted)": "smoke-private-path.sh:351 — results_name=\"drive-$target\" (drive-selfhosted); local-guest keeps private-path",
    "Step 1: --drive rejected with selfhosted as droplet does": "smoke-private-path.sh — --drive+selfhosted refused with exit 2 (verified)",
    "Step 2: rehearsal-cycle reads REHEARSAL_DRIVE_TARGET default droplet": "rehearsal-cycle.sh — target=\"${REHEARSAL_DRIVE_TARGET:-droplet}\"; passes --target \"$target\"; run dir + evidence path derived as drive-$target; GREEN-close comment stays issue-number-generic (reads REHEARSAL_DRIVE_ISSUE)",
    "Step 3: bash -n both paths clean": "all three scripts pass bash -n (tests above)",
    "Step 3: --target selfhosted against a missing spec fails loud pre-droplet": "new spec-existence gate at preflight (smoke-private-path.sh) — verified: exit 3, 'the drive spec app/tests/e2e/journey.selfhosted.spec.ts does not exist ... nothing to drive', before any droplet create"
  },
  "summary": "Added --target selfhosted to the rehearsal drive machinery (rides the droplet create/evidence/teardown machinery unchanged, drives journey.selfhosted.spec.ts into test-results/drive-selfhosted) with the executor byte-identical until REHEARSAL_DRIVE_TARGET=selfhosted is armed.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #522 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 522, "status": "success", "commits": [ "c9225c75408d9b816c82390fc4fd46746f646af7" ], "changed_files": [ "scripts/smoke-private-path.sh", "scripts/rehearsal-cycle.sh" ], "tests": [ { "command": "bash -n scripts/smoke-private-path.sh", "exit_code": 0 }, { "command": "bash -n scripts/rehearsal-cycle.sh", "exit_code": 0 }, { "command": "bash -n scripts/lib/rehearsal-droplet.sh", "exit_code": 0 } ], "criteria": { "Step 1: selfhosted added to the target enum": "smoke-private-path.sh:66 — case now local-guest|droplet|selfhosted; unknown-target message names selfhosted (verified exit 2 on --target bogus)", "Step 1: selfhosted maps to the new spec": "smoke-private-path.sh — drive_spec=\"journey.$target.spec.ts\" under the uses_droplet_machinery branch → journey.selfhosted.spec.ts", "Step 1: run dir derived (test-results/drive-selfhosted)": "smoke-private-path.sh:351 — results_name=\"drive-$target\" (drive-selfhosted); local-guest keeps private-path", "Step 1: --drive rejected with selfhosted as droplet does": "smoke-private-path.sh — --drive+selfhosted refused with exit 2 (verified)", "Step 2: rehearsal-cycle reads REHEARSAL_DRIVE_TARGET default droplet": "rehearsal-cycle.sh — target=\"${REHEARSAL_DRIVE_TARGET:-droplet}\"; passes --target \"$target\"; run dir + evidence path derived as drive-$target; GREEN-close comment stays issue-number-generic (reads REHEARSAL_DRIVE_ISSUE)", "Step 3: bash -n both paths clean": "all three scripts pass bash -n (tests above)", "Step 3: --target selfhosted against a missing spec fails loud pre-droplet": "new spec-existence gate at preflight (smoke-private-path.sh) — verified: exit 3, 'the drive spec app/tests/e2e/journey.selfhosted.spec.ts does not exist ... nothing to drive', before any droplet create" }, "summary": "Added --target selfhosted to the rehearsal drive machinery (rides the droplet create/evidence/teardown machinery unchanged, drives journey.selfhosted.spec.ts into test-results/drive-selfhosted) with the executor byte-identical until REHEARSAL_DRIVE_TARGET=selfhosted is armed.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
ben closed this issue 2026-08-14 06:30:19 +00:00
Sign in to join this conversation.
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.

Reference
Matou/idss#522
No description provided.