refactor: remove unused isInspectorGapFinding export#49
Draft
KrasimirKralev wants to merge 1 commit into
Draft
Conversation
src/issues.js exported isInspectorGapFinding(finding, targetOpenClaw) but nothing references it repo-wide (git grep = definition only) and it is not re-exported by index.js — the '.' entry point names issueId/classifyIssueFinding/ isAuthorFacingFinding/knownIssueCodes from issues.js but not this predicate. Behavior-preserving deletion; full node --test suite stays 213/213.
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor: remove unused isInspectorGapFinding export This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
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.
What Problem This Solves
src/issues.jsexportsisInspectorGapFinding(finding, targetOpenClaw), a one-line predicate, but nothing in the package uses it. A repo-wide search finds the symbol only at its own definition — zero call sites insrc,test,scripts,docs,examples, or the README.It is also not part of the published API surface. The
.entry point (src/index.js) re-exports a specific, curated set ofissues.jssymbols —classifyIssueFinding,issueId,isAuthorFacingFinding,knownIssueCodes— and deliberately does not include this predicate. SoisInspectorGapFindingis reachable from nothing, inside or outside the package.The equivalent inspector-gap classification is still available where it's actually used: consumers derive it from the
issueClass === "inspector-gap"field on a classified finding (e.g.ci-policy.js,compatibility-report.js), which is what this dead predicate wrapped.Why This Change Was Made
Debt cleanup: delete a fully-unreferenced exported function. Net-negative (−4 lines), behavior-preserving, single file.
Scope boundary — what did NOT change: no report field names or finding codes are touched (per
AGENTS.md's stable-field/code contract); no CLI, package entrypoint, or release metadata changes; the sibling predicateisAuthorFacingFindingand the sharedissueMetadata/classifyIssueFindinghelpers are untouched and still live.User Impact
None. No runtime, CLI, config, or public-API behavior changes — the removed symbol was reachable from nothing and was never re-exported through the package entry point.
Evidence
Branched off current
main(b610d4e), Linux, Node 22.22.2. The package has no dependencies, so the suite runs directly withnode --test.Dead-code proof — the symbol is referenced only at its own definition, so removing it leaves nothing dangling:
Behavior preserved — the full suite is green and the pass count is identical before and after (the removed symbol had no test, so the count is unchanged):
What was not tested / limitations: none beyond the above — this is a pure deletion of an unreferenced export with no reachable call path, so there is no runtime behavior to exercise. No new test file is added (there is nothing new to cover).
AI-assisted contribution.
Generated by Claude Code