build: rescue's read-only checks are real in production — SSH prober + replica reader; acting ports still fail loud (ADR 0298 d.7) — #2094 #2101

Closed
opened 2026-10-30 02:53:03 +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

newBreakglassOrchestrator() in production stops returning errUnconfigured. Its two ports are new:

  • Replica reader over the community's clan-config/: nodes from a new clan.ReadNodes, SyncedAt from the last git commit, DashboardURL = https://admin.<apex>.
  • SSH prober: BatchMode, StrictHostKeyChecking=yes, the rent-operator key and the founding known-hosts pin (confirm which pin the rented path writes). Mesh is always false, because this computer runs no mesh client in rented/home founding.

No With* acting options are wired, so applier, share, checkout, machine and founding-standup all fail loud as today. Independent of the board tickets. Plan Task 8.

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

  • clan.ReadNodes returns ids, roles and target hosts from a fixture inventory.
  • Replica: absent → present=false; SyncedAt reads the last commit time; DashboardURL is admin..
  • Prober: ssh exit 0 → SSH true, Mesh false; failure on a LAN-only target → OffCommunityNetwork; args carry BatchMode, StrictHostKeyChecking=yes, the identity and the pin.
  • The production orchestrator refuses every acting op.
  • Running the Situation leaves the fixture repo's HEAD and mtimes unchanged (read-only).
  • go test + golangci-lint run ./... clean in both modules; every new exported name doc-commented.

Blocked by

Task manifest

task: breakglass-readonly-prod
implements_flow: rescue
implements_edge: P8-S3 Situation (real facts)
wireframe: docs/ux/wireframes/p8-rescue/p8-s3-situation.html
interface: |
  clan.ReadNodes(dir string) ([]clan.NodeFact, error)
  replicaReader implements breakglass.Replica; sshProber implements breakglass.Prober
binds:
  - symbol: ReadNodes
    defined_in: internal/clan/community.go
  - symbol: sshProber
    defined_in: app/helper/cmd/helper/breakglassprod.go
seam: app/helper/cmd/helper/breakglassprod_test.go (fake ssh runner, fake git) + internal/clan tests
unproven_by_seam: SSH to a real rented gateway with the real pin — the copy-proof run probes Whakatōhea Demo read-only
acceptance:
  - given: a fixture clan-config and a fake ssh that exits 0
    when: the Situation is probed
    then: each node reports SSH reachable, mesh not, and the repo is unchanged
depends_on: []
out_of_scope: [rescue-acting-ports, mesh-client-on-laptop]
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 `newBreakglassOrchestrator()` in production stops returning `errUnconfigured`. Its two ports are new: - **Replica reader** over the community's `clan-config/`: nodes from a new `clan.ReadNodes`, `SyncedAt` from the last git commit, `DashboardURL` = `https://admin.<apex>`. - **SSH prober:** BatchMode, StrictHostKeyChecking=yes, the rent-operator key and the founding known-hosts pin (confirm which pin the rented path writes). `Mesh` is always false, because this computer runs no mesh client in rented/home founding. **No** `With*` acting options are wired, so applier, share, checkout, machine and founding-standup all fail loud as today. Independent of the board tickets. Plan Task 8. **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 - [ ] `clan.ReadNodes` returns ids, roles and target hosts from a fixture inventory. - [ ] Replica: absent → present=false; SyncedAt reads the last commit time; DashboardURL is admin.<apex>. - [ ] Prober: ssh exit 0 → SSH true, Mesh false; failure on a LAN-only target → OffCommunityNetwork; args carry BatchMode, StrictHostKeyChecking=yes, the identity and the pin. - [ ] The production orchestrator refuses every acting op. - [ ] Running the Situation leaves the fixture repo's HEAD and mtimes unchanged (read-only). - [ ] `go test` + `golangci-lint run ./...` clean in both modules; every new exported name doc-commented. ## Blocked by - #2093 ## Task manifest ```yaml task: breakglass-readonly-prod implements_flow: rescue implements_edge: P8-S3 Situation (real facts) wireframe: docs/ux/wireframes/p8-rescue/p8-s3-situation.html interface: | clan.ReadNodes(dir string) ([]clan.NodeFact, error) replicaReader implements breakglass.Replica; sshProber implements breakglass.Prober binds: - symbol: ReadNodes defined_in: internal/clan/community.go - symbol: sshProber defined_in: app/helper/cmd/helper/breakglassprod.go seam: app/helper/cmd/helper/breakglassprod_test.go (fake ssh runner, fake git) + internal/clan tests unproven_by_seam: SSH to a real rented gateway with the real pin — the copy-proof run probes Whakatōhea Demo read-only acceptance: - given: a fixture clan-config and a fake ssh that exits 0 when: the Situation is probed then: each node reports SSH reachable, mesh not, and the repo is unchanged depends_on: [] out_of_scope: [rescue-acting-ports, mesh-client-on-laptop] needs_human_decision: [] ```

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

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

⏩ independent reviewer for #2101 — verdict unauthenticated

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

close-report for #2101 — status success

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

envelope
{
  "issue": 2101,
  "status": "success",
  "commits": [
    "aa33ac1f8cebfc768d3279cdaa71ea7d097435ee"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/community.go",
    "internal/clan/community_test.go",
    "app/helper/cmd/helper/breakglassprod.go",
    "app/helper/cmd/helper/breakglassprod_test.go",
    "app/helper/cmd/helper/wiring_prod.go",
    "app/helper/cmd/helper/wiring_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/clan/ ./app/helper/cmd/helper/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./internal/clan/... ./app/helper/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go build ./... (+ -tags dev ./app/helper/...)",
      "exit_code": 0
    },
    {
      "command": "pre-push gate: full go seam (go test ./... + golangci-lint, both modules) — 0 issues",
      "exit_code": 0
    }
  ],
  "criteria": {
    "clan.ReadNodes returns ids, roles and target hosts from a fixture inventory": "internal/clan/community.go ReadNodes + TestReadNodes in internal/clan/community_test.go (fixture built via Config.AddNode/SetDeployTarget; asserts id, role, target per node)",
    "Replica: absent -> present=false; SyncedAt reads the last commit time; DashboardURL is admin.<apex>": "app/helper/cmd/helper/breakglassprod.go replicaReader; TestReplicaReader_Absent (present=false), TestReplicaReader_SyncedAt (fake git %ct -> time.Unix), TestReplicaReader_DashboardURL (admin.<apex> / \"\" when unrecorded)",
    "Prober: ssh exit 0 -> SSH true, Mesh false; failure on a LAN-only target -> OffCommunityNetwork; args carry BatchMode, StrictHostKeyChecking=yes, the identity and the pin": "sshProber in breakglassprod.go; TestSSHProber_Reachable (SSH true, Mesh false, args carry BatchMode/StrictHostKeyChecking=yes/UserKnownHostsFile pin/-i identity/target/true) + TestSSHProber_LANOnlyUnreachable (OffCommunityNetwork) + TestISLANOnlyTarget",
    "The production orchestrator refuses every acting op": "TestProductionBreakglass_RefusesEveryActingOp: newBreakglassOrchestrator() built, Reapply/Move/Restart/Recombine/Rebuild all return non-nil errors (no With* options wired)",
    "Running the Situation leaves the fixture repo's HEAD and mtimes unchanged (read-only)": "TestSituation_ReadOnly: real git fixture, orchestrator.Probe over replicaReader+gitOutput+fake ssh; asserts git HEAD and all working-tree mtimes unchanged, file count unchanged",
    "go test + golangci-lint run ./... clean in both modules; every new exported name doc-commented": "pre-push gate ran the full go seam (both modules) 0 issues; golangci-lint run clean (revive exported/package-comments covers doc comments on ReadNodes, NodeFact and all new helper exports)"
  },
  "binds": [
    {
      "symbol": "ReadNodes",
      "defined_in": "internal/clan/community.go"
    },
    {
      "symbol": "sshProber",
      "defined_in": "app/helper/cmd/helper/breakglassprod.go"
    }
  ],
  "summary": "Wired rescue's two read-only break-glass ports (replica reader + SSH prober) for real in production; acting ports still fail loud (ADR 0298 d.7).",
  "blockers": []
}
**close-report** for #2101 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261030-005423-a640e4` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 2101, "status": "success", "commits": [ "aa33ac1f8cebfc768d3279cdaa71ea7d097435ee" ], "changed_files": [ "STATUS.md", "internal/clan/community.go", "internal/clan/community_test.go", "app/helper/cmd/helper/breakglassprod.go", "app/helper/cmd/helper/breakglassprod_test.go", "app/helper/cmd/helper/wiring_prod.go", "app/helper/cmd/helper/wiring_test.go" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/clan/ ./app/helper/cmd/helper/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./internal/clan/... ./app/helper/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go build ./... (+ -tags dev ./app/helper/...)", "exit_code": 0 }, { "command": "pre-push gate: full go seam (go test ./... + golangci-lint, both modules) — 0 issues", "exit_code": 0 } ], "criteria": { "clan.ReadNodes returns ids, roles and target hosts from a fixture inventory": "internal/clan/community.go ReadNodes + TestReadNodes in internal/clan/community_test.go (fixture built via Config.AddNode/SetDeployTarget; asserts id, role, target per node)", "Replica: absent -> present=false; SyncedAt reads the last commit time; DashboardURL is admin.<apex>": "app/helper/cmd/helper/breakglassprod.go replicaReader; TestReplicaReader_Absent (present=false), TestReplicaReader_SyncedAt (fake git %ct -> time.Unix), TestReplicaReader_DashboardURL (admin.<apex> / \"\" when unrecorded)", "Prober: ssh exit 0 -> SSH true, Mesh false; failure on a LAN-only target -> OffCommunityNetwork; args carry BatchMode, StrictHostKeyChecking=yes, the identity and the pin": "sshProber in breakglassprod.go; TestSSHProber_Reachable (SSH true, Mesh false, args carry BatchMode/StrictHostKeyChecking=yes/UserKnownHostsFile pin/-i identity/target/true) + TestSSHProber_LANOnlyUnreachable (OffCommunityNetwork) + TestISLANOnlyTarget", "The production orchestrator refuses every acting op": "TestProductionBreakglass_RefusesEveryActingOp: newBreakglassOrchestrator() built, Reapply/Move/Restart/Recombine/Rebuild all return non-nil errors (no With* options wired)", "Running the Situation leaves the fixture repo's HEAD and mtimes unchanged (read-only)": "TestSituation_ReadOnly: real git fixture, orchestrator.Probe over replicaReader+gitOutput+fake ssh; asserts git HEAD and all working-tree mtimes unchanged, file count unchanged", "go test + golangci-lint run ./... clean in both modules; every new exported name doc-commented": "pre-push gate ran the full go seam (both modules) 0 issues; golangci-lint run clean (revive exported/package-comments covers doc comments on ReadNodes, NodeFact and all new helper exports)" }, "binds": [ { "symbol": "ReadNodes", "defined_in": "internal/clan/community.go" }, { "symbol": "sshProber", "defined_in": "app/helper/cmd/helper/breakglassprod.go" } ], "summary": "Wired rescue's two read-only break-glass ports (replica reader + SSH prober) for real in production; acting ports still fail loud (ADR 0298 d.7).", "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#2101
No description provided.