Debug-tail drive for the IDIP journey — standing-world re-entry (debug↔prove-it regime, ADR 0221) #1089

Closed
opened 2026-09-01 00:19:17 +00:00 by ben · 2 comments
Owner

Context

Every red tail leg currently costs a full from-S1 IDIP drive (~45–65 min) to retest a fix. Grilled with Ben 2026-08-31 (ADR 0221): drives get two modes — debug (fast iterate on a standing world) and prove-it (the unchanged from-S1 journey, the ONLY source of greens on the record). This ticket ships the debug half for the IDIP journey.

Task

A debug-tail variant beside journey.idip.spec.ts that re-enters a STANDING community at operator sign-in and drives the credentials tail only.

  • Standing world: founded once by a green prove-it drive. The executor adoption step (follow-on ticket) will persist a standing-world pointer (slug, droplet IP, secrets); for THIS ticket a hand-written pointer file harvested from any green drive's run state is enough to drive against.
  • Preflight world-health gate (assertTailResumable shape, fixtures/resume.ts #333 precedent): files door healthy, bridge up, operator sign-in works. A failed preflight parks loud as WORLD-DRIFT naming the remedy (enqueue a prove-it) and runs ZERO tail legs — a drifted world must never masquerade as a code red.
  • Hash-keyed gateway redeploy (eval-gate pattern, keys on internal/clan + provision tree hashes): when the hashes differ from what the standing box last received, redeploy to it before the tail; otherwise skip. The ledger records driven SHA and deployed SHA (GOTCHAS: "fixed on main ≠ fixed in the bits under test", #912).
  • Debug tail = sign-in onward: the 11 credential legs (CREDENTIAL_LEG_LEDGER drive order), per-attempt-unique member identity, self-reversing pairs (promote→demote, suspend→readmit, issue→revoke) unchanged. Founding, provisioning, and the fault-injection honesty legs (ports-honest, heartbeat-repoint) are prove-it-only. The tail leg set is a declared list so it can grow.
  • Whole tail per attempt — no mid-tail checkpoints (that is the general-resume design ticket).
  • Segregated evidence: debug runs write their own results tree (e.g. test-results/idip-debug/<stamp>/) with verdict.json stamped mode: "debug". The reporter must never post a debug green to a ticket; only prove-it drives green a leg on the record. legs.json/verdict shapes otherwise unchanged.
  • Reaper exemption: the standing droplet carries a keep tag (same protection as the phase-5 standing box) so watchdog/reap never collects it.

Acceptance

  • Against a healthy standing world: preflight + relaunch/sign-in + all 11 tail legs complete in ~10–15 min, evidence stamped mode: debug in the segregated tree.
  • Against a drifted/unhealthy world: refuses at preflight with a named WORLD-DRIFT fault, zero tail legs run.
  • A gateway-tree change triggers exactly one redeploy before the tail; unchanged trees skip it; both SHAs in the ledger.
  • Offline pins for the preflight gate + mode stamping (legs.test.ts/resume.test.ts shape).
  • journey.idip.spec.ts (prove-it) behaviour unchanged.

See the grilled comparison (time model): five-bug batch drops ~5.6 h / 5 full drives → ~3.6 h / 1 full drive.

## Context Every red tail leg currently costs a full from-S1 IDIP drive (~45–65 min) to retest a fix. Grilled with Ben 2026-08-31 (ADR 0221): drives get two modes — **debug** (fast iterate on a standing world) and **prove-it** (the unchanged from-S1 journey, the ONLY source of greens on the record). This ticket ships the debug half for the IDIP journey. ## Task A debug-tail variant beside `journey.idip.spec.ts` that re-enters a STANDING community at operator sign-in and drives the credentials tail only. - **Standing world**: founded once by a green prove-it drive. The executor adoption step (follow-on ticket) will persist a standing-world pointer (slug, droplet IP, secrets); for THIS ticket a hand-written pointer file harvested from any green drive's run state is enough to drive against. - **Preflight world-health gate** (`assertTailResumable` shape, `fixtures/resume.ts` #333 precedent): files door healthy, bridge up, operator sign-in works. A failed preflight parks loud as `WORLD-DRIFT` naming the remedy (enqueue a prove-it) and runs ZERO tail legs — a drifted world must never masquerade as a code red. - **Hash-keyed gateway redeploy** (eval-gate pattern, keys on `internal/clan` + provision tree hashes): when the hashes differ from what the standing box last received, redeploy to it before the tail; otherwise skip. The ledger records driven SHA **and** deployed SHA (GOTCHAS: "fixed on main ≠ fixed in the bits under test", #912). - **Debug tail = sign-in onward**: the 11 credential legs (`CREDENTIAL_LEG_LEDGER` drive order), per-attempt-unique member identity, self-reversing pairs (promote→demote, suspend→readmit, issue→revoke) unchanged. Founding, provisioning, and the fault-injection honesty legs (`ports-honest`, `heartbeat-repoint`) are prove-it-only. The tail leg set is a declared list so it can grow. - **Whole tail per attempt** — no mid-tail checkpoints (that is the general-resume design ticket). - **Segregated evidence**: debug runs write their own results tree (e.g. `test-results/idip-debug/<stamp>/`) with `verdict.json` stamped `mode: "debug"`. The reporter must never post a debug green to a ticket; only prove-it drives green a leg on the record. legs.json/verdict shapes otherwise unchanged. - **Reaper exemption**: the standing droplet carries a keep tag (same protection as the phase-5 standing box) so watchdog/reap never collects it. ## Acceptance - Against a healthy standing world: preflight + relaunch/sign-in + all 11 tail legs complete in ~10–15 min, evidence stamped `mode: debug` in the segregated tree. - Against a drifted/unhealthy world: refuses at preflight with a named `WORLD-DRIFT` fault, zero tail legs run. - A gateway-tree change triggers exactly one redeploy before the tail; unchanged trees skip it; both SHAs in the ledger. - Offline pins for the preflight gate + mode stamping (`legs.test.ts`/`resume.test.ts` shape). - `journey.idip.spec.ts` (prove-it) behaviour unchanged. See the grilled comparison (time model): five-bug batch drops ~5.6 h / 5 full drives → ~3.6 h / 1 full drive.

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

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

close-report for #1089 — status success

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

envelope
{
  "issue": 1089,
  "status": "success",
  "commits": [
    "87971b7f581c3960758bec92a788a4b0b65ccf08"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/fixtures/idipDebug.ts",
    "app/tests/e2e/fixtures/idipDebug.test.ts",
    "app/tests/e2e/fixtures/legs.ts",
    "app/tests/e2e/fixtures/legs.test.ts",
    "app/tests/e2e/journey.idip.debug.spec.ts",
    "scripts/debug-idip-tail.sh"
  ],
  "tests": [
    {
      "command": "npx vitest run tests/e2e/fixtures/idipDebug.test.ts tests/e2e/fixtures/legs.test.ts tests/e2e/fixtures/idip.test.ts tests/e2e/fixtures/resume.test.ts (in app/)",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit (in app/)",
      "exit_code": 0
    },
    {
      "command": "npx eslint <changed .ts files>",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/debug-idip-tail.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Against a healthy standing world: preflight + relaunch/sign-in + all 11 tail legs complete in ~10–15 min, evidence stamped mode:debug in the segregated tree": "journey.idip.debug.spec.ts drives the preflight (assertWorldHealthy) + operator sign-in + the 11 DEBUG_TAIL_LEGS (= CREDENTIAL_LEG_LEDGER order), writing verdict.json stamped mode:debug into OC_E2E_RUN_DIR under test-results/idip-debug/<stamp>/ (set by scripts/debug-idip-tail.sh). The live drive is a next-e2e-sitting proof (as private-path-tail.resume.spec.ts is); its wiring + the mode stamp are proven offline (idipDebug.test.ts, legs.test.ts 'stamps mode:debug + the deployed SHA').",
    "Against a drifted/unhealthy world: refuses at preflight with a named WORLD-DRIFT fault, zero tail legs run": "assertWorldHealthy + readStandingWorldPointer throw WorldDriftError whose message contains WORLD-DRIFT and the remedy (enqueue a prove-it), BEFORE any leg; pinned in idipDebug.test.ts ('refuses when <probe> fails, naming it as WORLD-DRIFT' asserting /WORLD-DRIFT/, /prove-it/, /ZERO/, and the missing/invalid-pointer cases).",
    "A gateway-tree change triggers exactly one redeploy before the tail; unchanged trees skip it; both SHAs in the ledger": "decideRedeploy (idipDebug.ts) keys on gatewayTreeKey (eval-gate two-package hash of internal/clan+internal/provision): redeploy when changed/unknown, skip when unchanged — pinned in idipDebug.test.ts. scripts/debug-idip-tail.sh performs exactly one redeploy when the keys differ. computeVerdict's debug stamp folds BOTH SHAs (commit=driven, deployedSha=deployed) into verdict.json — pinned in legs.test.ts.",
    "Offline pins for the preflight gate + mode stamping (legs.test.ts/resume.test.ts shape)": "app/tests/e2e/fixtures/idipDebug.test.ts (25 tests: pointer, preflight gate, redeploy decision, tail legs, member identity) + the new computeVerdict debug-stamp tests in legs.test.ts.",
    "journey.idip.spec.ts (prove-it) behaviour unchanged": "journey.idip.spec.ts is not in changed_files; computeVerdict's debug stamp is opt-in (6th param), so a prove-it verdict.json stays byte-identical — pinned by legs.test.ts's existing toEqual green + the new not.toHaveProperty('mode'/'deployedSha') assertions."
  },
  "summary": "Shipped the DEBUG half of the two-mode IDIP drive regime (ADR 0221): offline-proven standing-world pointer, WORLD-DRIFT preflight gate, hash-keyed redeploy decision, mode:debug verdict stamp, plus the debug-tail spec + driver script as next-e2e-sitting carriers.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1089 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1089, "status": "success", "commits": [ "87971b7f581c3960758bec92a788a4b0b65ccf08" ], "changed_files": [ "STATUS.md", "app/tests/e2e/fixtures/idipDebug.ts", "app/tests/e2e/fixtures/idipDebug.test.ts", "app/tests/e2e/fixtures/legs.ts", "app/tests/e2e/fixtures/legs.test.ts", "app/tests/e2e/journey.idip.debug.spec.ts", "scripts/debug-idip-tail.sh" ], "tests": [ { "command": "npx vitest run tests/e2e/fixtures/idipDebug.test.ts tests/e2e/fixtures/legs.test.ts tests/e2e/fixtures/idip.test.ts tests/e2e/fixtures/resume.test.ts (in app/)", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit (in app/)", "exit_code": 0 }, { "command": "npx eslint <changed .ts files>", "exit_code": 0 }, { "command": "bash -n scripts/debug-idip-tail.sh", "exit_code": 0 } ], "criteria": { "Against a healthy standing world: preflight + relaunch/sign-in + all 11 tail legs complete in ~10–15 min, evidence stamped mode:debug in the segregated tree": "journey.idip.debug.spec.ts drives the preflight (assertWorldHealthy) + operator sign-in + the 11 DEBUG_TAIL_LEGS (= CREDENTIAL_LEG_LEDGER order), writing verdict.json stamped mode:debug into OC_E2E_RUN_DIR under test-results/idip-debug/<stamp>/ (set by scripts/debug-idip-tail.sh). The live drive is a next-e2e-sitting proof (as private-path-tail.resume.spec.ts is); its wiring + the mode stamp are proven offline (idipDebug.test.ts, legs.test.ts 'stamps mode:debug + the deployed SHA').", "Against a drifted/unhealthy world: refuses at preflight with a named WORLD-DRIFT fault, zero tail legs run": "assertWorldHealthy + readStandingWorldPointer throw WorldDriftError whose message contains WORLD-DRIFT and the remedy (enqueue a prove-it), BEFORE any leg; pinned in idipDebug.test.ts ('refuses when <probe> fails, naming it as WORLD-DRIFT' asserting /WORLD-DRIFT/, /prove-it/, /ZERO/, and the missing/invalid-pointer cases).", "A gateway-tree change triggers exactly one redeploy before the tail; unchanged trees skip it; both SHAs in the ledger": "decideRedeploy (idipDebug.ts) keys on gatewayTreeKey (eval-gate two-package hash of internal/clan+internal/provision): redeploy when changed/unknown, skip when unchanged — pinned in idipDebug.test.ts. scripts/debug-idip-tail.sh performs exactly one redeploy when the keys differ. computeVerdict's debug stamp folds BOTH SHAs (commit=driven, deployedSha=deployed) into verdict.json — pinned in legs.test.ts.", "Offline pins for the preflight gate + mode stamping (legs.test.ts/resume.test.ts shape)": "app/tests/e2e/fixtures/idipDebug.test.ts (25 tests: pointer, preflight gate, redeploy decision, tail legs, member identity) + the new computeVerdict debug-stamp tests in legs.test.ts.", "journey.idip.spec.ts (prove-it) behaviour unchanged": "journey.idip.spec.ts is not in changed_files; computeVerdict's debug stamp is opt-in (6th param), so a prove-it verdict.json stays byte-identical — pinned by legs.test.ts's existing toEqual green + the new not.toHaveProperty('mode'/'deployedSha') assertions." }, "summary": "Shipped the DEBUG half of the two-mode IDIP drive regime (ADR 0221): offline-proven standing-world pointer, WORLD-DRIFT preflight gate, hash-keyed redeploy decision, mode:debug verdict stamp, plus the debug-tail spec + driver script as next-e2e-sitting carriers.", "reason": "", "blockers": [], "no_code_change": "" } ``` </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#1089
No description provided.