e2e: drive evidence is referenced (a host path), never attached — the eyeball rule needs host access today #596

Closed
opened 2026-08-19 18:54:49 +00:00 by ben · 2 comments
Owner

Gap

Found while writing down the e2e driver contract (#570, ADR 0182). The driver contract's screenshot-evidence clause (clause 6) requires evidence to be eyeballed before a green/red is trusted (docs/agents/swarm-atlas.md §8: "a GREEN with unexamined screenshots is not a GREEN"). Today neither the GREEN close comment nor a RED filing meets that in practice:

  • scripts/rehearsal-cycle.sh's GREEN path posts a Forgejo comment naming test-results/drive-$target/$stamp/ — a path on the executor host (matou-workstation), not an image.
  • .sandcastle/rehearsal-report.sh's RED filing does the same — headless-diagnosis prose plus a host path, no attached image.

So the eyeball rule currently requires SSH access to the executor host, which most readers of a drive/gap issue in Forgejo don't have. Screenshots ARE captured (greens included, per app/playwright.config.ts's OC_E2E_CAPTURE default) — they just never leave the host.

Ask

Attach at least one representative screenshot (e.g. the finish leg's still, or the first red leg's) to the GREEN close comment and to any RED filing, using Forgejo's issue-comment attachment API, instead of (or alongside) the host-path reference. Scope this narrowly — one image per drive outcome, not a full evidence bundle.

Related: #570 (driver contract), #574 (TUI data-layer wiring — doesn't cover this), #335 (closed — the earlier "healthy drives lose evidence" finding that got capture-on-green landed but not attachment).

Ruled by agent under ADR 0174 — a two-way door (new ticket, no code/tracker-state change beyond filing); veto anytime.

## Gap Found while writing down the e2e driver contract (#570, ADR 0182). The driver contract's screenshot-evidence clause (clause 6) requires evidence to be **eyeballed** before a green/red is trusted (`docs/agents/swarm-atlas.md` §8: "a GREEN with unexamined screenshots is not a GREEN"). Today neither the GREEN close comment nor a RED filing meets that in practice: - `scripts/rehearsal-cycle.sh`'s GREEN path posts a Forgejo comment naming `test-results/drive-$target/$stamp/` — a path **on the executor host** (`matou-workstation`), not an image. - `.sandcastle/rehearsal-report.sh`'s RED filing does the same — headless-diagnosis prose plus a host path, no attached image. So the eyeball rule currently requires SSH access to the executor host, which most readers of a drive/gap issue in Forgejo don't have. Screenshots ARE captured (greens included, per `app/playwright.config.ts`'s `OC_E2E_CAPTURE` default) — they just never leave the host. ## Ask Attach at least one representative screenshot (e.g. the `finish` leg's still, or the first red leg's) to the GREEN close comment and to any RED filing, using Forgejo's issue-comment attachment API, instead of (or alongside) the host-path reference. Scope this narrowly — one image per drive outcome, not a full evidence bundle. Related: #570 (driver contract), #574 (TUI data-layer wiring — doesn't cover this), #335 (closed — the earlier "healthy drives lose evidence" finding that got capture-on-green landed but not attachment). Ruled by agent under ADR 0174 — a two-way door (new ticket, no code/tracker-state change beyond filing); veto anytime.

Live probe (#596): confirming Forgejo's comment-attachment API accepts a real screenshot from a stale drive run (20260815T114326Z, a RED leg's auto-capture) — proving the mechanism this ticket's fix relies on before landing it. This screenshot itself is not fresh evidence of a passing drive, just the attach-API proof.

Live probe (#596): confirming Forgejo's comment-attachment API accepts a real screenshot from a stale drive run (20260815T114326Z, a RED leg's auto-capture) — proving the mechanism this ticket's fix relies on before landing it. This screenshot itself is not fresh evidence of a passing drive, just the attach-API proof.

Ruled by agent under ADR 0174 — veto anytime.

Landed — evidence is now attached, not just referenced. Commit 834d022a2d838627bd98247bf7b6f48466d208bc (834d022, on main):

  • .sandcastle/evidence-lib.sh (new): pick_representative_screenshot — newest *.png anywhere under a run dir, portable across any driver satisfying the six-clause contract (not ourcloud-specific).
  • .sandcastle/forgejo-lib.sh: forgejo_comment_id, forgejo_attach_comment_asset, forgejo_attach_issue_asset — Forgejo's comment/issue asset-upload API.
  • scripts/rehearsal-cycle.sh's GREEN close comment, and .sandcastle/rehearsal-report.sh's matched-issue path (comment-asset) and new-filing path (issue-asset, no prior comment to key off) — all now attach one representative screenshot alongside the existing host-path note. Best-effort: a missing/failed attach never blocks the close/filing.
  • The existing host-path reference is kept as the fallback trail, per the ticket's ask ("instead of (or alongside)").

Proof:

  • Offline: evidence-lib-test.sh (new, 5 cases, incl. a regression pinning that a missing run dir never trips a set -euo pipefail caller — surfaced by find+pipefail interaction while wiring rehearsal-cycle.sh), forgejo-lib-test.sh (+8 checks for the id/attach primitives), rehearsal-report-test.sh (+3 cases: screenshot on new filing, on a matched-issue comment, and the no-screenshot skip path). Full .sandcastle/tests/*.sh (42) + scripts/tests/*.sh (3) sweeps green before and after.
  • Live: rehearsal-cycle.sh has no offline harness (none did before this ticket — it's live-infra glue), so the real attach mechanism was proven against the real Forgejo API directly on this ticket — see the screenshot comment above, a real capture from a stale drive run (20260815T114326Z), fetched back afterward and confirmed (browser_download_url present, HTTP 201).

docs/agents/e2e-driver-contract.md's "Known gap" section is updated to describe the landed mechanism instead. STATUS.md updated in the same commit.

Ruled by agent under ADR 0174 — veto anytime. **Landed** — evidence is now attached, not just referenced. Commit `834d022a2d838627bd98247bf7b6f48466d208bc` (`834d022`, on `main`): - `.sandcastle/evidence-lib.sh` (new): `pick_representative_screenshot` — newest `*.png` anywhere under a run dir, portable across any driver satisfying the six-clause contract (not ourcloud-specific). - `.sandcastle/forgejo-lib.sh`: `forgejo_comment_id`, `forgejo_attach_comment_asset`, `forgejo_attach_issue_asset` — Forgejo's comment/issue asset-upload API. - `scripts/rehearsal-cycle.sh`'s GREEN close comment, and `.sandcastle/rehearsal-report.sh`'s matched-issue path (comment-asset) and new-filing path (issue-asset, no prior comment to key off) — all now attach one representative screenshot alongside the existing host-path note. Best-effort: a missing/failed attach never blocks the close/filing. - The existing host-path reference is kept as the fallback trail, per the ticket's ask ("instead of (or alongside)"). **Proof:** - Offline: `evidence-lib-test.sh` (new, 5 cases, incl. a regression pinning that a missing run dir never trips a `set -euo pipefail` caller — surfaced by `find`+`pipefail` interaction while wiring `rehearsal-cycle.sh`), `forgejo-lib-test.sh` (+8 checks for the id/attach primitives), `rehearsal-report-test.sh` (+3 cases: screenshot on new filing, on a matched-issue comment, and the no-screenshot skip path). Full `.sandcastle/tests/*.sh` (42) + `scripts/tests/*.sh` (3) sweeps green before and after. - Live: `rehearsal-cycle.sh` has no offline harness (none did before this ticket — it's live-infra glue), so the real attach mechanism was proven against the real Forgejo API directly on this ticket — see the screenshot comment above, a real capture from a stale drive run (20260815T114326Z), fetched back afterward and confirmed (`browser_download_url` present, HTTP 201). `docs/agents/e2e-driver-contract.md`'s "Known gap" section is updated to describe the landed mechanism instead. STATUS.md updated in the same commit.
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#596
No description provided.