Repository navigation
fix(github.blockers): read required checks and reviews without admin rights (F1–F3) - #874
Merged
Merged
Conversation
…rights (F1–F3) Co-authored-by: icfrelinger <icfrelinger@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 25, 2026
… 109/109, no wrong claims Co-authored-by: icfrelinger <icfrelinger@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 25, 2026
…OG entry under 1.1.0 Co-authored-by: icfrelinger <icfrelinger@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 25, 2026
…OG entry under 1.1.0 Co-authored-by: icfrelinger <icfrelinger@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 25, 2026
…OG entry under 1.1.0 Co-authored-by: icfrelinger <icfrelinger@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 25, 2026
… as data (#872) * github.blockers: quote text read from GitHub so it reaches the answer as data Check-run names (a fork's workflow names its own jobs), commit-status contexts, descriptions and target URLs (any integration with status access) went into the Markdown answer raw. A name with line breaks could start its own heading, add links or tracking images, or address the model that reads the answer; the PR-blockers Action writes that Markdown to the job summary. A status target_url of javascript:... became an [evidence] link. Each such string now enters through BlockerAnalysis.Quote (one inline code span: one line, no bidi/format characters, a backtick becomes ', at most 100 characters) and each such URL through Link (absolute http(s) only, parentheses and spaces encoded; otherwise the commit URL). Co-authored-by: icfrelinger <icfrelinger@gmail.com> * github.blockers: backtick check names in #874's expectations; CHANGELOG entry under 1.1.0 Co-authored-by: icfrelinger <icfrelinger@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This was referenced Oct 25, 2026
cursor Bot
pushed a commit
that referenced
this pull request
Oct 26, 2026
… 109/109, no wrong claims Co-authored-by: icfrelinger <icfrelinger@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 26, 2026
… brick vs native) (#871) * blockers-accuracy: targets (44 PRs, 5 repos) and snapshot capture Co-authored-by: icfrelinger <icfrelinger@gmail.com> * blockers-accuracy: rubric, runs, scores and published study (44 PRs, brick vs native) Co-authored-by: icfrelinger <icfrelinger@gmail.com> * blockers-accuracy: capture an extra brick build, brick-only runs, stable score output Co-authored-by: icfrelinger <icfrelinger@gmail.com> * blockers-accuracy: re-run after the github.blockers 1.1.0 fix (#874): 109/109, no wrong claims Co-authored-by: icfrelinger <icfrelinger@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.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.
Fixes the three brick findings from the accuracy study in #871 (
docs/benchmarks/blockers-accuracy.mdon that branch). Allowed through the 0.4.0 freeze by the coordinator. It merges after #866, and #872 rebases onto it afterwards.What was wrong
Without admin rights,
github.blockers1.0.0 could not read branch protection. On the study's 44 real pull requests:Fix (brick 1.1.0)
GitHubBlockerReadernow reads the same requirements from sources that need no admin rights:GET /repos/{o}/{r}/branches/{base}, fieldprotection.required_status_checks. Enforcementoffcounts as none.GET /repos/{o}/{r}/rules/branches/{base}, using therequired_status_checkscontexts and the highestpull_request.required_approving_review_count. These are now also read with admin rights, because classic protection never covered them.isRequired(pullRequestNumber:)per check on the head commit, plus the pull request'sreviewDecision. Without a token, or on any error, the read falls back.BlockerAnalysischanges:reviewDecisiondecides the review blocker. It also covers code-owner and last-push rules that no count shows.mergeable_statedecides, now applies only if both public lists fail to read.Tests
The new tests in
GitHubBlockersBrickTestsreplay facts trimmed from the study's snapshot, through Octokit and the real egress guard with a stub transport:F1_…(Compare converted reference-type identifiers by their provider values dotnet/efcore#39369):coveragefails but is not required, so it is a note. The ruleset's 1 approval blocks.F2_F3_…(docs(auth): make --with-token scope hint match enforced scopes cli/cli#14816): three requiredbuildchecks never ran, plus GraphQLREVIEW_REQUIRED. Four named blockers, no unknowns.F2_…(Match protocol property names case-sensitively modelcontextprotocol/csharp-sdk#1934): the review is named instead of "an unidentified branch rule".APPROVEDdecision settles approvals even when only rulesets gave a count.GitHubBlockersBrickTestspassed 38/38 on both net8.0 and net10.0 in CI.Mutation checks
Each check ran
scripts/mutation-check.shin the devtest container, in CI, at commit1201818e5, with filterGitHubBlockersBrickTests:f1-nonrequired-check-blocksif (advisory || (required is not null && !required.Contains(name)))→if (advisory)f2-review-decision-droppedpull?.ReviewDecision→nullf2-ruleset-approvals-droppedrequired_approving_review_count→0f3-public-summary-not-readsummaryChecks = adminChecks(public branch summary never read)A first F3 mutation (
if (summaryChecks is null && …)) did not compile because of a nullable error, so its verdict was INVALID; I replaced it with the F3 mutation in the table.Records touched
src/Ashlar.Bricks.GitHub/README.md(Known limits)docs/EgressInventory.md, row EG-HTTP-08: the GraphQL request body now carries owner, repository and number.CHANGELOG.md(Unreleased)scripts/ci/run-repo-gates.sh: all 41 gates pass locally.