Repository navigation
fix(test-integrity): keep a verdict when an event cannot change it - #98
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…mmit A branch or tag pin keeps the same action_ref while its code changes, so a verdict recorded under it could outlive the detector that produced it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
caiopizzol
enabled auto-merge (squash)
September 28, 2026 14:07
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Read records from this workflow's own pull_request_target runs, not any check named Test integrity, which a workflow in the pull request could forge. Use the newest earlier run only: when it has no clear verdict, evaluate again rather than fall back to an older pass the label may no longer support. Bind records to the pull request number, and distrust a run list cut short by paging. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
caiopizzol
disabled auto-merge
September 28, 2026 14:40
… attempt Another job in the caller's workflow may run pull request code and print a record, so take records only from the one job whose check run name matches this job's. Order runs by when their latest attempt started, so a rerun of an older run counts as newest, and trust jobs and annotations only when every page was read. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A rerun replays the original labeled event even after the label is removed, so it would approve the change again and become the newest verdict to reuse. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
caiopizzol
enabled auto-merge (squash)
September 28, 2026 15:19
caiopizzol
added a commit
to caiopizzol/pagesight
that referenced
this pull request
Sep 28, 2026
…39) Re-pin the test-integrity action to caiopizzol/skills#98 and grant actions: read and checks: read, so an edit or another label reuses the verdict already on the commit instead of running without the label. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
caiopizzol
added a commit
to caiopizzol/moor
that referenced
this pull request
Sep 28, 2026
…212) Re-pin the test-integrity action to caiopizzol/skills#98 and grant actions: read and checks: read, so an edit or another label reuses the verdict already on the commit instead of running without the label. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
caiopizzol
added a commit
to caiopizzol/namecheap
that referenced
this pull request
Sep 28, 2026
…14) Re-pin the test-integrity action to caiopizzol/skills#98 and grant actions: read and checks: read, so an edit or another label reuses the verdict already on the commit instead of running without the label. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
caiopizzol
added a commit
to caiopizzol/linkkeeper
that referenced
this pull request
Sep 28, 2026
…21) Re-pin the test-integrity action to caiopizzol/skills#98 and grant actions: read and checks: read, so an edit or another label reuses the verdict already on the commit instead of running without the label. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
caiopizzol
added a commit
to caiopizzol/kicktires
that referenced
this pull request
Sep 28, 2026
…58) Re-pin the test-integrity action to caiopizzol/skills#98 and grant actions: read and checks: read, so an edit or another label reuses the verdict already on the commit instead of running without the label. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since #96, the
tests-changed-oklabel only accepts a change on the run that adds it. Any later event runs the check again without the label, so the approval is lost to events that cannot change the verdict:The required check then turns red on an approved pull request.
Change
test-integrity-resultwithpr=… base=… head=… version=… verdict=pass|fail.versionis the action's commit (github.action_ref).editedevent that keeps the base, or alabeled/unlabeledevent for another label, the action looks at the newest earlier run of this workflow (workflow_id), started bypull_request_target, on the head commit. Newest means its latest attempt started last. It reuses that run's verdict only when all of these hold:job.check_run_id);actions: readandchecks: read;The decision is a pure module (
prior.ts) with its own tests; the action only gathers the inputs.Why the trust boundary holds
pull_request_targetruns the base branch's copy of the workflow, so a pull request cannot add jobs to it.workflow_id, and this file run bypull_requesthas anotherevent.Verification
bun run checkpasses. Package: 84 tests.On the final commit, the calling workflow has a second job that prints a forged passing record for the exact pull request, base, head, and version on every run:
tests-changed-oktests-changed-okremovedlabeledevent)On an earlier commit, a pull request added a
pull_requestworkflow whoseTest integrityjob forged a passing record. An unrelated label still reused the real failure. Also on that commit,tests-changed-okwas removed and its run cancelled; a later unrelated unlabel evaluated fresh and failed, instead of reusing the old pass.Callers need
actions: readandchecks: readin the workflow'spermissionsto keep verdicts. Without them, behavior is the same as today.🤖 Generated with Claude Code