Skip to content

ci: run docs agent eval post-merge on main only - #1135

Open
leggetter wants to merge 2 commits into
mainfrom
ci/agent-eval-main-only
Open

leggetter wants to merge 2 commits into
mainfrom
ci/agent-eval-main-only

Conversation

@leggetter

@leggetter leggetter commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The docs agent eval (docs-agent-eval-ci.yml) ran on every PR commit that touched docs, OpenAPI or the TS SDK, then ran again on the merge to main. Each run bills Anthropic for the agent and the LLM judge.

Cost per run ~$3.20 (agent mean $2.98 from total_cost_usd across 11 recent runs, plus ~$0.25 for the judge)
Last 90 days 156 runs, $500 ($165/month)
October so far 39 runs in 7 days, a ~$540/month pace
Re-runs on merge 26% of runs re-evaluated content the PR had already evaluated

Costs are the SDK's list-price figures, not taken from billing.

What changes

  • No PR runs: removes the pull_request trigger, and with it the fork-PR guard, which can no longer fire.
  • main triggers: runs on pushes to main that change docs/content/**, docs/apis/**, docs/README.md, docs/AGENTS.md, sdks/outpost-typescript/** or the workflow file. Based on the last 90 days that's ~14 runs/month, ~$44.
  • Harness changes: docs/agent-evaluation/** no longer triggers a run. Check harness changes on their branch before merge with gh workflow run docs-agent-eval-ci.yml --ref <branch>.
  • No cron: scheduled drift monitoring belongs in hookdeck/evals.
  • Failure alert: a new eval-alert job runs only when the eval fails on a push to main. It opens an agent-eval-failure issue assigned to @leggetter for triage, or comments on the one already open, so a failure that persists stays as one issue. It doesn't fire on cancellations, because the concurrency group cancels pending runs whenever a newer merge queues behind them. The commit message is passed in through env so it can't inject shell commands. This follows the hookdeck/evals regression alert.
  • Docs: the header comment and the README CI section are updated to match.

Trade-off

This check now runs after merge. The website deploys on the same push, so a failure means the docs are already live and you fix forward.

Merging this PR triggers one run on main, because it changes the workflow file.

🤖 Generated with Claude Code

The eval ran on every PR commit touching docs or the TS SDK, then again on
merge. At roughly $3 per run that was ~$165/month over the last 90 days and
pacing ~$540/month in October.

- Drop the pull_request trigger (and the now-unneeded fork guard)
- Stop docs/agent-evaluation/** from triggering on main; dispatch manually instead
- Document manual dispatch for pre-merge checks; scheduled drift monitoring stays in hookdeck/evals

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 11:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The workflow and documentation changes are consistent and correctly implement the stated trigger policy.

Review effort: Balanced
Findings: None

What changed in this PR
Overview

Restricts automatic docs agent evaluations to relevant pushes on main, reducing duplicate paid runs while retaining manual branch evaluation.

Changes:

  • Removes pull-request and harness-change triggers.
  • Documents post-merge evaluation and manual dispatch.
File Description
.github/​workflows/​docs-agent-eval-ci.yml Limits automatic evaluation triggers.
docs/​agent-evaluation/​README.md Documents the revised CI behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Post-merge runs have no PR to go red on, so failures would go unnoticed.
On failure, open or comment on a single agent-eval-failure issue, assigned
to a reviewer for triage. Mirrors the hookdeck/evals regression alert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leggetter
leggetter requested a review from alexluong October 7, 2026 12:12

@alexluong alexluong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

# newer merge queues behind it, which is expected and not worth an alert.
eval-alert:
needs: [eval-ci]
if: ${{ failure() && github.event_name == 'push' }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: nothing closes the agent-eval-failure issue when main goes green again, so it stays open until someone closes it by hand, and the next failure gets added as a comment on the old issue. A small step that closes the open issue when eval-ci succeeds on a push would handle it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants