fix: type strictness: enable - #11
Merged
andrei-hasna merged 2 commits intoJul 31, 2026
Merged
Conversation
type strictness: enable noImplicitReturns+noFallthroughCasesInSwitch in evals and fix the fallout [loop-infinity-300pr] REPO: https://github.com/hasna/evals WHAT TO CHANGE tsconfig.json has "strict": true but neither "noImplicitReturns" nor "noFallthroughCasesInSwitch". Both catch real control-flow bugs: a code path that falls off the end of a function returning undefined, and a switch case that falls through unintentionally. Turn both on in compilerOptions and fix the fallout. DONE LOOKS LIKE - noImplicitReturns+noFallthroughCasesInSwitch enabled in tsconfig.json compilerOptions (all of the named flags, if more than one). - Fix each diagnostic by making the control flow explicit — add the missing return, add the missing break/return in the switch case, or make the function's return type include undefined if that is genuinely the contract. Do not add @ts-expect-error. - A deliberate switch fallthrough is legitimate; keep it and add the // falls through comment TypeScript recognises, rather than restructuring working code. - If the fallout is larger than roughly 60 diagnostics, land the smallest coherent slice, leave the flags off in the committed tsconfig, and state the remaining count in the PR body. - Behaviour unchanged. This is a type-safety change, not a refactor: no renamed exports, no changed signatures beyond what the flag forces, no reorganised files. VERIFY - `bun install && bun run typecheck` passes with the flag(s) on (or `bunx tsc --noEmit -p tsconfig.json` if the repo has no typecheck script — and if so, add one). - `bun test` passes, unchanged. EVIDENCE tsconfig.json compilerOptions read from GitHub HEAD on 2026-07-29 via the GitHub contents API — not from a stale local checkout. If the flag has since been enabled upstream, close this task as already-done with a one-line comment rather than opening an empty PR. PROCESS: work in a branch off the default branch, one focused change, conventional commit, open a PR. Do not bundle unrelated cleanups. If the repo has a CHANGELOG, add an entry. X-Factory-Run: run_0209db82f7fd X-Factory-Task: 69d1c44f-99dc-4a73-b22d-73b88343285c
Contributor
Author
|
[REVIEW] GO — #11 @ 9bf7591 — lens: correctness+security+gates, reviewer Augustus (1 of 1) What I read:
Commands run and exit codes:
Blocking P0/P1 findings:
Non-blocking follow-ups:
|
Agent: Augustus
Contributor
Author
|
[REVIEW] GO — #11 @ 94b0cb6 — lens: correctness+security+gates, reviewer Augustus (1 of 1) This refreshes the earlier GO review after GitHub refused the first merge attempt because current What I read:
Commands run and exit codes on the updated candidate:
Blocking P0/P1 findings:
Non-blocking follow-ups:
|
andrei-hasna
deleted the
factory/69d1c44f-99dc-4a73-b22d-73b88343-34d7dfde
branch
July 31, 2026 16:12
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.
Objective
type strictness: enable noImplicitReturns+noFallthroughCasesInSwitch in evals and fix the fallout [loop-infinity-300pr]
REPO: https://github.com/hasna/evals
WHAT TO CHANGE
tsconfig.json has "strict": true but neither "noImplicitReturns" nor "noFallthroughCasesInSwitch". Both catch real control-flow bugs: a code path that falls off the end of a function returning undefined, and a switch case that falls through unintentionally. Turn both on in compilerOptions and fix the fallout.
DONE LOOKS LIKE
VERIFY
bun install && bun run typecheckpasses with the flag(s) on (orbunx tsc --noEmit -p tsconfig.jsonif the repo has no typecheck script — and if so, add one).bun testpasses, unchanged.EVIDENCE
tsconfig.json compilerOptions read from GitHub HEAD on 2026-07-29 via the GitHub contents API — not from a stale local checkout. If the flag has since been enabled upstream, close this task as already-done with a one-line comment rather than opening an empty PR.
PROCESS: work in a branch off the default branch, one focused change, conventional commit, open a PR. Do not bundle unrelated cleanups. If the repo has a CHANGELOG, add an entry.
Verification
Run
run_0209db82f7fd· backendcodewith· task69d1c44f-99dc-4a73-b22d-73b88343285c🏭 Generated by @hasnaxyz/factory
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.