refactor: resolve clawpatch findings#27
Merged
Merged
Conversation
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.
Resolves all 7 open
clawpatchfindings (all low-severity maintainability) and refreshes dependencies. Each finding was revalidated byclawpatch(nowopenFindings: 0), and the full local suite (format, knip, typecheck, lint, fta, tests) passes via the pre-commit hook on every commit.Clawpatch fixes
src/cli.tsis compiled todist/cli.jsand run viabin/worktree-remove; it can never run directly (it imports.jspaths), so its#!/usr/bin/env -S node --experimental-strip-typesshebang and executable bit were misleading. Removed both and converted the action-levelprocess.exit()calls toprocess.exitCode+return(the idiomatic patternunicorn/no-process-exitsteers toward; theSIGINThandler keepsprocess.exit(130)). Verified exit codes are unchanged for the no-target,-inon-interactive,--help, and unknown-flag paths.src/fsandsrc/git, plus the verbosenormalizeBranchName/exitWithMessage/confirmJSDoc blocks ingit-helpers.ts.fs.statmock and thetoHaveBeenCalledWithimplementation assertion with a behavior-level test over a real temp dir/file, so the test no longer locks the helper to its internalfschoice.report-batch-results.tsnow counts successes instead of collecting names only to count them;remove-batch.tsasserts the non-empty target once after the length guard and pairs each removal result with its target name, removing the impossible?? "target"/?? "unknown target"fallbacks.Dependency update
@types/node,fta-check,semantic-release, andoxlint-config-j4k(2.7.2 → 2.7.4) to latest; lockfile deduped.@typescript/native-previewstays on itsbeta-tagged build (20260421.2) as pinned.oxlint-config-j4k2.7.4 resolves the contradictory vitest matcher rules (prefer-to-be-falsyvsprefer-strict-boolean-matchers), so the test now uses the precise.toBe(false)instead of the earlier.not.toBe(true)workaround.One pre-existing
eslint-disableonexitWithMessage'sprocess.exitingit-helpers.tswas left untouched — load-bearing and out of scope for these findings.