rehearsal-cycle still defaults REHEARSAL_DRIVE_ISSUE=378 — a green drive would close the wrong issue (split brain) #575

Closed
opened 2026-08-15 06:01:27 +00:00 by ben · 2 comments
Owner

Bug — split-brain hazard, live today

scripts/rehearsal-cycle.sh:20 defaults REHEARSAL_DRIVE_ISSUE:=378 — phase 1's closed drive issue — while rehearsal-executor.sh:21, rehearsal-report.sh:50, list-ready-tasks.sh:55, and session-runner.sh:42 all default 492. Masked only by .env on the executor host.

If the env var is ever absent there: a green drive closes and comments on #378 while the executor keeps polling #492 — a silent split brain. The re-mint checklist in docs/operator-app/rehearsal-drive.md:26-31 enumerates three script defaults and omits the cycle, so the standing rite would propagate the miss (P3's re-mint to #523 walks straight into this).

Fix

  • single-source the default (the coming swarm-identity.sh is the natural home; interim: align the cycle to 492 or make the var required-no-default in the cycle since the executor always exports it)
  • add the missing checklist entry to the runbook
  • same pass: REHEARSAL_SLUG has two defaults in two languages (rehearsal-droplet.sh:19 and journey.droplet.spec.ts:181) — change one and teardown offboards a different host than the drive claimed. Single-source it too.

Two-way door; agent-shaped. Filed ready-for-human per Ben's instruction — re-arm at will.

## Bug — split-brain hazard, live today `scripts/rehearsal-cycle.sh:20` defaults `REHEARSAL_DRIVE_ISSUE:=378` — **phase 1's closed drive issue** — while `rehearsal-executor.sh:21`, `rehearsal-report.sh:50`, `list-ready-tasks.sh:55`, and `session-runner.sh:42` all default `492`. Masked only by `.env` on the executor host. If the env var is ever absent there: a green drive **closes and comments on #378** while the executor keeps polling #492 — a silent split brain. The re-mint checklist in `docs/operator-app/rehearsal-drive.md:26-31` enumerates three script defaults and **omits the cycle**, so the standing rite would propagate the miss (P3's re-mint to #523 walks straight into this). ## Fix - single-source the default (the coming `swarm-identity.sh` is the natural home; interim: align the cycle to 492 or make the var required-no-default in the cycle since the executor always exports it) - add the missing checklist entry to the runbook - same pass: `REHEARSAL_SLUG` has two defaults in two languages (`rehearsal-droplet.sh:19` and `journey.droplet.spec.ts:181`) — change one and teardown offboards a different host than the drive claimed. Single-source it too. Two-way door; agent-shaped. Filed ready-for-human per Ben's instruction — re-arm at will.
Author
Owner

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

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

close-report for #575 — status success

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

envelope
{
  "issue": 575,
  "status": "success",
  "commits": [
    "b3a55c3938c5de8cf99762733373cd483829eb54"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/journey.droplet.spec.ts",
    "docs/operator-app/rehearsal-drive.md",
    "scripts/lib/rehearsal-droplet.sh",
    "scripts/lib/swarm-identity.sh",
    "scripts/rehearsal-cycle.sh",
    "scripts/rehearsal-executor.sh",
    "scripts/tests/swarm-identity-test.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/swarm-identity-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash .sandcastle/tests/rehearsal-droplet-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/lib/swarm-identity.sh scripts/rehearsal-cycle.sh scripts/rehearsal-executor.sh scripts/lib/rehearsal-droplet.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "single-source the drive-issue default so cycle and executor cannot disagree (was 378 vs 492)": "scripts/lib/swarm-identity.sh sets REHEARSAL_DRIVE_ISSUE:=492; scripts/rehearsal-cycle.sh and scripts/rehearsal-executor.sh now source it and carry no own literal (swarm-identity-test.sh checks 1,2,4)",
    "make the missing env var non-fatal — a green cycle can never close the wrong issue": ":=-guarded defaults all agree at 492 across every consumer (the protected .sandcastle/* siblings already default 492); swarm-identity-test.sh check 1 pins it",
    "add the missing re-mint checklist entry to the runbook": "docs/operator-app/rehearsal-drive.md re-mint checklist now points at scripts/lib/swarm-identity.sh as the single script-side source and no longer omits the cycle",
    "single-source REHEARSAL_SLUG across the two languages": "scripts/lib/rehearsal-droplet.sh (bash) sources swarm-identity.sh for REHEARSAL_SLUG:=rehearsal-b and exports it; app/tests/e2e/journey.droplet.spec.ts drops its 'rehearsal-b' literal and fails loud if the exported slug is absent (ADR 0100) — swarm-identity-test.sh checks 5,6"
  },
  "summary": "Single-sourced the rehearsal drive's identity (drive issue + slug) so the cycle's stale 378 default can no longer split-brain against the executor's 492, and the bash/TS slug pair can no longer diverge.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #575 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 575, "status": "success", "commits": [ "b3a55c3938c5de8cf99762733373cd483829eb54" ], "changed_files": [ "STATUS.md", "app/tests/e2e/journey.droplet.spec.ts", "docs/operator-app/rehearsal-drive.md", "scripts/lib/rehearsal-droplet.sh", "scripts/lib/swarm-identity.sh", "scripts/rehearsal-cycle.sh", "scripts/rehearsal-executor.sh", "scripts/tests/swarm-identity-test.sh" ], "tests": [ { "command": "bash scripts/tests/swarm-identity-test.sh", "exit_code": 0 }, { "command": "bash .sandcastle/tests/rehearsal-droplet-test.sh", "exit_code": 0 }, { "command": "bash -n scripts/lib/swarm-identity.sh scripts/rehearsal-cycle.sh scripts/rehearsal-executor.sh scripts/lib/rehearsal-droplet.sh", "exit_code": 0 } ], "criteria": { "single-source the drive-issue default so cycle and executor cannot disagree (was 378 vs 492)": "scripts/lib/swarm-identity.sh sets REHEARSAL_DRIVE_ISSUE:=492; scripts/rehearsal-cycle.sh and scripts/rehearsal-executor.sh now source it and carry no own literal (swarm-identity-test.sh checks 1,2,4)", "make the missing env var non-fatal — a green cycle can never close the wrong issue": ":=-guarded defaults all agree at 492 across every consumer (the protected .sandcastle/* siblings already default 492); swarm-identity-test.sh check 1 pins it", "add the missing re-mint checklist entry to the runbook": "docs/operator-app/rehearsal-drive.md re-mint checklist now points at scripts/lib/swarm-identity.sh as the single script-side source and no longer omits the cycle", "single-source REHEARSAL_SLUG across the two languages": "scripts/lib/rehearsal-droplet.sh (bash) sources swarm-identity.sh for REHEARSAL_SLUG:=rehearsal-b and exports it; app/tests/e2e/journey.droplet.spec.ts drops its 'rehearsal-b' literal and fails loud if the exported slug is absent (ADR 0100) — swarm-identity-test.sh checks 5,6" }, "summary": "Single-sourced the rehearsal drive's identity (drive issue + slug) so the cycle's stale 378 default can no longer split-brain against the executor's 492, and the bash/TS slug pair can no longer diverge.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
ben closed this issue 2026-08-19 17:21:06 +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.

Dependencies

No dependencies set.

Reference
Matou/idss#575
No description provided.