Skip to content

fix(api): clear the six API-route TypeScript regressions the new gate (#11705) landed red on - #12094

Merged
diegosouzapw merged 1 commit into
release/v3.8.51from
fix/release-v3.8.51-basereds-api-route-typecheck
Aug 30, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.51from
fix/release-v3.8.51-basereds-api-route-typecheck

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Aug 30, 2026 •

Copy link
Copy Markdown
Collaborator

Why

API Route Typecheck (new gate from #11705, merged 2026-08-30) is red on every open PR into release/v3.8.51 (e.g. run 33299099596): its baseline was frozen days before it merged and six diagnostics regressed on the branch in between. The gate's own rule is fix regressions, do not widen the baseline — so this fixes them.

What (6 files, +12/−11)

file diagnostic fix
webhooks/[id]/test/route.ts TS2300 ×4 — duplicate import { getWebhook, recordWebhookDelivery } (barrel migration #12051) drop the duplicate line — real defect, ESM refuses duplicate bindings at load
providers/volcengine-plan/connect/route.ts, …/code/route.ts, …/identity/route.ts TS2339 .error on the union if (!x.ok) does not narrow discriminated unions with strict: false; compare === false
providers/route.ts TS2345 unknown → string type the ["id","provider"] column projection
tunnels/tailscale/install/route.ts TS2345 interface → Record<string, unknown> spread the body

Plus config/quality/api-typecheck-baseline.json ratcheted down with --update (12 baselined diagnostics no longer exist; no count increased).

Validation

  • node scripts/check/check-api-typecheck.mjs → OK (289 errors, all frozen)
  • tests/unit/build/check-api-typecheck.test.ts → pass
  • eslint on the 6 files clean under the CI suppressions; prettier warnings on 4 of them pre-exist on the base (not reformatted on purpose)

⚠️ base-red inherited: the 4 unit shards fail on the pure release/v3.8.51 tip (vi locale parity, request-log-detail-* / request-timeline-lane-allocation, media-page-client-browser-bundle, syncAllProviderLimits spacing) after the 2026-08-30 ~04:00–09:30Z merge batch — reproduced locally on the tip without this diff; none of them touch the files changed here.

… landed red on

#11705 froze config/quality/api-typecheck-baseline.json days before it merged;
by then six diagnostics had regressed on release/v3.8.51, so the gate turned
every open PR red on arrival (api-route-typecheck run 33299099596):

- webhooks/[id]/test/route.ts: duplicate `import { getWebhook, recordWebhookDelivery }`
  left by the barrel migration (#12051) — a real defect, ESM rejects duplicate
  bindings at load time.
- providers/volcengine-plan/connect/**: `if (!x.ok)` / `if (!validation.success)`
  do not narrow discriminated unions without strictNullChecks (repo is
  strict:false) — compare `=== false` so `.error` type-checks.
- providers/route.ts: type the ["id","provider"] column projection instead of
  passing `unknown` into cleanupProviderModelsAfterConnectionDelete.
- tunnels/tailscale/install/route.ts: spread PublicSafeTunnelErrorBody into the
  Record<string, unknown> payload pushEvent expects.

Gate back to OK (289 errors, all frozen) and the 12 diagnostics that had
disappeared since the freeze are ratcheted out of the baseline (--update).
@diegosouzapw
diegosouzapw merged commit e620c50 into release/v3.8.51 Aug 30, 2026
16 of 20 checks passed
diegosouzapw added a commit that referenced this pull request Aug 30, 2026
…lose base-red issues, guard Scorecard on the default branch (#12085)

Validated: actionlint clean on all three touched workflows, check-api-typecheck.mjs OK (289 pre-existing, all frozen) after boarding on top of #12094. Confirmed the .trivyignore justification against the documented CVE Variance process (docs/security/SUPPLY_CHAIN.md) — has tracking issue #12084, expiry before the v3.8.51 tag, and a real technical reason the .so can't be rebuilt in this repo. Scorecard branch guard correctly targets the actual default branch (release/vX.Y.Z), not a hardcoded main.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… landed red on (cheaper-inference#12094)

Validated: check-api-typecheck.mjs OK (289 pre-existing, all frozen), typecheck:core clean, 8/8 check-api-typecheck.test.ts pass. Spot-checked two of the six fixes directly — the webhooks/[id]/test/route.ts duplicate import is confirmed removed (real ESM defect), and the volcengine-plan strict-boolean-narrowing fix (`validation.success === false` vs `!validation.success`) is behaviorally identical since `.success` is a strict boolean. This unblocks every other open PR into release/v3.8.51 that was landing red on the new API Route Typecheck gate — including cheaper-inference#12085.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…lose base-red issues, guard Scorecard on the default branch (cheaper-inference#12085)

Validated: actionlint clean on all three touched workflows, check-api-typecheck.mjs OK (289 pre-existing, all frozen) after boarding on top of cheaper-inference#12094. Confirmed the .trivyignore justification against the documented CVE Variance process (docs/security/SUPPLY_CHAIN.md) — has tracking issue cheaper-inference#12084, expiry before the v3.8.51 tag, and a real technical reason the .so can't be rebuilt in this repo. Scorecard branch guard correctly targets the actual default branch (release/vX.Y.Z), not a hardcoded main.
@diegosouzapw
diegosouzapw deleted the fix/release-v3.8.51-basereds-api-route-typecheck branch October 18, 2026 23:50
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.

1 participant