Skip to content

fm-pr-merge refuses a protected branch with required_status_checks: null as unreadable #7343

Open

Description

@mehulbhagwani

Summary

bin/fm-pr-merge.sh's classic required-checks reader treats any non-object required_status_checks value as unreadable, including an explicit null.

A branch protected only by review (or other non-check) rules can report protected: true with protection.required_status_checks: null. That is readable emptiness for classic required checks - there are none - not an unreadable producer that must refuse the merge.

Expected

  • protected: true with a readable protection object whose required_status_checks is explicitly null -> no classic required checks; the merge is not refused for that source.
  • protected: true with no protection object, a protection object missing the required_status_checks key, or a non-null non-object value -> still unreadable; refuse.

Actual

Any non-object shape, including explicit null, is refused as an unreadable branch protection summary.

Notes

Split out of #4932 so the null-checks fix can land separately from the Treehouse pool-roots work.

Activity

  1. kunchenguid commented on Oct 15, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate: thank you @mehulbhagwani for splitting this out of #4932. A narrow issue is much easier to land.

    Checked on main 9b1ada04. github_read_required_contexts in bin/fm-pr-merge.sh (around line 898) refuses any non-object .protection.required_status_checks, so an explicit null is treated as an unreadable summary, as you describe. A missing protection object and a missing key take that same refusal path.

    Existing PR: #7347 (fix(bin): treat null classic required checks as empty, Fixes #7343) is exactly the split you describe. It treats an explicit null inside a readable protection object as no classic required checks. It still refuses a missing protection, a missing required_status_checks key, and a non-null non-object value, and it adds tests for all of those. That PR is triaged on its own thread.

    One thing that would help #7347: I sampled live github.com payloads for review-only protected default branches (facebook/react, golang/go). Both return an object ({"checks":[],"contexts":[],"enforcement_level":"off"}), not null. Could you share the forge, host, and version (for example GHES x.y) or the API call where you saw required_status_checks: null? This change loosens a merge refusal, so a real payload is the evidence that turns it from plausible into proven. It would also cover #7347's open live-validation scenario.

    contract-class

    restore, if the null shape is real. The refusal path exists for summaries that can't be read. A readable protection object that explicitly says "no classic checks" falls outside that promise, and rulesets are still read separately.

    VISION.md per-rule

    • One captain, one interface: aligns. A false "unreadable" refusal is noise the captain has to unpick.
    • Authority is explicit: aligns. This only matters on paths where merge authority was already granted, and every other unreadable shape still refuses.
    • Scripts own the mechanics: aligns. This is an exact jq shape decision.
    • A restart is a non-event: neutral.
    • Delegation with a spine: aligns as long as the missing-structure and non-object refusals stay, which fix(bin): treat null classic required checks as empty #7347 keeps.
    • The fleet outlives any vendor: aligns if the null shape is a documented or observed forge semantic. That's the evidence asked for above.
    • Scope: aligns. The merge gate reads forge policy and doesn't own it.

    Outcome: existing-pr → #7347. This stays open until that PR lands.

  2. added 2 commits that reference this issue on Nov 13, 2026
    1368b1e
    36aefc9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions