docs(claude): record the review-dispatch handshake and two measurement traps - #1974
docs(claude): record the review-dispatch handshake and two measurement traps#1974seonghobae wants to merge 3 commits into
Conversation
…t traps Three gotchas found while diagnosing #1923's failing checks, none of which were discoverable from the repository without re-deriving them: A red `CodeQL compatibility analysis (…)` or `opencode-review` check is half a handshake rather than a finding. Those jobs dispatch their work and fail deliberately in ~8 seconds to release the runner, expecting to be rerun after the dispatch publishes a verdict; the annotations state this verbatim. Since both dispatches are currently rejected by the identity allowlist in #1929, the state is expected on every pull request and is not fixable from the pull request. `repository_dispatch` runs pin `head_sha` to the default branch, so per-pull-request fan-out cannot be computed from it -- "N runs, one distinct head_sha" means `main` stood still. Same class as `pull.head.repo.pushed_at` describing the repository rather than the branch. A failing step's name is a roll-up: `codeql-scan-dispatch` reported the same step 3 across a template parse error (pre-#1926) and an authorization rejection (post-#1926), so splitting failures by step name merges causes and hides a landed fix. Split by annotation message. Also notes that `opencode-review` names jobs in two different workflows. No CHANGELOG entry: this is documentation only, and every entry lands at line 1 where it conflicts with every other open pull request carrying one (measured in #1961 -- eight collisions in nineteen hours on one branch). Gates: 2961 passed / 1 skipped / 21 subtests. No test reads CLAUDE.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 21 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
My own pull request refuted the entry as first written. It claimed the CodeQL compatibility jobs always dispatch and then fail deliberately; on this CLAUDE.md-only branch both language jobs went green in 2 s and 22 s. Reading the steps shows why: `Request current-head CodeQL scan dispatch` and `Release runner or enforce current-head CodeQL verdict` both skip when nothing analyzable changed, and the job reports success. On #1923, which carries a .py change, step 2 succeeds and step 3 fails -- the handshake this entry describes. So the useful rule is sharper than the original: a red check means the scope gate opened and the handshake began; a fast green one means it never started. Recorded that distinction rather than the unconditional claim, which would have taught a future session to expect red where green is correct. Gates: 2961 passed / 1 skipped / 21 subtests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
My own prediction in this pull request's description was wrong, and correcting it improved the entry. I wrote that this branch's checks would fail with the handshake described in item 1 — "unavoidably, its own illustration." They did not: The step list explains it. On this branch, which touches only On #1923, which carries a The handshake is scope-gated. My entry stated it unconditionally, which would have taught a future session to expect a red check where green is correct — the opposite of the confusion the entry exists to prevent. Amended in Worth noting how this surfaced: the entry was falsifiable, I stated the prediction publicly, and the pull request's own CI refuted it within the hour. Had I written the claim without the prediction, it would have merged as written. |
The previous revision fixed the CodeQL claim but left the qualifier attached to a sentence covering both checks, which reads as though `opencode-review` were scope-gated too. It is not. Read from source rather than waiting for CI: `opencode-review-target` is gated only on `needs.admit-current-head.outputs.admitted == 'true'`, and its `Fail closed without a current-head OpenCode verdict` step carries no `if:` at all -- so it fails on every admitted head, documentation-only included. `codeql-pr.yml` skips both inner steps when nothing analyzable changed and reports success. The entry now states the expectation directly: on a docs pull request, CodeQL green and `opencode-review` red. That is a falsifiable prediction about this branch, which is the point. Gates: 2961 passed / 1 skipped / 21 subtests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Prediction confirmed on this branch's own CI. The entry stated, before these ran, that a documentation-only pull request should show CodeQL green and Both halves hold, and the durations independently confirm the mechanism the entry describes:
How this entry reached correctnessWorth recording, because the process mattered more than the content: Two of the three revisions came from the claim being falsifiable and publicly predicted. Had the behaviour simply been described without a prediction attached, v1 would have merged and been wrong in the repository permanently — teaching every future session to expect red where green is correct. The second refutation is worth noting separately: it came from reading the workflow source, not from waiting for CI. When the feedback loop is a saturated queue measured in hours, the workflow file answers the same question in seconds. Gates on the current head: 2961 passed / 1 skipped / 21 subtests. |
Three gotchas found while diagnosing #1923's failing checks. Each cost real time to derive and none is recoverable from the repository without re-deriving it.
1. A red CodeQL or
opencode-reviewcheck is half a handshake, not a findingCodeQL compatibility analysis (…)andopencode-reviewhand their work to a dispatch workflow, then fail on purpose — in about 8 seconds — to release the runner rather than hold it idle, expecting a rerun once the dispatch publishes a verdict. The annotations say so:So a red check here means the second half did not happen. Both dispatches are currently rejected by the identity allowlist in #1929, which makes this state expected on every pull request and not fixable from one. The tell is duration: a completion measured in seconds is a handshake; a scan that really ran takes minutes.
2.
repository_dispatchruns pinhead_shato the default branchEvery dispatch created while
mainsits at one commit carries that commit, so "N runs, one distincthead_sha" looks like runaway amplification when it only meansmainstood still. I nearly published an amplification figure from exactly that.Same class as
pull.head.repo.pushed_atbeing the repository's last push rather than the branch's — a nested field describing the container, not the subject. Cheap tell for the whole class: if distinct objects share an identical second-resolution value, the field belongs to something above them.3. A failing step's name is a roll-up, like a run conclusion
codeql-scan-dispatchhas reported the same3: Bind workflow inputs to live organization pull request metadataacross two unrelated causes:Splitting failures by step name merges those and hides a fix that already landed. Split by annotation message. The entry also records that
opencode-reviewnames jobs in two workflows (opencode-review.yml's required gate andopencode-review-dispatch.yml), so a census keyed on check-run name alone mixes populations.Notes
No CHANGELOG entry, deliberately. This is documentation only, and every entry is prepended at line 1, where it conflicts with every other open pull request carrying one. #1961 measures that cost: eight collisions in nineteen hours on a single branch, with resolution slower than the interval between invalidations.
Gates: 2961 passed / 1 skipped / 21 subtests. No test reads
CLAUDE.md, so there is no doc-contract exposure.The failing checks on this pull request will be the same handshake described in item 1 — which is, unavoidably, its own illustration.
🤖 Generated with Claude Code