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
10 changes: 10 additions & 0 deletions .claude/skills/running-tend/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ for the rows. Ignore it. A comment can record recovery, but the drain owns the
close. This applies by title, not by the `tend-outage` label: `ci-fix` diagnosis
trackers have no rows and are closed by `ci-fix` itself.

## The browser the suite needs is already here

`.config/tend.yaml`'s `sandbox_setup:` installs the Playwright headless shell
into this sandbox's own cache before the session starts, so `uv run pytest tests
--run-nightly` drives a real browser from here. Don't install it again, and
don't read a browser test as unrunnable — if a launch does fail, that is a fact
about the run worth reporting, not a step to work around. `playwright install
--with-deps` is the one that cannot work: it escalates, and the sandbox user has
no sudo.

## A red `ci` on main is the first signal, not the second

Nothing lands here through a pull request, so no CI run ever gates a change
Expand Down
16 changes: 16 additions & 0 deletions .config/tend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ setup:
- uses: astral-sh/setup-uv@v7
- run: uv sync --frozen

# `setup:` runs as the runner, and Playwright downloads browsers under the
# home of whoever runs it — a home the sandbox does not inherit. So the agent
# meets `BrowserType.launch: Executable doesn't exist` partway through the
# suite, which is most of it: nearly every test here drives a real browser
# (`tests/CLAUDE.md`). Seeding it under the sandbox's own home is what makes
# the repo's gate runnable from a session rather than only in `ci`.
#
# Same browser `ci.yaml` installs, and no `--with-deps`: the sandbox user has
# no sudo, so that flag fails on `sudo: a password is required` — the runner
# image already carries the system libraries. The launch afterwards is the
# assertion the install worked, so a broken one stops the job instead of
# reaching the agent as a suite that cannot start.
sandbox_setup:
- uv run playwright install chromium --only-shell
- 'uv run python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); p.chromium.launch().close(); p.stop()"'

workflows:
ci-fix:
watched_workflows:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tend-ci-fix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
bot_name: leaf-agent
model: opus
sandbox_setup: |
uv run playwright install chromium --only-shell
uv run python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); p.chromium.launch().close(); p.stop()"
prompt: |
/tend-ci-runner:ci-fix ${{ github.event.workflow_run.id }}
- Run URL: ${{ github.event.workflow_run.html_url }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tend-mention.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ jobs:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
bot_name: leaf-agent
model: opus
sandbox_setup: |
uv run playwright install chromium --only-shell
uv run python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); p.chromium.launch().close(); p.stop()"
prompt: >-
${{ steps.delay.outputs.seconds
&& format('This job started {0}s after the triggering event (over ~40s means it was queued). ',
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tend-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ jobs:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
bot_name: leaf-agent
model: opus
sandbox_setup: |
uv run playwright install chromium --only-shell
uv run python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); p.chromium.launch().close(); p.stop()"
prompt: |
/tend-ci-runner:nightly
3 changes: 3 additions & 0 deletions .github/workflows/tend-notifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,8 @@ jobs:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
bot_name: leaf-agent
model: opus
sandbox_setup: |
uv run playwright install chromium --only-shell
uv run python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); p.chromium.launch().close(); p.stop()"
prompt: |
/tend-ci-runner:notifications
3 changes: 3 additions & 0 deletions .github/workflows/tend-review-runs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ jobs:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
bot_name: leaf-agent
model: opus
sandbox_setup: |
uv run playwright install chromium --only-shell
uv run python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); p.chromium.launch().close(); p.stop()"
prompt: |
/tend-ci-runner:review-runs
3 changes: 3 additions & 0 deletions .github/workflows/tend-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ jobs:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
bot_name: leaf-agent
model: opus
sandbox_setup: |
uv run playwright install chromium --only-shell
uv run python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); p.chromium.launch().close(); p.stop()"
prompt: >-
${{ format('/tend-ci-runner:review {0}', github.event.pull_request.number) }}

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tend-triage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
bot_name: leaf-agent
model: opus
sandbox_setup: |
uv run playwright install chromium --only-shell
uv run python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); p.chromium.launch().close(); p.stop()"
prompt: |
/tend-ci-runner:triage ${{ github.event.issue.number }}

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tend-weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ jobs:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
bot_name: leaf-agent
model: opus
sandbox_setup: |
uv run playwright install chromium --only-shell
uv run python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); p.chromium.launch().close(); p.stop()"
prompt: |
/tend-ci-runner:weekly
Loading