Skip to content

Spec: interactive UI verification and GitHub-attached Visual evidence in pull requests #2023

Closed
4 of 4 issues completed

Description

@JacobStephens2

Settled in a grill-with-docs session: docs/grill-with-docs/2023-recordings-in-pr-bodies.md (Q1.1–Q3.3; ADR 0034; research in docs/research/recordings-in-pr-bodies.md).

Problem Statement

When a Ticket run, Spec run, Continuation, or Fix run changes an application's rendered user interface, passing unit tests and static screenshots are not enough to prove the feature actually works when a person clicks through it:

  • Agents today capture static Before and After screenshots (or .gif clips) when prompted, without a standard workflow across all seven Harnesses to boot the application in a fresh Worktree, drive its interactive flows like a human engineer, check console and network errors, and record a clean walkthrough without multi-second pauses between model turns.
  • Target repositories have no standard project-local verification skill contract teaching cold agent sessions how to launch, health-check, seed, drive, and tear down the application safely on ephemeral ports without colliding across concurrent Runs or leaving orphan servers and browser daemons behind at the end of a turn (which triggers a wasted Resume).
  • Under #1092, pull request Visual evidence is pushed to secret personal Gists: those links have no viewer authentication (exposing private team interfaces to anyone with the URL), live under a personal account rather than the repository, fail under repository-scoped GitHub App installation tokens, and cannot play .mp4 or .webm recordings inline in a browser.
  • Later Security reviews and Delivery Repairs that modify UI code do not refresh Visual evidence, leaving pull request bodies with stale screenshots or recordings that no longer match the delivered head.
  • Hosts missing an up-to-date gh CLI (such as gh 2.96.0, which predates --attach), ffmpeg, or headless Chromium silently lack what they need to record and attach walkthroughs unless Setup checks for those tools and helps install or update them.

Solution

Give thirdshift end-to-end UI verification and GitHub-attached Visual evidence across all seven Harnesses:

  1. Composable UI verification Factory skill (thirdshift-verify-ui): When a change alters interactive UI behavior, forms, state transitions, or multi-step flows, existing sessions (implement, bug diagnosis, pull request writing, and Spec review) run a two-phase browser workflow in the local Worktree: first explore the live application interactively (inspecting rendered state, console errors, failed network requests, and edge cases, fixing broken behavior in-session), then execute a concise Playwright walkthrough pass with visible cursor and click-action indicators, zero dead-air pauses between turns, and ffmpeg transcoding to a universally playable H.264 .mp4 (5–25 s, <= 8 MB). Static layout or copy tweaks continue to use paired Before and After .png screenshots; interactive changes include an After walkthrough recording (plus a matching Before walkthrough recording when fixing a bug or changing an existing interactive flow).
  2. Two-layer repository bootstrap and verification skill generators: Import and adapt the MIT-licensed create-verification-skill and maintain-verification-skill Day shift skills (from Cursor pstack, edited with /writing-for-agents) so any repository can generate and maintain project-local verify-<app> skills (Launch, Doctor, Drive, Evidence, Cleanup, Helpers, and a features map) using ephemeral ports, isolated temporary state, trap-guarded cleanup of servers and browser daemons, and optional host-only faux test credentials outside git. Dogfood this contract in thirdshift by generating and proving project-local verification skills for both the Console and the documentation/marketing site.
  3. GitHub CLI attachment hosting (ADR 0034): Replace #1092's secret-Gist recipe across Factory and Day shift skills with gh pr create --attach and gh pr edit --attach (gh >= 2.103.2), uploading validated .png screenshots and H.264 .mp4 walkthrough recordings to GitHub user-attachments beneath #2265's bold flow-and-viewport labels. Captures render inline images and native <video> players directly in pull request bodies while inheriting the repository's own read permissions on private and public repositories, with zero media blobs added to git history.
  4. Lifecycle truthfulness and Setup convenience: Child Ticket runs in a Spec run verify UI interactively locally while Spec review attaches unified Visual evidence on the Spec PR; Continuations, Fix runs, and UI-touching Security reviews and Delivery Repairs publish missing Visual evidence or refresh stale captures whenever their commits alter rendered UI. Setup probes gh >= 2.103.2, ffmpeg, and Playwright headless Chromium — printing install/upgrade commands when non-interactive, and offering an interactive [y/N] prompt on a terminal to install or update missing tools after saving the User config and Credentials.

User Stories

  1. As the Day shift reviewing a pull request that adds or changes an interactive UI flow, I want a native inline <video> walkthrough player in ### Visual evidence under a bold flow-and-viewport label, so that I can watch the feature work inside GitHub without checking out the branch or downloading a file.
  2. As the Day shift reviewing a pure CSS, copy, or static layout tweak, I want paired Before and After .png screenshots at matching desktop (1440×900) and affected mobile (390×844) viewports without an unnecessary video, so that I can scan static visual diffs at a glance.
  3. As the Day shift reviewing an interactive bug fix or behavioral change to an existing flow, I want both Before and After walkthrough recordings (alongside static screenshots where layout changed), so that I can see the broken or prior behavior beside the fixed behavior.
  4. As the Day shift reviewing a net-new interactive control or route that did not exist on the Base branch, I want only an After walkthrough recording rather than a meaningless Before recording of a page lacking the control, so that Runs do not waste minutes booting a Base-branch worktree for zero signal.
  5. As a teammate reviewing a pull request on a private employer repository, I want screenshots and walkthrough recordings to inherit GitHub's repository read permissions automatically, so that I can view them in the pull request with my existing GitHub login and zero extra Console accounts while outsiders cannot access them.
  6. As an open-source reviewer on a public repository, I want attached screenshots and walkthrough recordings to play inline on GitHub without sign-in walls, so that public pull request evidence remains readable to everyone.
  7. As the Day shift watching a walkthrough on macOS or iOS Safari, Chrome, or Firefox, I want recordings transcoded to H.264 (yuv420p) .mp4 with fast-start metadata and visible cursor/click highlights, so that playback starts immediately, scrubbing works smoothly, and every click or keystroke is visually legible.
  8. As the Day shift watching a walkthrough recording, I want interactive exploration separated from a clean continuous walkthrough pass, so that the video lasts 5–25 seconds with no frozen 30-second model-thinking gaps.
  9. As the Day shift, I want the implementing session to click around the live UI, inspect accessibility state, console errors, and failed network responses, and fix broken behavior before opening the pull request, so that broken UI states are caught before human review.
  10. As an operator running all seven Harnesses (claude, codex, agy, grok, muse, opencode, kimi), I want browser exploration and recording driven entirely through shell/CLI tools and Factory skills with zero MCP configuration, so that every Harness verifies UI changes identically.
  11. As an operator running concurrent Commands (Command limit and spec.parallel), I want UI verification servers and browsers to use OS-assigned ephemeral ports, isolated mktemp state directories, and trap-scoped teardown of both servers and browser daemons, so that parallel Runs never collide on ports or databases and never leave background processes that trigger a wasted Resume.
  12. As a security-conscious operator using irreversible GitHub user-attachments, I want the publish workflow to reject symlinks, non-regular files, files not owned by the current user, oversized files (> 8 MB), and non-faux credentials before calling gh --attach, so that neither local secrets nor scratch captures are ever uploaded.
  13. As an operator of a private repository whose UI verification requires non-committed sandbox test credentials on Fleet hosts, I want sessions to read faux test environment variables from a dedicated per-repository path outside git rather than copying the Launch directory's .env, so that developer or production secrets never leak into a Worktree or onto screen.
  14. As a developer onboarding a UI repository to thirdshift, I want a /create-verification-skill Day shift skill that interviews my codebase, writes a project-local verify-<app> skill and features map, and proves one mapped feature end to end, so that cold agent sessions know how to launch, health-check, drive, and clean up my app without guesswork.
  15. As a developer maintaining a UI repository over time, I want a /maintain-verification-skill Day shift skill and permission for pull requests to record newly discovered environment gotchas in verify-<app>, so that the verification map stays honest as routes and startup requirements evolve.
  16. As a maintainer of thirdshift itself, I want dogfooded verify-console and verify-site skills in this repository proven against live ephemeral-port instances, so that Runs touching the Console or site use the exact contract thirdshift prescribes for target repositories.
  17. As the Day shift reviewing a Spec PR produced by a Spec run, I want child Ticket runs to verify their UI changes locally without uploading premature attachments while Spec review publishes unified Before and After Visual evidence for the whole Spec, so that the final Spec PR presents one coherent set of evidence.
  18. As the Day shift, I want Continuations, Fix runs, and UI-touching Security reviews and Delivery Repairs to publish missing Visual evidence or refresh stale captures whenever their commits modify rendered UI, so that a pull request's visual proof always matches its delivered head.
  19. As an operator running Runs on an unconfigured repository or a host where the app, headless browser, ffmpeg, or gh >= 2.103.2 genuinely cannot run, I want the Run to finish Ready-for-review with an explicit limitation stated in ## Evidence rather than failing the Run, so that unconfigured repositories never trip the Failure limit.
  20. As an operator running thirdshift setup on a laptop or Fleet machine from an interactive terminal, I want Setup to check gh >= 2.103.2, ffmpeg, and Playwright headless Chromium and offer a [y/N] prompt (defaulting to N) to install or upgrade missing tools after saving my User config and Credentials, so that preparing a host for Visual evidence is convenient and a failed install never loses my saved configuration.
  21. As an operator running thirdshift setup with no terminal (or pressing Enter on a backend-only Fleet host), I want Setup to print PASS or WARN with exact OS-specific install/upgrade commands without running any installer or exiting non-zero, so that unattended and CLI-only setups stay fast and deterministic.
  22. As a future contributor reading the user manual, Prompts page, or architecture and how-it-works pages on the site, I want every explanation of pull request Visual evidence updated from secret Gists to GitHub attachments and interactive walkthroughs, so that documentation matches shipped behavior.
  23. As a developer running thirdshift's integration test suite locally or in CI, I want the fake gh harness and executable skill-recipe tests to validate --attach handling and pre-upload file guards without hitting the network, so that regressions in attachment flags or symlink guards fail fast in tests.
  24. As the Day shift planning #2022 (Review run backfill), I want #2023 to settle the capture and gh --attach contract first and mark #2022 blocked on #2023, so that Review runs can reuse one shared Visual evidence workflow under their captured-head guard.

Implementation Decisions

  • Composable thirdshift-verify-ui Factory skill (no new Built-in process Step). Add a new embedded Factory skill (thirdshift-verify-ui), authored following /writing-for-agents and linked across all seven Harness adapters alongside existing Factory skills. Existing Factory skills (thirdshift-implement, thirdshift-diagnosing-bugs, thirdshift-pr) and their Day shift twins (kept in parity) invoke thirdshift-verify-ui whenever a change touches rendered HTML, CSS, templates, frontend routes, or interactive UI state. Built-in processes add no cold verify-ui Step; a Custom process or Experiment Arm may still invoke thirdshift-verify-ui as a standalone skill Step (ADR 0024).
  • Two-phase browser driving and clean walkthrough capture. Standardize on shell/CLI-driven browser execution with zero MCP dependencies across all seven Harnesses:
    • Phase 1 — Interactive exploration: Boot the target application and drive the affected routes and controls interactively (using a browser CLI such as @playwright/cli or agent-browser when installed, or short Playwright scripts otherwise), inspecting accessibility snapshots, rendered state, console errors, failed network requests, and edge cases. Fix broken application behavior in-session before recording. Close any browser daemon (close / close-all) and stop any server before the command exits so no background process triggers a Resume.
    • Phase 2 — Clean walkthrough pass: Execute a disposable Playwright script in a temporary file (mktemp, removed on exit) that launches headless Chromium at 1440×900 desktop (plus 390×844 mobile when responsive behavior is affected) with explicit recordVideo dimensions matching the viewport and Playwright's native showActions cursor/click/highlight annotations enabled (falling back to a lightweight injected inert cursor and click-ripple overlay only when a target repository pins Playwright older than 1.59). Pace user actions briefly (~300–500 ms beats) so there is zero model-thinking dead air, assert no unexpected pageerror or 5xx responses, close the browser context to flush the .webm recording, and transcode with ffmpeg to H.264 .mp4 (libx264, yuv420p, +faststart, 5–25 s target length, strictly <= 8 MB).
  • Static screenshots vs walkthrough recordings, and when Before recordings apply. Pure static layout, typography, or copy changes keep paired Before and After .png screenshots without requiring a video. Changes affecting interactive behavior, forms, animations, or multi-step flows always require an After walkthrough .mp4 recording (alongside static Before/After .pngs where existing visual layout changed); a matching Before walkthrough .mp4 (recovered from a temporary detached Base branch worktree when not captured upfront) is required only when fixing a bug or altering an existing interactive flow, and omitted when the interactive flow or control is net-new on the branch.
  • GitHub CLI --attach publication and secret-Gist retirement (ADR 0034). Retire #1092's secret-Gist upload recipe across Factory skills, Day shift skills, Session prompts, manual, and site pages. Publish all Visual evidence (.png screenshots and .mp4 walkthrough recordings) through gh pr create --attach and gh pr edit --attach (requiring gh >= 2.103.2 for both user logins and ghs_ GitHub App installation tokens). Format ### Visual evidence with #2265's bold visible labels immediately above each capture (**Before — <flow>, <viewport>**, **After — <flow>, <viewport>**, **Walkthrough — <flow>, <viewport>**, or **Before walkthrough — ...** / **After walkthrough — ...** when paired), placing each local attachment reference on its own paragraph so gh rewrites it to an inline GitHub user-attachments image or native <video> player.
  • Pre-upload validation for irreversible attachments. Because GitHub user-attachments provides no delete API, enforce a deterministic shell validation helper in the PR skill before calling gh --attach: verify gh --version is >= 2.103.2, verify every capture path is a regular file (-f), not a symlink (! -L), owned by the current user (-O), named with safe characters ([A-Za-z0-9._-], .png or .mp4 extension), non-empty, and <= 8,388,608 bytes (8 MB, safely inside GitHub's 10 MB free-plan cap), and ensure captures used only faux/redacted data. Never upload intermediate exploratory captures.
  • Two-layer repository bootstrap, isolation, and host faux credentials. thirdshift-verify-ui discovers project-local verification skills matching verify-* in the repository's agent skills folder (or a UI verification section in AGENTS.md, falling back to repository test/dev-server documentation when absent). Target-repository launches must bind OS-assigned ephemeral ports (0 or a probed free port), isolate database/home/cache state inside a mktemp -d directory, and wrap server and browser-daemon lifecycles in a single trap ... EXIT subshell so proof captures in mktemp survive cleanup while zero child processes outlive the command. When a target repository requires non-committed sandbox/staging test credentials on a Fleet host, read them from ~/.config/thirdshift/verify-env/<owner>/<repo>.env — never copying untracked .env files from the Launch directory, and never echoing or displaying secret values. Pull requests may update a project-local verify-<app> skill's Gotchas when genuine new setup traps are discovered.
  • Day shift verification-skill generators and thirdshift dogfooding. Import and adapt MIT-licensed create-verification-skill and maintain-verification-skill from Cursor pstack (retaining MIT license attribution like create-formal-verification-skill, and editing via /writing-for-agents) into the repository's Day shift skills so they generate and maintain project-local verify-<app> skills (Launch, Doctor, Drive, Evidence, Cleanup, Helpers, plus a features map) aligned with thirdshift's ephemeral-port, trap cleanup, mktemp proof-survival, H.264 .mp4, and verify-env rules. Use that contract to add and prove verify-console and verify-site skills in this repository.
  • Completion policy and cross-Run truthfulness (Spec runs, Continuations, Fix runs, Security reviews, Repairs). Keep #1092's completion policy: fix broken UI behavior in-session, require Visual evidence when supported, and allow Ready-for-review with an explicit limitation note in ## Evidence when the application, headless browser, ffmpeg, or gh >= 2.103.2 --attach cannot run (including GitHub Enterprise Server), adding no new agent-failed failure mode or mechanical Self-merge hold. In a Spec run, child Ticket runs run interactive UI verification locally without calling gh or uploading attachments, and Spec review captures and attaches unified Visual evidence when rewriting the Spec PR body. Update Session prompts for Security review and Delivery Repairs (conflict, CI-fix, and review repairs) alongside Continuations and Fix runs so that whenever a session commits changes to rendered UI files on an open pull request, it refreshes stale or missing Visual evidence via gh pr edit --attach.
  • Setup capability probe and interactive install/upgrade offer. Extend Setup (through its Outside effects interface) to probe three host capabilities for Visual evidence: gh version >= 2.103.2, ffmpeg on PATH, and an installed Playwright headless Chromium binary (checking standard Linux/macOS Playwright cache locations or Playwright CLI). After writing the User config (and Credentials when applicable):
    • With no terminal, Setup emits a concise PASS or WARN line naming any missing or outdated tool and printing OS-appropriate install/upgrade commands (brew on macOS, apt + npx playwright install chromium on Debian/Ubuntu Linux), running no external commands and returning 0.
    • On an interactive terminal when one or more checks warn, Setup prints the exact install/upgrade commands and asks a single [y/N] confirmation (default N). Answering N (or Enter) leaves the host unchanged; answering y executes the commands in the foreground, re-probes, and reports the result, treating any installer error or interruption at that stage as a warning so the already-saved User config and Credentials remain intact.
  • Generated prompts, manual, site pages, and fake gh harness. Regenerate compiled prompt snapshots and the Prompts page, update the user manual (and regenerate the site docs page), update hand-written site pages (index, how-it-works, and architecture) to replace secret-Gist descriptions with GitHub-attached screenshots and walkthrough recordings, and extend the fake gh test binary (pr create, pr edit, pr comment, and --version) to accept repeatable --attach flags.

Testing Decisions

  • Good tests assert observable external behavior at existing high-level seams — CLI exit codes, terminal output, saved files, fake gh invocations, and real rendered/encoded media artifacts — rather than internal helper structure.
  • Setup CLI and PTY tests (testing the Setup module and end-to-end setup command):
    • Non-terminal thirdshift setup with missing ffmpeg, missing Chromium cache, or gh 2.96.0 writes User config, prints WARN with OS-appropriate remedies, runs no installer, and exits 0; when all three pass, prints PASS.
    • Interactive PTY thirdshift setup asks no install prompt when all three pass; prompts [y/N] (defaulting to N on Enter) after writing User config and Credentials when a check warns; executes the fake install/upgrade commands only on y; and preserves the written User config and Credentials with a warning if an installer exits non-zero or receives Ctrl-C.
    • Prior art: existing PTY and sandbox-probe tests in the setup integration suite and scripted Outside unit tests in the Setup module.
  • Factory skill linking, parity, and executable publish-recipe tests (testing the skills module and fake gh):
    • Verify thirdshift-verify-ui links across all seven Harness adapters and that Factory skills (thirdshift-pr, thirdshift-implement, thirdshift-diagnosing-bugs) match their Day shift counterparts.
    • Extract the shell pre-upload validation and gh --attach recipe directly from the PR skill and execute it against a fake gh binary to assert: symlinks are refused without reading their target, non-regular files, bad filenames, files exceeding 8 MB, and gh < 2.103.2 are refused cleanly, and valid .png and .mp4 mktemp captures pass through --attach.
    • Verify the fake gh test harness accepts repeatable --attach flags on pr create, pr edit, and pr comment.
    • Prior art: the existing adapter-linking and pr_evidence_publish_recipe_does_not_upload_symlink_targets tests in the skills module, and fake gh integration tests.
  • Prompt, manual, and site verification tests (testing Session prompts, Prompts page, manual, and site):
    • Assert Continuation, Spec review, Security review, and Delivery Repair prompts include the UI Visual evidence refresh rules and pass the Prompts-page snapshot check.
    • Assert manual generation (docs:check) and site browser tests pass with zero stale secret-Gist claims on hand-written site pages.
    • Prior art: inline prompt tests, prompts_page tests, and the site test suite.
  • End-to-end live proof of verify-console and verify-site:
    • Execute each generated skill end to end once against a real ephemeral-port Console and site server: launch, run Doctor, drive a mapped interactive flow, confirm a non-empty 1440×900 H.264 +faststart .mp4 (<= 8 MB) and .png survive trap cleanup in their mktemp locations, and confirm zero server or browser child processes remain running afterward.

Out of Scope

  • Native desktop GUI or OS-window screen recording (Xvfb, x11grab, pixel-coordinate desktop agents) (Q1.1).
  • Hosted cloud sandboxes (Daytona, E2B, Vercel, Modal, Warp) or thirdshift-managed Docker/devcontainer wrappers (Q1.3).
  • Implementing #1486's bwrap Run sandbox itself (its #2023 requirements — uploads.github.com in the proxy allowlist, read-only Playwright cache and verify-env binds, and Chromium sandbox/proxy flags — are recorded in #1486's grill note for #1486 to implement) (Q2.8).
  • Serving or streaming video from thirdshift console, custom unmerged git refs (refs/thirdshift/evidence/*), or external S3/R2 upload hooks (Q1.5, Q2.1, ADR 0034).
  • Adding a dedicated cold verify-ui Step to Built-in processes (Q1.6) or mechanically holding Self-merge / failing Runs (agent-failed) when Visual evidence is absent (Q1.7).
  • Backfilling missing Visual evidence during Review runs (#2022), which remains a separate open issue blocked on #2023 so its captured-head/body Rust delivery guard can reuse #2023's settled contract (Q1.8, Q3.3).
  • GitHub Enterprise Server attachment uploads (unsupported by gh --attach; covered by the explicit ## Evidence limitation rule).

Further Notes

  • Domain docs already drafted in the grill branch:
    • GLOSSARY.md: added Visual evidence (_Avoid_: computer use, video artifact, test skill, app harness) and widened Setup (Q1.9, Q2.9, Q3.2).
    • docs/adr/0034-pull-request-visual-evidence-uses-github-attachments.md: records why pull request Visual evidence uses gh >= 2.103.2 --attach over branch commits (#1603, #1624), secret Gists (#1092), custom git refs, and thirdshift console.
    • docs/research/recordings-in-pr-bodies.md: primary-source investigation of Playwright 1.64.0 videoRecorder.ts / showActions, cli/cli v2.99.0–v2.105.0 --attach, raw.githubusercontent.com headers, and bwrap namespace interactions.
    • docs/grill-with-docs/1486-run-isolation.md: updated with #2023's Run sandbox requirements.
  • Tickets follow via /to-tickets (no release split required: every Ticket builds on the Spec branch, and the ## Evidence limitation fallback prevents self-blocking on hosts not yet upgraded to gh >= 2.103.2). A likely Ticket split:
    1. Land domain/research docs (GLOSSARY.md, ADR 0034, research & grill notes) + fake gh --attach support in test support.
    2. Add thirdshift-verify-ui Factory skill, migrate thirdshift-pr / thirdshift-implement / thirdshift-diagnosing-bugs (and Day shift twins) from secret Gists to validated gh >= 2.103.2 --attach, update Security review and Delivery Repair Session prompts, regenerate prompts/ + manual + site pages, and replace the Gist skill-recipe test with the gh --attach validation test.
    3. Extend thirdshift setup to probe gh >= 2.103.2, ffmpeg, and Playwright headless Chromium and offer the interactive [y/N] install/upgrade prompt, covered by setup CLI and PTY tests.
    4. Import and adapt MIT create-verification-skill and maintain-verification-skill into Day shift skills, and generate + prove dogfooded verify-console and verify-site skills.

Sub-issues

Sub-issues

4 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. added
    enhancement
    ready-for-human
    on Nov 11, 2026
  2. changed the title [-]make way for thirdshift to use computer use so it can take a recording of its using a UI change and attach that to the PR body[/-] [+]make way for thirdshift to use computer use so it can take a recording of its using a UI change and attach that to the PR body to improve verification and decrease human review time[/+] on Nov 11, 2026
  3. changed the title [-]make way for thirdshift to use computer use so it can take a recording of its using a UI change and attach that to the PR body to improve verification and decrease human review time[/-] [+]make way for thirdshift to use computer use so it can take a recording of its using a UI change and attach that to the PR body to improve verification and trust and decrease human review time[/+] on Nov 11, 2026
  4. JacobStephens2 commented on Nov 14, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI from a grill-with-docs session.

    Grill in progress: pick up here

    This stays ready-for-human: Round 1 (Q1.1–Q1.9) is open with no decisions settled yet.

    Status of Round 1 (9 open questions, each with a recommendation):

    • Q1.1 – UI surface: target headless web browser interaction & recording across all seven Harnesses first, leaving Xvfb virtual-desktop capture out of scope until a native desktop GUI repository joins the Fleet (Recommended: a).
    • Q1.2 – Beyond make way for thirdshift to add screenshots / recordings to PR bodies #1092: drive the live app interactively during verification, plus attach a clean walkthrough recording alongside make way for thirdshift to add screenshots / recordings to PR bodies #1092's static Before/After .png screenshots when behavior/flows change (Recommended: a).
    • Q1.3 – Where verification runs: keep Isolate Runs locally with an opt-in Run sandbox #1486's direction (local Worktrees on Fleet hosts + Isolate Runs locally with an opt-in Run sandbox #1486's bwrap Run sandbox, with per-Worktree ephemeral ports/state; no hosted cloud sandbox vendor or thirdshift-managed Docker wrapper) (Recommended: a).
    • Q1.4 – "Test skill" & bootstrap ownership: two-layer contract—thirdshift's Factory skills own when to verify, how to record, and how to publish; each target repository owns how to boot and seed its app in a repo-committed skill/doc + idempotent bootstrap script (Recommended: a).
    • Q1.5 – Hosting recordings & team auth: serve <video> permalinks from thirdshift console behind allowed_emails sign-in (with #2036-style outbound push from NATted lima-thirdshift), weighed against an unmerged git ref in the target GitHub repo (inheriting GitHub repo permissions) or a configurable external SSO/S3 upload hook (Recommended: a, weighing reviewer auth friction against b and c).
    • Q1.6 – Process placement: ship as a composable Factory skill invoked inside existing sessions (implement, diagnosing-bugs, pr, Spec review) rather than adding a cold verify-ui Step to ticket-run.toml / spec-run.toml (Recommended: a).
    • Q1.7 – Completion & Self-merge gate: fix broken behavior in-session and allow Ready-for-review with an explicit ## Evidence limitation when app/browser/upload cannot run (make way for thirdshift to add screenshots / recordings to PR bodies #1092 rule), vs mechanically holding Self-merge on opted-in repos (Recommended: a, or b if Self-merging UI repos).
    • Q1.8 – Relationship to get thirdshift review to add screenshots to PR body if it doesn't have them and it is a ui changing PR #2022: settle capture and hosting here first so get thirdshift review to add screenshots to PR body if it doesn't have them and it is a ui changing PR #2022's Review run backfill reuses one path (Recommended: a).
    • Q1.9 – Domain language: use Visual evidence, walkthrough recording and UI verification; avoid computer use, test skill, video artifact and app harness; add Visual evidence to GLOSSARY.md only if Q1.5 or Q1.7 gives thirdshift ownership of hosting or gating it (Recommended: a).

    Already checked (in Research results):

    • skills/thirdshift-pr/SKILL.md currently restricts Gist uploads to .png and .gif and notes secret Gists are unlisted capability URLs with no viewer login.
    • GitHub PR Markdown strips <video> and only renders inline video players for github.com/user-attachments/assets/... (no CLI/REST/GraphQL upload API); external .mp4/.webm links render as clickable permalinks.
    • playwright 1.64.0 (recordVideo headless .webm) and ffmpeg are already in use in this repository; shell/CLI browser tools work uniformly across all seven Harnesses, whereas thirdshift wires no shared MCP config across them.

    Next (Round 2, once Round 1 is answered):

    • Exact browser-driving mechanism across all seven Harnesses (interactive CLI daemon vs Playwright recordVideo script, visible click/cursor overlay, .mp4/.webm format and duration/size caps).
    • Storage retention/pruning, public-repo vs private-repo visibility, PR Markdown layout (inline preview + permalink), and NATted lima-thirdshift upload details (following Q1.5).
    • Target-repository bootstrap convention, non-committed faux test credentials in fresh Worktrees, and concurrent port/DB isolation under spec.parallel (following Q1.3 and Q1.4).
    • Spec run handling across child Ticket runs vs Spec review, then /to-spec.

    To resume elsewhere: write the <details> block below to docs/grill-with-docs/2023-recordings-in-pr-bodies.md (or check out recordings-in-pr-bodies on the MacBook), fill in the *Answer:* lines (or answer in chat), and run /grill-with-docs https://github.com/JacobStephens2/thirdshift/issues/2023.

    Full docs/grill-with-docs/2023-recordings-in-pr-bodies.md (Round 1 open)
    # Grilling: #2023, Recordings of interactive UI verification in pull request bodies
    
    Issue: https://github.com/JacobStephens2/thirdshift/issues/2023
    Related: #1092 (closed: Before/After `.png`/`.gif` and secret Gist recipe in `thirdshift-pr`, `thirdshift-implement`, `thirdshift-diagnosing-bugs`), #2022 (`Review run` visual evidence backfill), #1486 ([1486-run-isolation.md](1486-run-isolation.md): local `bwrap` Run sandbox)
    Research: [run-isolation.md](../research/run-isolation.md), [warp-factories-and-alternatives.md](../research/warp-factories-and-alternatives.md), [ADR 0001](../adr/0001-rust-binary-with-embedded-skills.md), [ADR 0012](../adr/0012-factory-skills-linked-into-the-worktree-codex-unsandboxed.md), [ADR 0013](../adr/0013-every-harness-runs-unattended-and-fully-trusted.md), [ADR 0016](../adr/0016-the-console-is-a-long-running-reader.md), [ADR 0024](../adr/0024-a-process-composes-steps-from-a-fixed-catalogue.md), [ADR 0026](../adr/0026-each-console-serves-an-api-that-can-do-what-the-cli-can.md)
    
    ## Round 1 (open)
    
    **Q1.1 - What "computer use" means here: headless web browser vs virtual OS desktop.** Every UI repository the Fleet works on today (`thirdshift` Console and `site`, private employer web apps, and personal web apps) is a web application, and Playwright 1.64 is already used in `console/` and `site/` with built-in headless video capture (`recordVideo`). Full OS-desktop computer use (`Xvfb` + window manager + desktop app/browser + pixel-coordinate mouse/keyboard + `ffmpeg -f x11grab`) handles native desktop GUIs too, at the cost of X11 dependencies on every Fleet host, higher memory/CPU per Run, slower/flakier coordinate clicks than DOM/accessibility locators, and differing computer-use support across thirdshift's seven **Harnesses**. The options:
    - (a) **Web browser UI verification first.** Target headless Chromium / browser-driven interaction and recording across all seven Harnesses; leave `Xvfb` virtual-desktop capture out of scope unless a native desktop GUI repository joins the Fleet.
    - (b) **Full virtual desktop (`Xvfb` + `x11grab`) from the start**, so browser chrome and non-web GUIs share one screen-recording path.
    
    *Recommended:* (a). Every target UI in play is web-rendered, headless Chromium runs cleanly on existing Linux Fleet hosts and inside `bwrap` without an X server, and Round 2 can pick the exact browser-driving mechanism so all seven Harnesses work uniformly.
    
    *Answer:* 
    
    **Q1.2 - What #2023 adds beyond #1092: interactive exploration + walkthrough recording vs scripted capture.** #1092 already updated `thirdshift-implement`, `thirdshift-diagnosing-bugs` and `thirdshift-pr` to require Before/After `.png` screenshots (or `.gif` recordings for interactive/animated flows) at `1440×900` desktop and `390×844` mobile. Ben Holmes' first note pushes past static captures: the agent should *click around the running app* like a human engineer ("did you run it on your machine?") and attach a video walkthrough of using the UI change. The options:
    - (a) **Interactive exploration during verification, plus a clean recorded walkthrough alongside #1092's static Before/After screenshots.** When a change touches interactive UI behavior, forms, state transitions or multi-step flows, the agent first drives the live app interactively (inspecting rendered state, console/network errors and edge cases) and records a concise walkthrough of exercising the change; pure static layout/copy tweaks still use Before/After `.png` screenshots, and walkthrough videos replace `.gif` captures where motion/interaction matters.
    - (b) **Require a walkthrough recording on every UI change**, replacing #1092's static Before/After `.png` screenshots altogether.
    - (c) **Scripted capture is enough.** A single one-shot Playwright script that records the happy path satisfies verification without multi-step exploratory driving first.
    
    *Recommended:* (a). Static side-by-side Before/After `.png`s remain faster to scan for pure CSS/layout diffs (Mayer's transient-information finding in `clear-architecture-diagrams.md`), while an exploratory check + recorded walkthrough solves the real review bottleneck on interactive UI changes.
    
    *Answer:* 
    
    **Q1.3 - Where verification runs: Fleet Worktrees + #1486's local `bwrap` sandbox vs Docker or cloud sandboxes.** Ben's notes come from Warp/Oz and assume a cloud sandbox configured by a Docker image so agents stay off the developer's laptop and away from local `.env` files. In thirdshift, scheduled **Passes** already run off-laptop on always-on Linux **Fleet** VMs; `run-capacity.md` Q1.2 and `1486-run-isolation.md` Q1.1 already declined hosted cloud sandbox providers (Daytona, E2B, Vercel, Warp) for **Runs** because Runs deliver through a local **Worktree** over shared `.git` and run subscription **Harness** logins; and #1486 chose a local `bwrap` **Run sandbox** over per-Run containers. The options:
    - (a) **Keep #1486's direction: run verification locally in the Run's Worktree on the Fleet host (and inside #1486's `bwrap` Run sandbox once enabled), with no hosted cloud sandbox vendor and no thirdshift-managed Docker wrapper.** Target repositories start their own dev servers and backing services on ephemeral ports with isolated per-Worktree state (including a repo's own `docker compose` where it already uses one) so concurrent Runs (`Command limit` / `spec.parallel`) do not collide.
    - (b) **Keep Runs on Fleet hosts (no hosted vendor), but add thirdshift support for running UI verification (or whole sessions) inside a target repository's Docker image / devcontainer.**
    - (c) **Reopen `1486-run-isolation.md` Q1.1** and evaluate a hosted cloud sandbox provider specifically for UI verification.
    
    *Recommended:* (a). It keeps one execution and isolation model across thirdshift (#1486), avoids container-inside-worktree git/login headaches across seven Harnesses, and still lets target repos use Docker for backing services (Postgres, Redis) when their stack wants it.
    
    *Answer:* 
    
    **Q1.4 - Who owns the "test skill" and onboarding bootstrap: two-layer contract vs User config vs repo-only.** Ben's notes pair a skill ("how to spin up its environment and what to verify: stack-specific flags, dev server setup, debugging hooks, and learned gotchas") with an onboarding-style bootstrap (seed/staging data and faux credentials). In thirdshift, **Factory skills** (`skills/thirdshift-*`) are compiled into the binary and linked into every **Worktree** across all repositories, while stack setup and learned gotchas belong to each target repository (and untracked `.env` files in a **Launch directory** do not carry into a fresh `git worktree`). The options:
    - (a) **Two-layer contract: thirdshift's Factory skills own *when* to verify, how to record, and how to attach evidence to the PR; each target repository owns *how to boot and seed its app* via a repo-committed skill/doc and idempotent bootstrap script.** When a repo provides that skill/doc, the session follows it (and PRs can update its "learned gotchas" over time); when absent, the session falls back to discovering existing browser-test / dev-server scripts (as in `console/README.md` and `site/tests/README.md`). Non-secret faux data lives in the repo's seed script; any non-committed test credentials live on the Fleet host outside git and are wired in by Round 2's bootstrap convention.
    - (b) **Configure per-repository startup and seed commands in `~/.thirdshift/config.toml`** (alongside `[review] commands_by_repo`), running UI recordings only on repositories listed there.
    - (c) **Target-repository `AGENTS.md` / skills only**, with no changes to thirdshift's **Factory skills** beyond #1092.
    
    *Recommended:* (a). #1092's trace audit showed 0% unprompted compliance unless the **Factory skills** require the evidence, while stack flags, seed data and learned gotchas belong in versioned repo files rather than per-machine TOML duplicated across six Fleet hosts.
    
    *Answer:* 
    
    **Q1.5 - Hosting recordings and what "viewable by team only, with built-in auth" means.** GitHub PR Markdown strips `<video>` tags and renders inline video players *only* for `https://github.com/user-attachments/assets/<uuid>`, which has no CLI or API upload path (browser session cookies only); every other `.mp4`/`.webm` URL renders in a PR body as a clickable permalink (optionally paired with an inline preview image). Meanwhile, #1092's **secret Gist** recipe has *no* viewer auth—anyone with the raw URL can read it, and files sit under the `gh` user's personal Gists—and thirdshift works on both **public solo repos** (`JacobStephens2/thirdshift`) and **private employer repos** (across shared employer Fleet hosts plus NATted `lima-thirdshift` on your MacBook) where teammates review PRs. The options:
    - (a) **Serve recordings from `thirdshift console` (`https://<console>/...`) behind existing `Console account` sign-in (`allowed_emails`, ADR-0016/0026), with outbound push from NATted machines (`lima-thirdshift`) to a 24/7 Console hub (the `#2036` `console report` pattern).** Gives a real `<video>` player page with pause/scrubbing, zero third-party storage vendor, and built-in email-code sign-in; teammates who review PRs get `allowed_emails` access on a shared Console (and Round 2 settles whether public-repo PRs allow unauthenticated playback or keep Gists).
    - (b) **Push recordings to a dedicated unmerged git ref / orphan store in the target GitHub repository itself** (e.g. outside `main` so the **Base branch** stays clean and `scripts/affected-tests` is untouched), linking the commit-pinned GitHub URL in the PR body. Viewer auth is **GitHub's own repository permissions** automatically—every repo collaborator who can read the PR already has access, works identically from `lima-thirdshift` and every Fleet host with zero extra accounts—at the cost of media blobs living in the remote repo's git store and GitHub's blob/raw handling instead of a custom player page.
    - (c) **Configurable upload command / endpoint in `User config`** (targeting e.g. S3/R2 behind Cloudflare Access / employer SSO, an internal preview host, or a Console endpoint), falling back to secret Gists on public repos when unset.
    - (d) **Keep #1092's secret Gist hosting (unlisted capability URL, no viewer login)** and drop the team-auth requirement.
    
    *Recommended:* (a) if team reviewers can sign in to a shared Console (one self-hosted binary, real `<video>` player, no blobs in git); pick (b) if zero-friction access for every GitHub repo collaborator matters more than a custom player, or (c) if the team already has an internal SSO-protected bucket/host you want to target.
    
    *Answer:* 
    
    **Q1.6 - Where UI verification sits in a Run's `Process`: inside existing Factory skills vs a separate `Step`.** Today `processes/ticket-run.toml` runs `implement` → `security-review` → `delivery` → `self-merge`, and `spec-run.toml` runs `land-tickets` → `spec-review` → `security-review` → `delivery` → `self-merge`. The options:
    - (a) **Inside existing sessions via Factory skills (no new `Built-in process` `Step`).** Put the interactive walkthrough and recording workflow in a composable **Factory skill** (e.g. `thirdshift-verify-ui`) invoked by `thirdshift-implement`, `thirdshift-diagnosing-bugs`, `thirdshift-pr` and **Spec review** whenever the diff touches rendered UI. A **Custom process** or **Experiment** **Arm** can still invoke that skill as a standalone session **Step** (ADR-0024).
    - (b) **Add a dedicated `verify-ui` session `Step` to `ticket-run.toml` and `spec-run.toml`** before `delivery`, so a fresh cold session that did not write the code tests the UI and records the walkthrough.
    
    *Recommended:* (a). Most Runs touch non-UI code, the implementing or Spec-review session already has the build warm, and shipping it as a composable Factory skill lets an Experiment test later whether a separate cold session **Step** earns its extra cost and startup time.
    
    *Answer:* 
    
    **Q1.7 - Completion and `Self-merge` policy when UI verification or upload cannot run.** If a Run touches UI files, interactive verification might (1) uncover a broken flow, (2) be unable to boot the app/browser on that host, or (3) fail to upload the recording. The options:
    - (a) **Fix broken behavior in-session; require the recording when supported, and allow Ready-for-review with an explicit limitation in `## Evidence` when the app/browser/upload genuinely cannot run (no new Rust `agent-failed` state yet).** Matches #1092 so unconfigured repos do not trip the **Failure limit**.
    - (b) **Mechanically gate repos that opt in:** when a repository declares UI verification (via Q1.4's convention or config) and a UI-changing Run finishes without a published recording URL in the PR body, hold **Self-merge** (leaving the PR ready for human review) or fail the Run.
    - (c) **Hard-fail (`agent-failed`) every UI-changing Run across all repos** that finishes without a recording.
    
    *Recommended:* (a) to start, or (b) if you rely on unattended **Self-merge** on UI repos and want a missing recording to hold the merge for a human reviewer.
    
    *Answer:* 
    
    **Q1.8 - Relationship to #2022 (`Review run` backfilling missing screenshots on UI PRs).** Open issue #2022 asks `thirdshift review` to add visual evidence to UI-changing PRs that lack it, and its triage questionnaire explicitly asks whether #2022 should ship first on secret Gists or share #2023's hosting and recording design. The options:
    - (a) **Share one design: settle hosting and capture here in #2023 first, then have #2022 reuse the same Factory skill and hosting path for `Review runs` (either as a Ticket under #2023's Spec or blocked on #2023).**
    - (b) **Keep #2022 independent now on #1092's secret Gist `.png` workflow**, and upgrade `Review runs` later.
    
    *Recommended:* (a). Normal `Review runs` currently forbid PR-body edits (`src/prompt.rs:479`); opening that path once with the settled hosting and recording contract avoids building Gist backfill twice.
    
    *Answer:* 
    
    **Q1.9 - Domain language (`GLOSSARY.md` vs overloaded terms in #2023).** Three phrases in the issue's notes collide with thirdshift's existing language or overstate the mechanism: **"computer use"** usually names pixel-coordinate OS desktop control (or one vendor's API), **"test skill"** sounds like `thirdshift-tdd` and unit-test runners, and **"video artifact"** collides with CI build artifacts (and notice **"app harness"** would collide with **Harness**). Meanwhile `thirdshift-pr` already names the PR section **Visual evidence** alongside **Execution evidence**. The options:
    - (a) **Use `Visual evidence` (covering Before/After screenshots and `walkthrough recordings`) and `UI verification` in skills, prompts and docs; list `computer use`, `test skill` and `video artifact` under `_Avoid_` if `GLOSSARY.md` gets an entry.** Add **Visual evidence** to `GLOSSARY.md` if Q1.5 or Q1.7 gives thirdshift itself ownership of hosting or gating it; otherwise keep `GLOSSARY.md` implementation-free without adding general terms.
    - (b) **Define `Computer use` in `GLOSSARY.md`** as thirdshift's canonical term for an agent driving a live UI (browser or desktop).
    - (c) **Add both `Visual evidence` and `Verification skill` to `GLOSSARY.md` unconditionally now.**
    
    *Recommended:* (a). It keeps `GLOSSARY.md` tight (`GLOSSARY-FORMAT.md`: only concepts with thirdshift-specific rules belong), avoids colliding with `thirdshift-tdd` or **Harness**, and matches the **Visual evidence** heading agents already write in every PR.
    
    *Answer:* 
    
    ## Settled by earlier answers (shout if any is wrong)
    
    - **#1092 is already live on `main`** (commits `a6a58e97`, `2c67812d`, 2026-11-04): `thirdshift-implement`, `thirdshift-diagnosing-bugs` and `thirdshift-pr` already separate **Execution evidence** from **Visual evidence**, capture `mktemp` Before/After `.png` or `.gif` files (`1440×900` desktop, `390×844` mobile), recover missing Before captures from a detached Base-branch worktree, and publish them to a secret git-pushed Gist.
    - **Hosted cloud sandbox providers (Daytona, E2B, Vercel, Modal, Warp) are declined for Runs** ([run-capacity.md](run-capacity.md) Q1.2, [1486-run-isolation.md](1486-run-isolation.md) Q1.1): Runs deliver through a local **Worktree** over shared `.git` and run seven **Harnesses** on subscription logins. Local `bwrap` isolation for Runs lives in #1486.
    - **Repository branches (`main` / Issue branches) stay free of committed PR-evidence media** (#1092): committing screenshots under `docs/screenshots/**` triggered conservative full-suite Rust runs in `scripts/affected-tests` (34 min in PR #1603), and committing under `site/screenshots/**` deployed PR evidence to the public site (PR #1624).
    
    ## Research results (2026-11-13)
    
    - **Existing PR visual evidence skill contract.** `skills/thirdshift-pr/SKILL.md:169-254` currently accepts `.png` and `.gif` only (`case "$filename" in *.png | *.gif)`), refuses symlinks and files not owned by the current user, and pushes to a secret Gist (`gh gist create` + `git push`). It explicitly notes that secret Gists are readable by anyone with the URL. Confirmed by reading `skills/thirdshift-pr/SKILL.md` and `skills/thirdshift-implement/SKILL.md`.
    - **Why GitHub PR bodies cannot embed external `<video>` inline.** GitHub's Markdown filter strips raw `<video>` elements and renders inline players only for `https://github.com/user-attachments/assets/<uuid>` URLs, which require web-session cookie uploads (no `gh`, REST or GraphQL upload endpoint; inbound private-repo `user-attachments` URLs also 404 to unauthenticated `curl`, documented in #1092's trace audit). External `.mp4`/`.webm` URLs render in PR bodies as clickable links. Confirmed from #1092's host-trace investigation.
    - **Playwright availability in this repo.** Both `site/package.json` and `console/package.json` already depend on `playwright` `1.64.0`, which supports headless Chromium video capture (`browser.newContext({ recordVideo: { dir } })`, writing `.webm`) with no X server, and `ffmpeg` is already used by `.agents/skills/explainer-video/`. Confirmed by reading `site/package.json`, `console/package.json` and `.agents/skills/explainer-video/SKILL.md`.
    - **Console auth and NATted Fleet machines.** Each machine's **Console** serves behind argon2id/email-code sign-in (`allowed_emails`) and `/api/v1` scoped bearer tokens ([ADR 0016](../adr/0016-the-console-is-a-long-running-reader.md), [ADR 0026](../adr/0026-each-console-serves-an-api-that-can-do-what-the-cli-can.md)). NATted or sleeping machines such as `lima-thirdshift` have no inbound HTTPS address, which #2036 solved for Metrics via outbound `report`-scoped push (`src/console/report.rs`). Confirmed by reading `console/README.md`, `ADR 0026` and `2036-console-metrics.md`.
    - **Seven Harnesses in headless sessions.** `claude`, `codex`, `agy`, `grok`, `muse`, `opencode` and `kimi` all run unattended with shell access in the **Worktree** ([ADR 0013](../adr/0013-every-harness-runs-unattended-and-fully-trusted.md)), while `thirdshift` passes no shared MCP configuration across all seven (`src/harness/*.rs`). Shell/CLI-driven browser tools work identically across every Harness; MCP-only tools would require per-Harness wiring and testing across seven CLIs. Confirmed by reading `src/harness/*.rs` and `ADR 0013`.
    
    ## Waiting on research
    
    - Nothing.
  5. changed the title [-]make way for thirdshift to use computer use so it can take a recording of its using a UI change and attach that to the PR body to improve verification and trust and decrease human review time[/-] [+]Spec: interactive UI verification and GitHub-attached Visual evidence in pull requests[/+] on Nov 18, 2026
  6. added a commit that references this issue on Nov 18, 2026
  7. added
    ready-for-agent
    and removed
    ready-for-human
    ready-for-agent
    on Nov 18, 2026
  8. 2 remaining items

  9. added
    agent-failed
    on Nov 19, 2026
  10. JacobStephens2 commented on Nov 19, 2026

    @JacobStephens2
    OwnerAuthor

    This comment was generated by AI.

    thirdshift's Run on this issue failed, so it waits for the Day shift.

    Put ready-for-agent back to retry.

  11. added
    in-progress
    agent-failed
    and removed
    agent-failed
    in-progress
    on Nov 19, 2026
  12. JacobStephens2 commented on Nov 19, 2026

    @JacobStephens2
    OwnerAuthor

    This comment was generated by AI.

    thirdshift's Run on this issue failed, so it waits for the Day shift.

    Put ready-for-agent back to retry.

  13. added
    ready-for-agent
    in-progress
    and removed
    agent-failed
    ready-for-agent
    on Nov 19, 2026
  14. removed
    in-progress
    on Nov 19, 2026
  15. added a commit that references this issue on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions