You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pure-deletion dedup of shallow/dead modules — no behavior change.
src/daemon/handlers/parse-utils.ts was a 6-line pure re-export alias (alert constants + parseTimeout). Inlined at its two importers (snapshot-alert.ts, snapshot.test.ts) — they now import from the real homes (alert-contract.ts, utils/parse-timeout.ts) — and deleted the file. Alias names (POLL_INTERVAL_MS, DEFAULT_TIMEOUT_MS) are preserved via as import renames, so bound identifiers are unchanged.
src/daemon/handlers/handler-utils.ts re-exported mergeParentFlags from core/batch.ts. Repointed the sole importer (session-replay-action-runtime.ts) to import it from its real home and dropped the re-export. recordSessionAction (the module's real export) is untouched.
src/daemon/session-routing.ts had a dead both-arms branch if (requested !== 'default') return requested; return requested; — collapsed to return requested.
src/utils/device.tsnormalizePlatformSelector was a documented identity no-op (return platform). Verified against every call site: all inputs (flags.platform, req.flags?.platform, lockPlatform) are typed PlatformSelector | undefined — exactly the function's return type — so inlining is type-identical. Deleted the function and inlined all 9 value sites; replaced the 3 type-position usages (ReturnType<typeof normalizePlatformSelector> -> PlatformSelector | undefined, NonNullable<...> -> NonNullable<PlatformSelector>).
Net -20 lines (28 insertions, 48 deletions across 14 files; one file deleted).
Validation
tsc -p tsconfig.json --noEmit -> clean
oxfmt --write + oxlint --deny-warnings on all changed files -> clean
vitest run daemon device session-routing -> 99 files / 948 tests pass (covers session-routing, request-lock-policy, session-selector, device-ready, and the parseTimeout snapshot test)
behaviorless: every change is either a pure import-source repoint (same bound identifiers/values), an unreachable-branch collapse (both arms returned the same value), or inlining an identity function whose return type matched each call-site input type exactly. No error codes, messages, or recorded shapes touched.
I checked the deleted re-export paths and the remaining import graph: parse-utils is gone with callers repointed to alert-contract / parse-timeout, mergeParentFlags now imports from core/batch, and normalizePlatformSelector was an identity over already-typed PlatformSelector | undefined inputs. The session-routing branch removal is behaviorless because both paths returned the same requested value.
Validation: all CI checks are green. I did not rerun local tests in this temp worktree because dependencies were absent, but the PR validation covers the touched routing/device/session paths and the diff has no public export/package surface change.
Residual risk: low; this is import-source cleanup plus identity/dead-branch removal.
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
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.
What
Pure-deletion dedup of shallow/dead modules — no behavior change.
src/daemon/handlers/parse-utils.tswas a 6-line pure re-export alias (alert constants +parseTimeout). Inlined at its two importers (snapshot-alert.ts,snapshot.test.ts) — they now import from the real homes (alert-contract.ts,utils/parse-timeout.ts) — and deleted the file. Alias names (POLL_INTERVAL_MS,DEFAULT_TIMEOUT_MS) are preserved viaasimport renames, so bound identifiers are unchanged.src/daemon/handlers/handler-utils.tsre-exportedmergeParentFlagsfromcore/batch.ts. Repointed the sole importer (session-replay-action-runtime.ts) to import it from its real home and dropped the re-export.recordSessionAction(the module's real export) is untouched.src/daemon/session-routing.tshad a dead both-arms branchif (requested !== 'default') return requested; return requested;— collapsed toreturn requested.src/utils/device.tsnormalizePlatformSelectorwas a documented identity no-op (return platform). Verified against every call site: all inputs (flags.platform,req.flags?.platform,lockPlatform) are typedPlatformSelector | undefined— exactly the function's return type — so inlining is type-identical. Deleted the function and inlined all 9 value sites; replaced the 3 type-position usages (ReturnType<typeof normalizePlatformSelector>->PlatformSelector | undefined,NonNullable<...>->NonNullable<PlatformSelector>).Net -20 lines (28 insertions, 48 deletions across 14 files; one file deleted).
Validation
tsc -p tsconfig.json --noEmit-> cleanoxfmt --write+oxlint --deny-warningson all changed files -> cleanvitest run daemon device session-routing-> 99 files / 948 tests pass (covers session-routing, request-lock-policy, session-selector, device-ready, and theparseTimeoutsnapshot test)behaviorless: every change is either a pure import-source repoint (same bound identifiers/values), an unreachable-branch collapse (both arms returned the same value), or inlining an identity function whose return type matched each call-site input type exactly. No error codes, messages, or recorded shapes touched.