Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 59 additions & 2 deletions .squad/e2e/E1-merge-continuation-relay.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

The merge-continuation relay — which had **never once succeeded** before tonight — worked end to end on 2026-08-21.

**E1 verdict: PASS** — all tested items passed. One item (epic closure / Rule D) was **not verified** due to an infrastructure hang, not a Squad defect.
**E1 verdict: PASS (with one gate NOT VERIFIED)** — 7 of 8 tested items passed. The eighth — **Rule D / epic closure** — was **NOT VERIFIED** due to a `detection` infrastructure hang, not a Squad defect. Rule D is now a **formal gate on this procedure** (see *Rule D — the gate and its escape hatch* below), and any re-run must score it explicitly rather than treating an unobserved run as green.

---

Expand Down Expand Up @@ -88,4 +88,61 @@ Operational guidance: if the `detection` job has not completed within ~10 minute

Epic closure was not re-tested after the fix. The session ended while the `detection` job hung. This is **not a Squad regression** — the infra hang prevented observation, not a logic failure.

This item remains open for a future E2 experiment.
Rule D is now a formal gate on E1 (see next section). It is **not** getting its own scenario number — an earlier draft of the E-series referred to a "future E2 experiment," but that scenario was never authored. Rule D shares E1's trigger (the merge-continuation relay closing the last leaf), so verifying it separately would either duplicate E1 or fabricate the state — neither is worth a distinct procedure. See `.squad/e2e/README.md` for the numbering history.

---

## Rule D — the gate and its escape hatch

**Added post-execution, 2026-08-21.** Any re-run of E1 MUST score Rule D explicitly rather than defaulting to green on absence of contrary evidence.

### The gate

**Trigger.** All leaf tasks under an epic have been merged (their child issues CLOSED) and the merge-continuation relay has been observed to dispatch (i.e. E1's other 7 gates have passed on the final leaf).

**Rule D verdict — three possible outcomes:**

- ✅ **PASS** — the epic issue is CLOSED within a stated observation window (default: 10 minutes after the last leaf's merge-continuation relay run reaches `success`). The closure is attributed to Squad (either commented by the coordinator or effected via a Squad-authored PR/dispatch), not a manual close.
- ❌ **FAIL** — all leaves are CLOSED, the observation window has expired, the epic is still OPEN, and no `Squad —` workflow run in that window shows a closure attempt. This is a real Rule D defect: closure logic exists but did not fire, or fired against the wrong target.
- ⚠️ **NOT VERIFIED** — the observation was blocked by an infrastructure hang (`detection` on `Install ripgrep` is the known offender). Record the observation-blocking job's URL and step and the exact minute the run was cancelled. A NOT VERIFIED verdict is *not* a green: it is a documented absence of signal, and it does not close #1758.2 or any successor.

### The escape hatch (required text on any NOT VERIFIED result)

```yaml
rule_d:
verdict: NOT VERIFIED
reason: "detection job hung >N min on step '<step name>'; observation window expired before closure could be witnessed"
blocked_by_job_url: "https://github.com/<owner>/<fixture>/actions/runs/<run_id>/job/<job_id>"
blocked_by_step: "<step name>"
cancelled_at_utc: "<yyyy-MM-ddTHH:mm:ssZ>"
observation_window_min: 10
window_started_utc: "<yyyy-MM-ddTHH:mm:ssZ>" # when the relay run reached success
window_ended_utc: "<yyyy-MM-ddTHH:mm:ssZ>" # cancelled_at_utc for hang; +window_min otherwise
```

**Do not omit any of these fields on a NOT VERIFIED.** An escape hatch that accepts blank fields becomes a way to score anything as NOT VERIFIED. If any of the required text is missing, treat the result as **FAIL** (blocked-observation is a claim; unsubstantiated blocked-observation is silence).

### PASS observation (the mandatory extractions)

```powershell
$FIXTURE = "bradygaster/aspiregregator-squad-e2e"
$EPIC = <epic issue number>

# The relay run's success timestamp — the start of the observation window.
gh run list --repo $FIXTURE --workflow "Squad" --limit 20 `
--json databaseId,name,conclusion,updatedAt `
--jq '.[] | select(.conclusion=="success" and (.name|test("implement|relay"; "i"))) |
[(.databaseId|tostring),.name,.updatedAt] | join(" | ")' 2>$null

# Epic state at the end of the observation window.
gh issue view $EPIC --repo $FIXTURE --json state,closedAt,timelineItems `
--jq '{state,closedAt,closer:(.timelineItems[]|select(.__typename=="ClosedEvent")|.actor.login)}' 2>$null
```

**PASS attribution rule.** `closer` must be a Squad-owned actor (`app/github-actions` posting a Squad workflow closure, or the coordinator's Squad-authored PR merging). A closure attributed to a human operator during the observation window is **not** a Rule D PASS — it is a Rule D FAIL that was manually papered over, and E1's whole point is that closure was supposed to be autonomous.

### FAIL observation

Record the full `gh run list --workflow "Squad"` output for the observation window along with the epic's `state` and `openIssues` count. A FAIL says the closure logic did not fire — that is the finding.

---
Loading