-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
void requireRef silences dead-import lint via side-effect expression #83878
Copy link
Copy link
Closed
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Severity: low / Confidence: high / Category: maintainability
Triage: risk
Detected against: openclaw v2026.5.18 (latest stable at time of scan, 2026-05-18)
Tooling: clawpatch 0.3.0 + acpx/claude-sonnet-4-5 via Brad Mills protocol
Evidence
extensions/browser/src/cli/browser-cli-actions-input/register.navigation.ts:171-172(requireRef)Reasoning
requireRef is imported but not called in register.navigation.ts. The void expression prevents lint from flagging the unused import, but it does not create a real compile-time or runtime dependency. If requireRef is renamed or removed from shared.ts, the import will become a broken reference that TypeScript will catch, but the void expression itself will never warn about intent drift. More importantly, the motivation ('shared utilities are intended for other modules too') is not a sound reason to pin a dependency in a file that does not use it — that relationship should be expressed by the actual callers.
Recommendation
Remove the import and void workaround from register.navigation.ts. If the intent is to document that requireRef is part of the public surface of shared.ts, that belongs in a comment in shared.ts or in a barrel export, not as a phantom import in an unrelated file.
Why existing tests miss this
This is a structural code smell, not a behavioral bug — tests do not exercise import graph relationships.
Minimum fix scope
register.navigation.ts: remove the requireRef import and the void requireRef statement.
Standardized clawpatch finding. Persistent in v2026.5.18 (not resolved by upgrading from v2026.5.12). Finding ID:
fnd_sig-feat-cli-command-0029f9d57b-_b1c98ff96e.