Skip to content

fix(ego-lint): reduce Just Perfection false positives#29

Closed
ZviBaratz wants to merge 1 commit intomainfrom
fix/just-perfection-calibration
Closed

fix(ego-lint): reduce Just Perfection false positives#29
ZviBaratz wants to merge 1 commit intomainfrom
fix/just-perfection-calibration

Conversation

@ZviBaratz
Copy link
Copy Markdown
Owner

Summary

Field test #10 on Just Perfection (most popular GNOME extension, GNOME 45–50, 7 JS files, src/ layout) revealed 6 false positives and a duplicate-detection bug:

  • License check src/ fallback: ego-lint.sh now checks parent dir for LICENSE when scanning src/ directory (FAIL → PASS)
  • UUID-dir skip for src/ layout: check-metadata.py skips meaningless UUID-dir match when dirname is src
  • isLocked guard exemption: sessionMode.isLocked is always a guard pattern (reading lock state to decide behavior), not lock screen functionality — removed from impossible-state and session-modes-consistency checks
  • Prototype-override deduplication: check-lifecycle.py deduplicates by (file, prototype) key to avoid counting both the override and restore (5 → 3 warnings)
  • Comment-density threshold: Raised from 40% to 50% in check-quality.py — well-documented hand-written code with JSDoc hits 40% legitimately

Results: FAILs 3→2, WARNs 414→408. Remaining 400 R-SLOP-01/02 JSDoc warnings addressed by PR #23 (provenance threshold).

Closes #26, closes #27, closes #28

Test plan

  • 460 tests pass (452 baseline + 8 new assertions)
  • 3 new fixtures: src-license-fallback@test, islocked-guard@test, proto-override-dedup@test
  • Updated ai-slop@test fixture (isLockedcurrentMode !== 'unlock-dialog')
  • Re-ran ego-lint on Just Perfection — confirmed FP reduction
  • Verify no regressions on other field-tested extensions

🤖 Generated with Claude Code

Field test #10 on Just Perfection (most popular GNOME extension) revealed
6 false positives and a duplicate-detection bug. Fixes:

- License check: add src/ parent-dir fallback (FAIL → PASS)
- UUID-dir match: skip when dirname is "src" (src/ layout)
- isLocked guard: sessionMode.isLocked is always a guard pattern, not
  lock screen functionality — exempt from impossible-state and
  session-modes-consistency checks
- Prototype-override: deduplicate by (file, prototype) to avoid
  counting both override and restore
- Comment-density: raise threshold from 40% to 50% to accommodate
  well-documented hand-written code (JSDoc-heavy)

Results: FAILs 3→2, WARNs 414→408 (remaining 400 R-SLOP addressed by PR #23)

Closes #26, closes #27, closes #28

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ZviBaratz ZviBaratz self-assigned this Mar 4, 2026
@ZviBaratz
Copy link
Copy Markdown
Owner Author

Splitting into 3 separate PRs per one-concern-per-PR convention (one per issue: #26, #27, #28).

@ZviBaratz ZviBaratz closed this Mar 4, 2026
@ZviBaratz ZviBaratz deleted the fix/just-perfection-calibration branch March 4, 2026 13:56
ZviBaratz added a commit that referenced this pull request Mar 4, 2026
## Summary

- **Tiling Shell field test report** (session #29): Compiled TypeScript
extension, 64 files / 11K lines — identified constructor-from-enable
FPs, arrow fn definition FPs, ternary guard FPs, single-line
minification FP
- **Media Controls field test report** (session #30): MPRIS D-Bus
controller, src/ layout, 17 files / 5K lines — identified onDestroy()
cleanup recognition gap, provenance threshold too conservative, src/
metadata.json fallback missing
- **Calibration lessons #14-18** added to docs/internal/README.md
(compiled TypeScript patterns)
- **Development Workflow** section added to CLAUDE.md (issue→branch→PR
convention)
- **Repository Workflow** section added to CLAUDE.md

Closes #19

## Test plan

- [x] Documentation-only changes — no code affected
- [x] Field test reports follow existing template format

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@ZviBaratz ZviBaratz added ego-lint Related to ego-lint skill false-positive Rule fires incorrectly labels Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ego-lint Related to ego-lint skill false-positive Rule fires incorrectly

Projects

None yet

1 participant