Commit f19b3ab
admin: address PR #81 review comments — FF semantics, FD3 stderr, generic msgs
Three real fixes from the PR #81 review pass (codex P1 + 2 Copilot
mediums):
1) [chatgpt-codex P1, 00f:200] Fix FF detection inverted compare
semantics. The compare API returns ahead_by/behind_by relative to
`compare/{base}...{head}` order:
ahead_by = commits in head not in base
behind_by = commits in base not in head
Previous code called `compare/${branch}...main` then read
behind_by as "branch behind main" — exactly inverted. With
compare/branch...main: ahead_by = commits-in-main-not-in-branch
(i.e. branch BEHIND), behind_by = commits-in-branch-not-in-main
(i.e. branch AHEAD). The caller's variable names assumed the
correct semantic, so a cleanly fast-forwardable branch was being
reported as divergent and skipped.
Fix: ff_state() now uses `compare/main...${branch}` so the
API's ahead_by/behind_by directly match the caller's
"branch ahead/behind main" semantic. Comment block expanded to
make the API direction explicit so future-me doesn't re-invert it.
2) [Copilot 00f:106] find_release_pr's "Multiple open PRs" error
message went to stdout while callers do `... 2>/dev/null`. The
stderr redirect didn't help because the annotation was on
stdout, and stdout is captured by command substitution. Net
effect: silent failure on the multi-PR error path.
Fix: open FD 3 to the script's real stderr at the top of the
step (`exec 3>&2`). Helper functions now emit their `::error::`
annotations + diagnostic lists to FD 3, which survives both the
caller's command substitution and the `2>/dev/null` swallow on
the happy path.
3) [Copilot 00f:229] Two summary strings hardcoded "PR #79 remains
blocked..." This will rot the moment another downstream PR
exists. Replace with generic "downstream PRs targeting either
lane remain blocked..." in both the error path and the summary
section heading.
Not addressed in this commit (with reasons):
- [Copilot 00e:36] `environment: ${{ inputs.operation == 'upsert'
&& 'github-admin' || '' }}` empty-string env on the check path.
Per ../refs/github/docs/data/reusables/actions/jobs/section-using-
environments-for-jobs.md, the docs describe valid forms (single
name string, or object with name+url) but do not document
empty-string behavior. actionlint accepts the YAML. The 00e
workflow is dispatch-only and the brief explicitly defers live
upsert ("Do not activate live rulesets"), so the empty-string
path is currently unreachable. If/when 00e fires in upsert mode
and the empty-string env breaks at runtime, split into two jobs
(render + upsert, only upsert declares environment).
- [gemini approval-count = 1, both rulesets] Brief explicitly says
"No `require_code_owner_review` unless a real separate
reviewer/team exists. It does not." With one actor,
required_approving_review_count: 1 is unsatisfiable. Brief-aligned
value is 0.
- [gemini hardcoded App ID 3663316 in tracked JSON, both rulesets]
Brief explicitly says "Tracked JSON must not hardcode numeric
App IDs." Bypass actor is rendered at runtime in 00e from
vars.GH_APP_ID. Tracked specs MUST stay with empty bypass_actors.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent b23f57e commit f19b3ab
1 file changed
Lines changed: 45 additions & 13 deletions
Lines changed: 45 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
106 | | - | |
107 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
108 | 130 | | |
109 | 131 | | |
110 | 132 | | |
| |||
123 | 145 | | |
124 | 146 | | |
125 | 147 | | |
126 | | - | |
127 | | - | |
128 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
129 | 160 | | |
130 | 161 | | |
131 | 162 | | |
132 | 163 | | |
133 | | - | |
| 164 | + | |
134 | 165 | | |
135 | | - | |
136 | 166 | | |
| 167 | + | |
137 | 168 | | |
138 | 169 | | |
139 | 170 | | |
| |||
219 | 250 | | |
220 | 251 | | |
221 | 252 | | |
222 | | - | |
223 | | - | |
224 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
225 | 257 | | |
226 | 258 | | |
227 | 259 | | |
228 | 260 | | |
229 | | - | |
| 261 | + | |
230 | 262 | | |
231 | 263 | | |
232 | 264 | | |
| |||
257 | 289 | | |
258 | 290 | | |
259 | 291 | | |
260 | | - | |
261 | | - | |
| 292 | + | |
| 293 | + | |
262 | 294 | | |
0 commit comments