Commit ffdea0c
fix(github): guard backfill GraphQL helpers' repoFullName parsing (#9351)
* fix: close the remaining 5 pre-existing test failures on main
Follows #9276, which fixed 8 files / 12 cases and left these 4 files / 5 cases
still red on main (and therefore red on every open PR). Each diagnosed to its
introducing commit; two are real source gaps, two are stale sibling tests a
deliberate behavior change never updated.
SOURCE fixes:
- selfhost/metrics.ts: register two counters emitted since #9243 and #9245 but
never added to DEFAULT_METRIC_META, so renderMetrics() emitted them as bare
undocumented samples with no HELP/TYPE — exactly what that drift guard exists
to catch. Both commits even name the counter in their own body text; a pure
registration miss, not a behavior decision.
TEST fixes (source verified correct in both cases):
- selfhost-pg-retention: the fake Postgres still matched the pre-#9083 ctid
semi-join, so every DELETE fell through to rowCount 0. #9083 deliberately
moved retention to an index-backed PK range delete with ORDER BY (the fix for
prune-retention blowing its timeout and stalling permanently); it updated the
SQLite twin but not the Postgres one. Regex now captures whichever key column
is in play, keeping BOTH the mapped-PK and ctid-fallback paths exercised.
- salvageability: #9085 made an absent blocker confidence degrade to
CONFIDENCE_WHEN_UNSTATED (0.5) instead of 1.0, so it is sub-floor against the
0.93 default and the low-confidence hold owns the case. It renamed both
sibling assertions in rules.test.ts but missed this third consumption site.
Both calls kept — they are the only coverage of the default-floor arm and the
nullish-confidence arm respectively.
- worker-entry-boundary: false positive, not a real dependency leak. The check
grepped whole-file text, so #9230's user-facing string "crossed the
visual-diff threshold" failed a green tree over a sentence, in a file
worker-reachable since #4120 that imports none of these deps. Narrowed to scan
module specifiers (reusing the file's own parseImportSpecifiers) — the only
way a Node-only dep can actually reach the bundle. Added a discriminating test
so it cannot pass vacuously; verified by injecting a real `import sharp` and
confirming it fails, naming the file and specifier.
* fix(github): guard backfill GraphQL helpers' repoFullName parsing
fetchLiveCiAggregateViaGraphQl, fetchLivePullRequestReviewDecision, and
fetchLiveReviewThreadBlockers parsed repoFullName with a bare split/truthiness
check, so extra segments and whitespace-padded slugs reached GraphQL queries.
Add a local parseBackfillRepoFullName helper mirroring #8311's segment-count and
whitespace guard, preserving each call site's fail-soft return contract.
Closes #9317
---------
Co-authored-by: JSONbored <49853598+JSONbored@users.noreply.github.com>1 parent d55f9e1 commit ffdea0c
3 files changed
Lines changed: 48 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3276 | 3276 | | |
3277 | 3277 | | |
3278 | 3278 | | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
3279 | 3292 | | |
3280 | 3293 | | |
3281 | 3294 | | |
| |||
3295 | 3308 | | |
3296 | 3309 | | |
3297 | 3310 | | |
3298 | | - | |
3299 | | - | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
3300 | 3314 | | |
3301 | 3315 | | |
3302 | 3316 | | |
| |||
4058 | 4072 | | |
4059 | 4073 | | |
4060 | 4074 | | |
4061 | | - | |
4062 | | - | |
| 4075 | + | |
| 4076 | + | |
| 4077 | + | |
4063 | 4078 | | |
4064 | 4079 | | |
4065 | 4080 | | |
| |||
4130 | 4145 | | |
4131 | 4146 | | |
4132 | 4147 | | |
4133 | | - | |
4134 | | - | |
| 4148 | + | |
| 4149 | + | |
| 4150 | + | |
4135 | 4151 | | |
4136 | 4152 | | |
4137 | 4153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
1663 | 1675 | | |
1664 | 1676 | | |
1665 | 1677 | | |
| |||
2528 | 2540 | | |
2529 | 2541 | | |
2530 | 2542 | | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
2531 | 2547 | | |
2532 | 2548 | | |
2533 | 2549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
79 | 89 | | |
80 | 90 | | |
81 | 91 | | |
| |||
0 commit comments