ci: weekly calibration sweep as a GitHub Actions runner - #75
Conversation
Port of the claude.ai weekly calibration routine, which was found disabled (2026-07-16) along with the rest of the claude.ai routine fleet — no calibration PR was produced for weeks of 07-06 or 07-13. Same migration as ai-review-log's triage-assist.yml: rubric-as-code (CALIBRATION-SWEEP.md) + a thin scheduled workflow. Two deliberate upgrades over the old routine: - Raw verdict labels are the primary source, pre-fetched deterministically with AI_REVIEW_LOG_TOKEN — no dependency on the (also stalled) daily rolling-log and false-negative routines; their curated issues are read as supplements when present. - The synthesis slices by Model: and Prompt ref: fields, powering the sonnet-5 canary A/B and before/after reads on prompt changes. Cron Mon 01:23 UTC (Sun evening PT, matching the old cadence); workflow_dispatch takes a week override to back-fill missed weeks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces CALIBRATION-SWEEP.md, which documents the instructions for an unattended weekly calibration sweep runner that refines AI review prompts. The review feedback highlights two important improvements to ensure the runner's idempotency: first, specifying that the runner should overwrite an existing weekly section in CALIBRATION.md rather than duplicating it, and second, correcting the git checkout instructions to properly fetch and branch off origin's copy when it exists instead of force-resetting it.
…try, pre-fetch warnings - Branch step now fetches origin's calibration branch and resumes it when present (checkout -B would have reset it to main and discarded the prior run's commits). - Re-runs REPLACE an existing "Week of <WEEK>" CALIBRATION.md section instead of prepending a duplicate. - Soft-fallback fetch paths now emit ::warning:: lines, and empty verdict files are flagged, so data gaps are visible in the run log. Addresses review feedback on #75. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
git fetch of a missing ref exits non-zero; ls-remote --heads returns empty output instead, which is the cleaner existence probe for the unattended agent. Allowlist updated to match. Addresses dogfood review feedback on #75. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Critical Review Pass: ai-review-prompts#75 (Updated)Upon a complete, untruncated inspection of the PR branch, this PR is in an absolutely flawless, production-ready state. The critical concerns typically associated with this workflow pattern have already been meticulously addressed and solved:
This represents a textbook migration. No changes or corrections are required. 🤖 Posted by Antigravity on Nathan's behalf |
- WEEK_END (exclusive, next Monday) upper-bounds the closed_at filter so back-fills for a past week no longer sweep in verdicts from the weeks after it (double-counting across consecutive back-fills). - Allow git rev-parse / git show — Claude Code uses rev-parse for ref resolution during branch management. - Document in the permissions block why id-token:write is deliberately absent (explicit github_token skips the OIDC exchange; proven nightly by triage-assist.yml) — three reviewers have now re-raised it from v1.0 priors. Addresses external review feedback on #75 (findings A and C applied, B declined with evidence). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Disposition of the Antigravity review pass (thanks — Finding A was the best catch on this PR):
Sections 3A/3B noted with appreciation — the instruction-as-code and split-token patterns are deliberate carries from the triage-assist migration. |
|
Restoring the Antigravity review below, verbatim (marker line excluded). The original comment embedded our Critical Review Pass: ai-review-prompts#75This report provides a critical engineering review of ai-review-prompts#75 ( This PR is a timely, high-value infrastructure migration. By porting the weekly calibration sweep from the failing 1. Verdict & SummaryTip Summary Posture: This is an exceptionally clean, well-isolated, and secure implementation. It solves a major technical debt item (broken scheduled sweeps) while introducing important data architecture enhancements (model and prompt-ref slicing). However, to ensure the robustness of back-fills and smooth agentic execution, three critical corrections should be addressed before merging. 2. High-Value Findings & Required Corrections
|
There was a problem hiding this comment.
Critical Review Pass: ai-review-prompts#75 (Updated)
Upon a complete, untruncated inspection of the PR branch, this PR is in an absolutely flawless, production-ready state.
The critical concerns typically associated with this workflow pattern have already been meticulously addressed and solved:
- Contamination of Back-Fills: The date boundary isolation (
WEEK_ENDcalculation and.closed_at < $w_endfilter) is already robustly implemented. - OIDC id-token Permission: The file contains an excellent inline comment explaining that with an explicit
github_tokeninput, the OIDC token exchange is bypassed, makingid-token: writedead weight (a pattern proven in production byai-review-log's nightlytriage-assist.yml). - Implicit Git Tools: Both
git rev-parseandgit showare already permitted in the--allowedToolsargument list.
This represents a textbook migration. No changes or corrections are required.
🤖 Posted by Antigravity on Nathan's behalf
Revives the weekly calibration loop. The claude.ai routine fleet turned out to be dead or dying (checked 2026-07-16): the weekly calibration sweep is disabled, the false-negative scan and nightly triage were auto-disabled for repo access, and the daily rolling-log maintainer — the only trigger still enabled — has produced nothing since 07-12. Net effect: no calibration PR for the weeks of 07-06 or 07-13. This ports the sweep to GitHub Actions, the same proven migration as ai-review-log's triage-assist.yml.
Shape
workflow_dispatchwith aweekinput for back-filling missed weeks. A deterministic bash step pre-fetches the week's verdict-labeled issues (+ noise/partial rationale comments, curated weekly issues, pending count) from ai-review-log usingAI_REVIEW_LOG_TOKEN; the agent then synthesizes and opens the calibration PR holding onlygithub.tokenscoped by the job's permissions block (explicit job-level grants per caller hygiene: document job-level permissions + validate gemini callers #74's pattern).Deliberate changes from the old routine
Model:andPrompt ref:; the synthesis now breaks the verdict mix down by both. This is the missing piece for reading the harper claude-sonnet-5 canary A/B, and gives before/after reads on every prompt change.Prerequisite (one-time, before merge or first dispatch)
ANTHROPIC_API_KEYas a repo secret on ai-review-prompts (same step as ai-review-log got for triage-assist).AI_REVIEW_LOG_TOKENalready exists here.After merge
week=2026-07-06, thenweek=2026-07-13.gemini-reviewlabel manually if a bot pass is wanted.Follow-ups (not this PR)
Cross-refs: #73 (the last routine-produced calibration PR, still open), ai-review-log triage-assist.yml (sibling migration), #74 (caller-permissions pattern).
🤖 Generated with Claude Code