Skip to content

Fix/782 orphan pin ancestry - #834

Merged
hyperpolymath merged 3 commits into
mainfrom
fix/782-orphan-pin-ancestry
Sep 17, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
fix/782-orphan-pin-ancestry

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Closes #

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (would change existing behaviour)
  • 🕳️ Soundness fix (fixes a checker/proof false-negative)
  • 📖 Documentation
  • 🧹 Refactor / tech debt (behaviour-preserving)
  • ⚡ Performance
  • 🔧 Build / CI / tooling

How has this been verified?

Checklist

  • My commits are signed (git commit -S).
  • I ran the project's own checks/tests locally and they pass.
  • New files carry the correct SPDX-License-Identifier (code/config MPL-2.0,
    prose CC-BY-SA-4.0); I did not relicense existing files.
  • Docs are updated, and no public claim now overstates what the code does.
  • I have not introduced a soundness hole (or I have flagged where I might have).

Notes for reviewers

…#782)

reachable != consumable. A reusable-workflow pin can name a REAL commit
object that GitHub still refuses to run: the resolver needs the commit to
be reachable from the repo's DEFAULT BRANCH. Estate census 2026-09 (435
repos x 4 reusable workflows): four such SHAs — 7fdc270 (squash-merge
orphan, PR head discarded at squash), 892497f (deleted unmerged branch),
4696052 (alive on a remote branch, not an ancestor of main), 5b1d002
(not an object) — account for 61 dead workflow-run rows with ZERO alive
rows, and this gate's existence predicate passed the first three.

Changes:

- Reusable-workflow pins (.github/workflows/*.yml@sha) now get a second,
  server-side probe after the commits-200: compare/<default>...<sha>.
  behind|identical => ancestor => consumable; ahead|diverged => NOT an
  ancestor => determinate negative, new failure class NOT-ANCESTOR with a
  remedy block ('repin to the merge commit, never a PR head'). An
  indeterminate probe (default-branch fetch, compare 4xx/5xx) is
  UNVERIFIED-loud, exactly like every other indeterminate answer.
- Ordinary action pins are deliberately NOT probed: actions are fetched
  by object id at run time and non-default-branch commits are a working
  pattern there. A suite case asserts the compare endpoint is never even
  hit for an action-only fixture.
- api() now also captures the response body (needed for default_branch
  and compare status). The newline test that isolates the code from the
  body is a BUILTIN — a printf | grep -q pipeline lets grep exit on the
  first match and kills printf with SIGPIPE under pipefail for any body
  over the 64 KB pipe buffer, smuggling the entire blob into $HTTP
  (caught live against the 146 KB codeql-action compare body; the
  gate silently soft-passed a real reusable pin).
- Regression suite, stub-driven and offline: the four witness SHAs with
  their measured compare verdicts, probe semantics (behind/identical
  pass; diverged/ahead fail; compare-403 and default-branch-404 are
  loud-indeterminate, never verdicts), action-pin overreach guard, and
  three >64 KB SIGPIPE differential cases. 30 cases, all green; the
  piped-vs-builtin differential confirms the SIGPIPE tests bite.

Out of scope per the issue's own disposition: the 61-row repin is
owner-ordered; the pin-writer (apply-workflow-pins-remote.sh) already
enforces the mirror-image rule (compare/<sha>...main must be
identical|ahead) so the generator half needs no change.

Refs #782
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 5e6aaaa3-6ba5-44fb-a129-d8fa9d06e377

📥 Commits

Reviewing files that changed from the base of the PR and between 7298334 and b35cd5e.

📒 Files selected for processing (2)
  • scripts/check-action-pins-resolve.sh
  • scripts/tests/check-action-pins-resolve-test.sh

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath merged commit 418d576 into main Sep 17, 2026
12 of 19 checks passed
@hyperpolymath
hyperpolymath deleted the fix/782-orphan-pin-ancestry branch September 17, 2026 20:37
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant