Skip to content

audit.py still compares bypass_actors after #545 stopped declaring it, so every repo with a bypass is permanently not operational #554

Description

@ptr727

spec/audit.py compares bypass_actors against a payload that deliberately no longer declares it, so every repository carrying a bypass reports a DEFECT that the sanctioned tool will not fix and that no payload change can clear. Since a DEFECT makes a repository not operational, a maintainer who deliberately keeps an admin bypass can never have an operational repository.

Audited against hub main7194f91. Found on Blog while verifying its convergence after ptr727/Blog#11.

The three parts disagree

The payload no longer declares the field.#545 removed it, on the reasoning that who may bypass a ruleset is a per-repository human decision rather than a value the fleet config hands out:

$ git show origin/main:repo-config/develop.json | jq -c '.bypass_actors // "field absent"'"field absent"

configure.sh was rewritten to match, and says so. Apply reads the live list and writes it back unchanged, and check reports without asserting:

note "ruleset '$rname' bypass list: ${bypass:-none} (not managed by this script)"

spec/audit.py still compares it, so an absent field is read as None and diffed against whatever is live:

RULESET_SUBSET= ["name", "target", "enforcement", "bypass_actors", "conditions", "rules"]
...
sub= {k: payload.get(k) forkinRULESET_SUBSET}

What that produces

$ python3 spec/audit.py --branch develop Blog DEFECT ruleset: develop diverges from repo-config/develop.json (normalized diff) DEFECT ruleset: main diverges from repo-config/main.json (normalized diff)

Blog's live rulesets carry [{actor_id: 5, actor_type: RepositoryRole, bypass_mode: always}] on both branches, which is exactly what the old payload granted every repository before #545 removed it. The payload now declares nothing, so the diff is guaranteed and permanent.

The escape routes are all closed by design. Re-vendoring the payloads does not help, because the field is meant to be absent. Running configure.sh apply does not help, because it now preserves the live list on purpose. The only remaining move is deleting the bypass by hand in the UI, and #545's own argument is that this is the maintainer's decision, which the audit then overrules by calling any answer except "empty" a DEFECT.

Scope

Every fleet repository, not only Blog. #545 records that "every fleet repo sampled carries exactly that entry on both branches", which is the population this now fires on.

The severity is what makes it urgent rather than cosmetic. This is DEFECT, not DRIFT, so it flips operational to not operational fleet-wide on a field the fleet just decided it does not manage.

Which rule gives

A governance call, so not proposing a resolution, but the shapes seem to be:

  • Drop bypass_actors from RULESET_SUBSET, matching what configure.sh already does, and report the live list the way configure.sh does rather than judging it. This makes all three parts agree, and keeps the field visible.
  • Keep comparing, but only when the payload declares the field. This preserves the ability to pin a bypass list for a repository that wants one, while an absent field means unmanaged rather than "must be empty".
  • Declare an empty bypass_actors: [] in the payloads, which would make the audit correct as written, but it reverses Take the ruleset bypass list out of the fleet config entirely #545: an empty list is a managed value, and applying it would revoke the grant the fleet just decided not to touch.

The second looks closest to both intents, since it distinguishes "the fleet pins this" from "the fleet does not manage this", but that is a preference and the call is yours.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions