fix(api): drop unused @ts-expect-error that breaks CI typecheck - #115
Merged
Hydralerne merged 1 commit intoJul 22, 2026
Merged
Conversation
`process.getuid` is typed `(() => number) | undefined` in @types/node 22,
so assigning `() => 0` to it is already valid — the `@ts-expect-error`
above it never suppressed anything. Under `tsc --noEmit` an unused
directive is itself an error (TS2578), so the CI Typecheck job fails:
src/lib/startup/self-edge.test.ts(42,3): error TS2578:
Unused '@ts-expect-error' directive.
The teardown on line 55 already assigns to `process.getuid` with no
directive, which confirms the assignment type-checks on its own.
Keep the explanatory comment, drop only the directive. The three
`ensureSelfEdgeInfra` tests still pass unchanged.
This was referenced Jul 22, 2026
Contributor
Author
|
Quick heads-up now that #118, #120 and #121 have landed — The merge commit for #121 (run 29959055592) failed with the same single error: Every push to No rush from my side — just flagging it since the red X on the merges above is this and not those changes. |
Hydralerne
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI's Typecheck job is failing on
main(and therefore on every open PR branched from it):This started with
3381e54(#114), which introducedapps/api/src/lib/startup/self-edge.test.ts. The three most recent CI runs onmainare red — theTypecheck apps/apistep exits 2, which also short-circuits theTypecheck apps/dashboardstep so it never runs.Cause
process.getuidis typed(() => number) | undefinedin@types/node22 (^22.13.0, resolving to 22.19.15), so:is already valid TypeScript — nothing to suppress.
tsctreats a@ts-expect-errorthat suppresses no error as an error in its own right (TS2578).The teardown a few lines below already assigns to the same property with no directive, which confirms the assignment type-checks on its own:
Fix
Remove the directive, keep the explanatory comment. One line.
Verification
Run against this branch:
bun run --cwd apps/api lint→ clean, exit 0 (was: TS2578, exit 2)apps/dashboardtsc --noEmit(the CI filter step) → passesbun run test→ 5/5 turbo tasks successful, matching CI's counts exactly:@repo/api695 passed / 3 skipped@repo/adapters222 passed@repo/core89 passed@repo/db25 passed@repo/dashboard17 passedensureSelfEdgeInfratests in the touched file pass unchanged (vitest run src/lib/startup/self-edge.test.ts→ 3 passed).No behavior change — this only unblocks the typecheck gate.