rehearsal healer: broker/* (and the other deployed-service trees) join HEAL_PRODUCT_SURFACE_GLOBS — rule 3 must be law in heal_rails, not advice in the prompt #1188

Closed
opened 2026-09-03 15:20:18 +00:00 by ben · 2 comments
Owner

The defect (phase-7 first drive, 2026-09-03)

The healer refused the #1178 red correctly under rule 3 (the fix lives in broker/internal/broker/provider_do.go, the droplet-create path — what a deploy does). But the refusal came from the prompt's judgement: IDSS's mechanical surface declaration in .sandcastle/report-guard.sh is internal/* app/src/*, so a heal committing into broker/ would have PASSED heal_rails and been pushed. Phase 5's lesson (GOTCHAS #115) was that rails, not prompts, are what the healer is measured against.

The change

HEAL_PRODUCT_SURFACE_GLOBS='internal/* app/src/* broker/* agent/* control-plane/*' — the three deployed-binary trees (the broker at broker.idss.nz, the agent served pinned from get.idss.nz, the control-plane entrypoints) join the control plane and dashboard. Tests/fixtures under them stay exempt (the rail's own exemption). Pinned red-first by a new idss-owned offline test scripts/tests/report-guard-surface-test.sh: a healer commit touching broker/internal/x.go is refused with reason product-behaviour surface; scripts/x.sh still heals.

Origin: the phase-7 first-11-hours report, change 3. Claimed by the reporting session (agent-working).

## The defect (phase-7 first drive, 2026-09-03) The healer refused the #1178 red correctly under rule 3 (the fix lives in `broker/internal/broker/provider_do.go`, the droplet-create path — what a deploy does). But the refusal came from the prompt's judgement: IDSS's mechanical surface declaration in `.sandcastle/report-guard.sh` is `internal/* app/src/*`, so a heal committing into `broker/` would have PASSED `heal_rails` and been pushed. Phase 5's lesson (GOTCHAS #115) was that rails, not prompts, are what the healer is measured against. ## The change `HEAL_PRODUCT_SURFACE_GLOBS='internal/* app/src/* broker/* agent/* control-plane/*'` — the three deployed-binary trees (the broker at broker.idss.nz, the agent served pinned from get.idss.nz, the control-plane entrypoints) join the control plane and dashboard. Tests/fixtures under them stay exempt (the rail's own exemption). Pinned red-first by a new idss-owned offline test `scripts/tests/report-guard-surface-test.sh`: a healer commit touching `broker/internal/x.go` is refused with reason `product-behaviour surface`; `scripts/x.sh` still heals. Origin: the phase-7 first-11-hours report, change 3. Claimed by the reporting session (agent-working).

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime

Ruling: ready-for-session (category enhancement already present).

Why this state. The change edits .sandcastle/report-guard.sh — the HEAL_PRODUCT_SURFACE_GLOBS declaration — which lives under a protected path (PROTECTED_PATHS=".sandcastle .forgejo", .sandcastle/swarm-policy.sh:49). Rule 9 of .sandcastle/prompt-enrichments/rules.md bars a swarm worker from touching a protected path (the before/after fingerprint of #445 would refuse the commit) and routes such machinery changes to ready-for-session — an interactive session's standing. The new offline test scripts/tests/report-guard-surface-test.sh is itself swarm-safe, but the guarded edit is not, so the whole ticket is session work. It is not ready-for-agent: the swarm queue reads only ready-for-agent and would be refused at the protected-path gate.

Why a two-way door. A state label is revertible by a later label change; nothing is destroyed and no security posture widens. The routing is provable by the protected-path predicate itself (.sandcastle/ ∈ PROTECTED_PATHS) and, once written, by report-guard-surface-test.sh. Not on the one-way-door list.

Spec quality. Fully specified — exact glob change, red-first offline test named, the rail's tests/fixtures exemption preserved. A session can take it directly.

Note: already agent-working (self-claimed by the filing session); this backfills the state role beneath that claim. The swarm ignores agent-working tickets regardless, so no double-work.

> *This was generated by AI during triage.* ## Ruled by agent under ADR 0174 — veto anytime **Ruling:** `ready-for-session` (category `enhancement` already present). **Why this state.** The change edits `.sandcastle/report-guard.sh` — the `HEAL_PRODUCT_SURFACE_GLOBS` declaration — which lives under a **protected path** (`PROTECTED_PATHS=".sandcastle .forgejo"`, `.sandcastle/swarm-policy.sh:49`). Rule 9 of `.sandcastle/prompt-enrichments/rules.md` bars a swarm worker from touching a protected path (the before/after fingerprint of #445 would refuse the commit) and routes such machinery changes to `ready-for-session` — an interactive session's standing. The new offline test `scripts/tests/report-guard-surface-test.sh` is itself swarm-safe, but the guarded edit is not, so the whole ticket is session work. It is **not** `ready-for-agent`: the swarm queue reads only `ready-for-agent` and would be refused at the protected-path gate. **Why a two-way door.** A state label is revertible by a later label change; nothing is destroyed and no security posture widens. The routing is provable by the protected-path predicate itself (`.sandcastle/` ∈ `PROTECTED_PATHS`) and, once written, by `report-guard-surface-test.sh`. Not on the one-way-door list. **Spec quality.** Fully specified — exact glob change, red-first offline test named, the rail's tests/fixtures exemption preserved. A session can take it directly. Note: already `agent-working` (self-claimed by the filing session); this backfills the state role beneath that claim. The swarm ignores `agent-working` tickets regardless, so no double-work.
Author
Owner

Close report — landed 04aa72df on main (Ruled by session under ADR 0174 — veto anytime). Two-way: labels, shell libs and a rail step after a successful install, all revertible by one commit; no spend, no posture change.

.sandcastle/report-guard.sh: HEAL_PRODUCT_SURFACE_GLOBS='internal/* app/src/* broker/* agent/* control-plane/*' — the three deployed-binary trees join the declaration; the comment names the #1178 lesson (refusal by prompt alone, rail would have passed a broker heal).

Acceptance (offline, scripts/tests/report-guard-surface-test.sh, 4 cases): sources report-guard.sh the way the reporter does and asserts all five globs; a healer commit into broker/internal/broker/provider_do.go is REFUSED with product-behaviour surface, non-swarmable, reverted (this case was red before the change — the rail passed it); agent/cmd/agent/main.go and control-plane/cmd/control-plane/main.go refused likewise; a broker/*_test.go and scripts/lib/x.sh still heal (exemption intact, declaration not over-wide). Vendored rehearsal-heal-lib-test (26) unchanged green.

**Close report — landed `04aa72df` on main (Ruled by session under ADR 0174 — veto anytime).** Two-way: labels, shell libs and a rail step after a successful install, all revertible by one commit; no spend, no posture change. `.sandcastle/report-guard.sh`: `HEAL_PRODUCT_SURFACE_GLOBS='internal/* app/src/* broker/* agent/* control-plane/*'` — the three deployed-binary trees join the declaration; the comment names the #1178 lesson (refusal by prompt alone, rail would have passed a broker heal). **Acceptance (offline, `scripts/tests/report-guard-surface-test.sh`, 4 cases):** sources report-guard.sh the way the reporter does and asserts all five globs; a healer commit into `broker/internal/broker/provider_do.go` is REFUSED with `product-behaviour surface`, non-swarmable, reverted (this case was red before the change — the rail passed it); `agent/cmd/agent/main.go` and `control-plane/cmd/control-plane/main.go` refused likewise; a `broker/*_test.go` and `scripts/lib/x.sh` still heal (exemption intact, declaration not over-wide). Vendored `rehearsal-heal-lib-test` (26) unchanged green.
ben closed this issue 2026-09-03 15:51:07 +00:00
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.

Dependencies

No dependencies set.

Reference
Matou/idss#1188
No description provided.