Commit 1886bb2
committed
a configured gtc is authentication, and a skipped host was not a pass
TWO DEFECTS, ONE MEASUREMENT. A local top-up exited 0 and printed `all assets
mirrored + verified on 1 host(s)` while `no GITCODE_TOKEN/gtc; skipping gitcode
mirror` sat one line above it, and nothing had reached GitCode.
FIRST: the gate asked the wrong question. `gtc` resolves its own credentials —
`GITCODE_TOKEN` first, then the config file its `--help` documents — exactly as
`gh` does, and the github leg has always accepted either. This leg demanded the
variable, so a machine with a working, configured gtc was told it had none.
That is the machine this script is run on by hand, which is the whole reason it
can be run by hand: the cross-border upload from a GitHub runner is the shaped
path that has cost four releases their aarch64 asset.
SECOND, AND WORSE: `verify` iterates the hosts that turned out to be ENABLED,
so its denominator came from the same enumeration as its numerator. It could
not tell "both hosts serve every asset" from "one host was skipped and the
other serves every asset" — the skip was invisible to the only check that
could have reported it.
`MIRROR_HOSTS` states the required set before anything is probed, and defaults
to `both`. Wanting one leg stays possible, because topping GitCode up by hand
is legitimate, but it has to be asked for rather than being what happened.
Missing credentials for a required host now exit 2 and name both places a
token can live.
Measured, four paths:
local, gtc configured, no env var skipped silently, exit 0 -> 2 hosts
MIRROR_HOSTS=gtc n/a -> 1 host, stated
gtc present with no token skipped silently, exit 0 -> exit 2
CI (both tokens in the environment) 2 hosts -> unchanged
The third case had to be isolated with a config home carrying gh and not
gtc: emptying the whole config home fails the upstream download instead and
never reaches the gate, which is a test that would have passed for the wrong
reason.1 parent fe49665 commit 1886bb2
2 files changed
Lines changed: 85 additions & 18 deletions
File tree
- .agents/docs
- .github/tools
Lines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1008 | 1008 | | |
1009 | 1009 | | |
1010 | 1010 | | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
1017 | 1030 | | |
1018 | 1031 | | |
1019 | 1032 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
249 | 287 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
255 | 300 | | |
256 | | - | |
| 301 | + | |
257 | 302 | | |
| 303 | + | |
258 | 304 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
263 | 317 | | |
264 | | - | |
| 318 | + | |
265 | 319 | | |
266 | 320 | | |
267 | 321 | | |
| |||
313 | 367 | | |
314 | 368 | | |
315 | 369 | | |
316 | | - | |
| 370 | + | |
317 | 371 | | |
0 commit comments