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
{{ message }}
Repository navigation
Code health: audit and remove proven dead code paths #2106
Part of epic #1939. The audit is underway in #2108 after the maintainer asked to finish the epic promptly; the earlier deferral is superseded.
Task
Use Vulture (or a comparable static scanner) to identify possible dead code paths in src/draftwright, with tests/ and scripts/ included as usage evidence. Triage candidates against dynamic dispatch, public and compatibility import paths, plugin/CLI entry points, reflection, and test fixtures before proposing removals. Keep the initial scanner report advisory; do not add a blanket CI gate or broad whitelist based on raw findings.
Acceptance
Record the scanner command, version, scope and confidence threshold so the audit is reproducible.
For each proposed removal, prove the symbol/path has no supported caller using source search plus targeted runtime/coverage evidence where static analysis is insufficient. Preserve the five live ADR boundaries and the epic's no-successful-drawing-behavior-change rule.
Delete only independently reviewed, demonstrably unused paths in small cohesive slices. Run relevant tests, guards and drawing/lint parity checks; measure net code deletion.
Document false positives that matter to future audits without weakening existing coverage or import-boundary guards.
Vulture 2.16 is installed as a local uv tool. The first triaged deletion is under review in #2108; raw scanner findings remain advisory.
Audit in #2108 (current main base b5ba5564, patch de637f8b): vulture 2.16; command vulture src/draftwright tests scripts --min-confidence 60. Vulture exits 3 when it reports candidates. At 100% confidence the baseline report had 20 test-only findings and zero source findings. At 60%, the baseline source list had 41 leads; after this four-helper deletion, the report has 37 source leads and 61 test leads. This is a lead list, not a deletion list or CI gate.
Four private functions had no executable source, test, script or doc caller by exact-name search, no export, and no relevant string dispatch. Two independent read-only reviews checked each pair and a third reviewed the final diff. The live alternatives are _boss_groove_floor_candidates and shared envelope_is_emittable for recognition, and the len(lanes) * len(obstacles) measured balloon work guard. The patch removes 51 net source lines. Static checks, 258 targeted tests, and byte-identical fresh signatures on all 23 refactor-corpus drawings passed against current main.
False positives to retain in future triage: __dir__ is Python reflection; pytest hooks, fixtures, pytestmark, and hook parameters are reached by pytest; _addressable_* compiled-plan methods are selected through dynamic dispatch; Sheet/GD&T fluent verbs are public surfaces; CLI and profile names can be registered as data; dataclass fields and test monkeypatch targets have uses invisible to Vulture. Do not whitelist or delete these en masse. Remaining 60% leads require their own call-path and public-contract review if pursued.
Completed in #2108, merged as a243f00 after independent review, 258 targeted passes, static checks, fresh 23-case drawing-signature parity, and 17 successful PR CI checks. Four proven unused private helpers removed for 51 net source lines. Vulture's remaining leads are advisory; false-positive categories and reproducible command are recorded above.
Activity
pzfreo commentedon Sep 30, 2026
Audit in #2108 (current main base
b5ba5564, patchde637f8b):vulture 2.16; commandvulture src/draftwright tests scripts --min-confidence 60. Vulture exits 3 when it reports candidates. At 100% confidence the baseline report had 20 test-only findings and zero source findings. At 60%, the baseline source list had 41 leads; after this four-helper deletion, the report has 37 source leads and 61 test leads. This is a lead list, not a deletion list or CI gate.Four private functions had no executable source, test, script or doc caller by exact-name search, no export, and no relevant string dispatch. Two independent read-only reviews checked each pair and a third reviewed the final diff. The live alternatives are
_boss_groove_floor_candidatesand sharedenvelope_is_emittablefor recognition, and thelen(lanes) * len(obstacles)measured balloon work guard. The patch removes 51 net source lines. Static checks, 258 targeted tests, and byte-identical fresh signatures on all 23 refactor-corpus drawings passed against current main.False positives to retain in future triage:
__dir__is Python reflection; pytest hooks, fixtures,pytestmark, and hook parameters are reached by pytest;_addressable_*compiled-plan methods are selected through dynamic dispatch; Sheet/GD&T fluent verbs are public surfaces; CLI and profile names can be registered as data; dataclass fields and test monkeypatch targets have uses invisible to Vulture. Do not whitelist or delete these en masse. Remaining 60% leads require their own call-path and public-contract review if pursued.Remove proven dead private drawing helpers (#2106) (#2108)
pzfreo commentedon Sep 30, 2026
Completed in #2108, merged as a243f00 after independent review, 258 targeted passes, static checks, fresh 23-case drawing-signature parity, and 17 successful PR CI checks. Four proven unused private helpers removed for 51 net source lines. Vulture's remaining leads are advisory; false-positive categories and reproducible command are recorded above.