Skip to content

fix(dashboard): make the NoAuth egress label map exhaustive + register 7 covering tests - #14939

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
adivekar-utexas:fix/noauth-egress-label-map-and-stryker-registration
Sep 29, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
adivekar-utexas:fix/noauth-egress-label-map-and-stryker-registration

Conversation

@adivekar-utexas

Copy link
Copy Markdown
Contributor

What

Two independent base-reds that were failing Fast Quality Gates on every open PR.

1. NoAuthAccountCard.tsx TS2345

EGRESS_LABEL_KEYS covered 4 of the 5 EffectiveEgressKind values, so own reached getEgressLabelKey:

Argument of type '"direct" | "own" | "inherited-proxy" | "pool-empty"'
is not assignable to parameter of type
'"direct" | "inherited-proxy" | "inherited-pool" | "pool-empty"'

The map is now typed Record<EffectiveEgressKind, string>, so it is exhaustive by construction: adding a kind without a label becomes a compile error instead of a latent TS2345. It gains an ownProxy label next to the existing four.

own is only ever built with a proxy attached, so the offending fallthrough is unreachable at runtime. The type gap was real though, and the gate correctly refused to widen its baseline for a new regression.

2. mutation-test-coverage --strict

7 covering unit tests were missing from stryker.conf.json tap.testFiles, so their mutant kills were not counting. Each is inserted at its sorted position. The gate now reports no drift.

Testing

  • check:mutation-test-coverage --strict — no drift (was 10 gaps across 5 modules)
  • check:docs-counts — soft-only, so nothing to fix there
  • 29 tests across noauth-account-card and noauth-effective-egress pass
  • 14 tests in dashboard-localization-contract pass
  • ESLint clean on the changed file

I could not run check:dashboard-typecheck locally: tsc OOMs even under a 1 GB cap on this machine, so the type fix is verified by the targeted tests above and CI.

The label map covered 4 of the 5 EffectiveEgressKind values, so `own` reached
getEgressLabelKey and surfaced as a TS2345 dashboard typecheck regression
("direct" | "own" | "inherited-proxy" | "pool-empty" is not assignable to
"direct" | "inherited-proxy" | "inherited-pool" | "pool-empty").

`own` is only ever built with a proxy attached, so the offending fallthrough is
unreachable at runtime, but the type gap was real and the gate correctly refused
to widen its baseline for it. The map is now typed Record<EffectiveEgressKind,
string>, which makes it exhaustive by construction: adding a kind without a
label is a compile error rather than a latent TS2345. It gains an ownProxy
label alongside the existing four.

Also registers 7 covering unit tests in stryker.conf.json tap.testFiles so
their mutant kills count, clearing the mutation-test-coverage --strict drift
that was failing Fast Quality Gates. check:mutation-test-coverage --strict now
reports no drift.
@adivekar-utexas

Copy link
Copy Markdown
Contributor Author

Worth knowing before triage: this PR clears Fast Quality Gates for three other open PRs of mine (#14817, #14924, #14929), which all fail on the same two base-reds. Confirmed on this PR's run — Fast Quality Gates is green here and red there.

The Unit Tests fast-path 1-4 failures remain on every PR including this one. Those are broader upstream base-reds (MCP bundle on Node 24, a 512 MiB heap-budget test, OpencodeExecutor geo-rotation, bounded-read, GHE Copilot registry, and i18n zh-CN/zh-TW glossary), so I have deliberately left them alone rather than fold unrelated repairs into these PRs.

@diegosouzapw
diegosouzapw merged commit 0c6a96d into diegosouzapw:release/v3.8.51 Sep 29, 2026
12 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants