Commit 0ffbdbb
fix(ci): the required SET is readable — retire the 403 premise and diff the live ruleset (#9679)
`check-required-contexts.mjs` reasoned from "no agent seat can read the
ruleset", citing a 403 from
`GET /repos/objectstack-ai/objectstack/branches/main/protection`. That is the
CLASSIC branch-protection endpoint — GitHub prices it at
`administration=read` (its own `X-Accepted-GitHub-Permissions` header), which
is not among the 17 permissions a workflow may grant a `GITHUB_TOKEN` — and it
is not where this repository's configuration lives. `main` is governed by a
repository RULESET, and the ruleset endpoints answer 200 from an ordinary
agent seat at `metadata=read`.
- Corrects the premise in all three sites the card names (the script header,
the failure prescription, the lint.yml step comment) and a fourth the sweep
found (`check-partof-closing-keyword.mjs`), naming BOTH endpoints and which
one this repo uses so the next reader cannot test the wrong URL and conclude
the comment is wrong.
- Adds `--verify-required-set`: reads every ruleset that applies to the repo
(including inherited org rulesets), and diffs the live required set against
REQUIRED_CONTEXTS in BOTH directions — a registry row that is not required
(the family is advisory today, #5617's unsignalled half) and a required
context no row pins (a rename detaches it silently).
- Report-only, and OFF the required path by construction: the settings half of
any required-set change is maintainer-only and lands AFTER the merge, so a
merge-blocking version would be red on the very PR carrying the repo half.
Posture is `check-governed-merges.mjs`'s — a completed sweep exits 0 whether
it found 0 or 40 disagreements; a non-zero exit classifies the ENVIRONMENT,
and unreachable prints NOT VERIFIED, never a pass (#4690).
- The self-test (offline) covers both directions, `evaluate`-mode rulesets,
ref-scope, the unprotected reading, the NOT-VERIFIED renderer, and pins that
the pin stays network-free and that nothing wires the live read into a job
publishing a required context.
Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
Co-authored-by: Claude <noreply@anthropic.com>1 parent 10b3453 commit 0ffbdbb
3 files changed
Lines changed: 549 additions & 23 deletions
File tree
- .github/workflows
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | | - | |
912 | | - | |
913 | | - | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
914 | 919 | | |
915 | 920 | | |
916 | 921 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
| |||
0 commit comments