[ci] Compare size against merge base (#37355)
Commit 084f5f2 [ci] Compare size against merge base (#37355) Sizebot compared the pull request head build against the build of pull_request.base.sha, which is the tip of the base branch at event time, not the commit the pull request diverged from. The field's semantics are undocumented in GitHub's API schema (the OpenAPI description types it as a bare string); the observed behavior and the compare API's merge_base_commit confirm the difference. The difference between pull_request.base.sha and the merge base is confirmed with an example in #37356 The sizebot job now resolves the merge-base through the compare API and downloads the base build for that commit instead, so the report only ever contains the pull request's own changes. The job gains contents: read for the compare call. When no base build can be downloaded for the merge-base, for example because its artifacts aged out of the retention window or its run failed, the sizebot job records a base-build-not-found result instead of failing immediately. render-comment.js on the default branch renders that as a warning comment naming the base commit and writes the sizebot-problem.txt marker, so the comment workflow fails its check after posting the warning, the same pattern already used for build configuration drift. The sizebot job itself intentionally stays green: a failed run would make the renderer discard the results and mask the warning with a generic "did not complete" message. Co-authored-by: Claude Code (kimi-k3[1m]) 1 parent d04798f commit 084f5f2 3 files changed Lines changed: 75 additions & 8 deletions File tree - .github/workflows - scripts/sizebot | Original file line number | Diff line number | Diff line change | | |---|---|---|---| | ||| 999 | 999 | | | 1000 | 1000 | | | 1001 | 1001 | | | | 1002 | + | | | 1003 | + | | 1002 | 1004 | | | 1003 | 1005 | | | 1004 | 1006 | | | | ||| 1020 | 1022 | | | 1021 | 1023 | | | 1022 | 1024 | | | | 1025 | + | | | 1026 | + | | | 1027 | + | | | 1028 | + | | | 1029 | + | | | 1030 | + | | | 1031 | + | | | 1032 | + | | | 1033 | + | | 1023 | 1034 | | | | 1035 | + | | 1024 | 1036 | | | 1025 | 1037 | | | 1026 | 1038 | | | 1027 | 1039 | | | 1028 | 1040 | | | 1029 | | - | | 1030 | | - | | | 1041 | + | | | 1042 | + | | | 1043 | + | | | 1044 | + | | | 1045 | + | | | 1046 | + | | | 1047 | + | | | 1048 | + | | | 1049 | + | | | 1050 | + | | 1031 | 1051 | | | 1032 | 1052 | | | 1033 | 1053 | | | 1034 | 1054 | | | 1035 | 1055 | | | 1036 | 1056 | | | 1037 | | - | | | 1057 | + | | | 1058 | + | | 1038 | 1059 | | | 1039 | 1060 | | | 1040 | 1061 | | | | ||| 1056 | 1077 | | | 1057 | 1078 | | | 1058 | 1079 | | | | 1080 | + | | | 1081 | + | | | 1082 | + | | 1059 | 1083 | | | 1060 | 1084 | | | 1061 | 1085 | | | 1062 | 1086 | | | 1063 | 1087 | | | 1064 | 1088 | | | 1065 | 1089 | | | | 1090 | + | | | 1091 | + | | | 1092 | + | | | 1093 | + | | | 1094 | + | | Original file line number | Diff line number | Diff line change | | |---|---|---|---| | ||| 95 | 95 | | | 96 | 96 | | | 97 | 97 | | | 98 | | - | | | 98 | + | | 99 | 99 | | | 100 | | - | | 101 | | - | | | 100 | + | | | 101 | + | | | 102 | + | | 102 | 103 | | | 103 | 104 | | | 104 | 105 | | | | | Original file line number | Diff line number | Diff line change | | |---|---|---|---| | ||| 26 | 26 | | | 27 | 27 | | | 28 | 28 | | | 29 | | - | | | 29 | + | | | 30 | + | | | 31 | + | | | 32 | + | | | 33 | + | | 30 | 34 | | | 31 | 35 | | | 32 | 36 | | | | ||| 161 | 165 | | | 162 | 166 | | | 163 | 167 | | | | 168 | + | | | 169 | + | | | 170 | + | | | 171 | + | | | 172 | + | | | 173 | + | | | 174 | + | | | 175 | + | | | 176 | + | | 164 | 177 | | | 165 | 178 | | | 166 | 179 | | | | ||| 337 | 350 | | | 338 | 351 | | | 339 | 352 | | | | 353 | + | | | 354 | + | | | 355 | + | | | 356 | + | | | 357 | + | | | 358 | + | | | 359 | + | | | 360 | + | | | 361 | + | | | 362 | + | | | 363 | + | | | 364 | + | | | 365 | + | | | 366 | + | | | 367 | + | | | 368 | + | | | 369 | + | | 340 | 370 | | | 341 | 371 | | | 342 | 372 | | | | ||| 370 | 400 | | | 371 | 401 | | | 372 | 402 | | | | 403 | + | | 373 | 404 | | | 374 | 405 | | | 375 | 406 | | | | ||| 392 | 423 | | | 393 | 424 | | | 394 | 425 | | | | 426 | + | | 395 | 427 | | | 396 | 428 | | | 397 | 429 | | | | ||| 428 | 460 | | | 429 | 461 | | | 430 | 462 | | | | 463 | + | | 431 | 464 | | | 432 | 465 | | | 433 | 466 | | | | ||| 454 | 487 | | | 455 | 488 | | | 456 | 489 | | | 457 | | - | | | 490 | + | | | 491 | + | | 458 | 492 | | | 459 | 493 | | | 460 | 494 | | | | ||| 473 | 507 | | | 474 | 508 | | | 475 | 509 | | | | 510 | + | | | 511 | + | | | 512 | + | | 476 | 513 | | | 477 | 514 | | | 478 | 515 | | | | 0 commit comments
Comments
No comments yet. Start the discussion.