Repository navigation
refactor(types): drop branches and assertions the types already exclude - #4975
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
This PR is ready at 2074cc5. The guards and casts it removes trace back to types that already exclude those cases, and the review found no code problem. Not blocking: |
…asons * origin/main: refactor(types): drop branches and assertions the types already exclude (#4975) refactor(reasons): declare the durable capture outcomes in ReasonTable rows (#4978) feat(harmonyos): verify foreground after open instead of trusting the launch line (#4293) fix(remote): give each session its own saved-connection file (#4925) # Conflicts: # packages/kernel/src/errors.ts # src/platform-runtime-gateway.ts
…ures * origin/main: refactor(types): drop branches and assertions the types already exclude (#4975) refactor(reasons): declare the durable capture outcomes in ReasonTable rows (#4978) feat(harmonyos): verify foreground after open instead of trusting the launch line (#4293) fix(remote): give each session its own saved-connection file (#4925)
Summary
Removes code the type checker already proves redundant. No behavior change.
multiTouchRefusalSubjectindexes the totalRecord<AppleOS, string>directly. The touch result extras readresult.targetwithout re-checking its kind.warns && judgedand twodevice.kind ?checks on a requiredDeviceKindare gone.SessionAction.positionalsand.flagsare required, so the?.and?? []/?? {}guards on them are dropped.!on non-optional members removed, as listed by type-aware lint (no-unnecessary-type-assertion).Skipped: C7.3 (
--outbranches invalidateObservationPerfFlags) is unreachable only through a parser invariant in another module, not through types, and a reader test pins it. Reason-related casts are untouched.Value
Measured on the diff against
origin/main:positionals/flags: 70 removed lines, 3 added.Validation
pnpm typecheckpasses.oxlinton touched files is clean.pnpm formatis applied.fallow audit --base origin/mainreports no issues.check:daemon-wire-compatpasses.🤖 Generated with Claude Code