Skip to content

chore(engineering-analytics): add rafapherding skill for driving PRs to green - #74105

Closed
rafaeelaudibert wants to merge 3 commits into
masterfrom
rafa/rafapherding-skill
Closed

chore(engineering-analytics): add rafapherding skill for driving PRs to green#74105
rafaeelaudibert wants to merge 3 commits into
masterfrom
rafa/rafapherding-skill

Conversation

@rafaeelaudibert

Copy link
Copy Markdown
Member

Problem

Getting a batch of open PRs to green is a repetitive job with a specific shape, and the parts that
go wrong are always the same parts. Review bots post a mix of real findings, true-but-out-of-scope
findings, and confident nonsense, and all three need a reasoned reply rather than a silent commit.
Red CI is mostly not your fault: runner-starvation timeouts and aggregation gates look identical to
real failures in gh pr checks. And a stacked PR fixed in the middle gets clobbered by the next
restack.

None of that was written down, so each pass rediscovers it.

Changes

Adds a rafapherding skill under products/engineering_analytics/skills/, next to the other CI
skills.

The entry point covers the workflow: group the PR list into stacks, work each stack bottom-up
(gt restack, gt up, one gt ss at the end), triage CI before reading a single comment, then
judge each bot finding on mechanism, reachability, and scope before acting on it.

Two references carry the detail that would bloat the entry point:

  • reading-ci.md — the failure taxonomy. A job with steps: 0 and a duration exactly equal to its
    timeout-minutes never got a runner. A <Something> Tests Pass job failing in seconds is
    reporting a dependency. Also how to pull a real semgrep finding out of the log, and why a stamphog
    REFUSED is not a CI failure.
  • replying-to-bots.md — what a reply should contain, with worked examples for accurate,
    out-of-scope, and wrong, plus the shape to use when a finding turns on a fact the repo cannot
    answer.

Two things in there are load-bearing and worth calling out, because both cost me real time this
session:

Note

Every fix gets a test you watched fail. Revert the fix, run the test, confirm it fails, restore.
A security regression test that 401s before it reaches the code under test passes for the wrong
reason and proves nothing.

Warning

Changing how production code reaches the network moves the seam every test was patching. Tests
stop intercepting and start making real calls, which surfaces as a wall of DNS failures for
hostnames like partner.example.com. Retarget the patch; don't revert the fix.

How did you test this code?

hogli lint:skills passes (125 skills, the 2 advisory warnings are pre-existing in
turning-engineering-analytics-into-insights and unrelated). hogli build:skills picks up
rafapherding from products/engineering_analytics/skills/rafapherding.

No automated tests added. This is documentation with no runtime behavior, so there is nothing to
assert that would not just be re-reading the file. I did not test the skill by having a fresh agent
session follow it end to end.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

None needed, the skill is the doc.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Claude Opus 5 wrote this in Claude Code while shepherding #73935, #74089 and #74095 in the same
session. The content is the workflow actually used on those three, not a guess at one, which is why
the references are specific about things like zero-step job timeouts and moved test seams.

Invoked /writing-skills for the layout and naming rules, and /writing-code-comments and
/writing-tests earlier in the session while doing the PR work the skill describes.

Two decisions worth flagging for review. First, placement: this is a dev-workflow skill rather than
a product-feature one, and products/engineering_analytics/skills/ already owns
investigating-ci-failures and diagnosing-ci-and-merge-bottlenecks, so it went there. Second, the
name is a portmanteau I was asked for, which makes it opaque on its own, so the description carries
all the trigger terms and an explicit "not for" pointing at
diagnosing-ci-and-merge-bottlenecks. Worth a second opinion on whether an opaque name is a fair
trade against the shared skill-count budget, since every extra skill makes the others less likely to
fire.

…to green

Captures the unattended PR-custody workflow: read the review bots, judge each finding accurate or
not, reply to every one, fix what is real with a test that fails without the fix, and drive CI to
green. Graphite stacks are worked bottom-up throughout, with a single submit at the end.

Lives in engineering_analytics alongside the other CI skills. Two references carry the detail that
does not belong in the entry point: the failure taxonomy that separates a real red check from a
runner-starvation timeout or an aggregation gate, and what a reply to a bot should contain, with
worked examples for accurate, out-of-scope, and wrong.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rafaeelaudibert rafaeelaudibert added the skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs label Jul 28, 2026
@rafaeelaudibert rafaeelaudibert self-assigned this Jul 28, 2026
rafaeelaudibert and others added 2 commits July 28, 2026 04:46
…rding skill

Both hit live while shepherding the stack the skill was written from, and neither was in it.

A push cancels the run in flight for that branch, and the aggregation gates then report their
CANCELLED dependencies as FAILURE. A wall of "Tests Pass" failures right after pushing means
superseded, not broken, and a CI monitor that does not filter gates will wake you on every push.
Adds the state-breakdown check that distinguishes them and the jq filter for real failures only.

A stale test patch does not reliably fail. When the URL under test resolves for real, the test makes
a live request and passes on whatever production returns, so the local suite going green proves
nothing about whether every seam was found. Says to grep the repo for the old seam immediately after
moving one, before running anything.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Unlike the hot-table and atomic=False policies, a BLOCKED verdict from the migration risk analyzer
has no acknowledgement file: it has to be split. The two rules that catch people are that RunPython
may not share a file with schema changes and RunSQL may not share a file with anything, since both
hold their locks for the whole file.

Records the one-shape-per-migration layout, the ordering constraints a split has to preserve, and the
three commands that verify the result. Also notes that this surfaces late, because the job reporting
it is one of the ones most often lost to runner starvation, so a migration can sit blocked across
several pushes unseen. That is how it went here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@trunk-io

trunk-io Bot commented Jul 28, 2026

Copy link
Copy Markdown

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

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

Labels

skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant