Skip to content

feat: Rule Coverage Analyzer, Inline Annotations, Heuristic Detection, Rollback System - #258

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
portableDD:feature/issues-235-236-237-238
Apr 26, 2026
Merged

feat: Rule Coverage Analyzer, Inline Annotations, Heuristic Detection, Rollback System#258
mijinummi merged 1 commit into
MDTechLabs:mainfrom
portableDD:feature/issues-235-236-237-238

Conversation

@portableDD

Copy link
Copy Markdown
Contributor

Summary

This PR implements four features assigned to @portableDD.

Closes #235
Closes #236
Closes #237
Closes #238


#235 – Rule Coverage Analyzer (src/analysis/coverage/)

  • RuleCoverageAnalyzer walks the AST, tracks which nodes were touched by rules, and reports coveragePercent plus a list of uncovered patterns.

#236 – Inline Code Annotation Output (src/reporting/annotator/, packages/cli/)

  • annotateSource inserts inline comments at specified line numbers.
  • annotateFile reads a file, annotates it, and writes the result to disk.
  • New CLI command gasguard annotate <file> exposes this to end users.

#237 – Heuristic-Based Pattern Detection (src/analysis/heuristics/)

  • HeuristicEngine runs configurable weighted-signal patterns against source code.
  • Ships three built-in patterns: inefficient-loop, redundant-storage-write, large-data-on-chain.

#238 – Auto-Fix Rollback System (src/auto-fix/rollback/)

  • RollbackManager (Rust) records applied fixes with their original content and supports rollback_last() and rollback_by_id().
  • Includes unit tests covering record, rollback-last, rollback-by-id, and unknown-id edge case.

…MDTechLabs#238

- MDTechLabs#235: Add RuleCoverageAnalyzer to track AST node coverage and report uncovered patterns (src/analysis/coverage/)
- MDTechLabs#236: Add inline code annotation output with annotateSource/annotateFile helpers (src/reporting/annotator/) and CLI annotate command (packages/cli/src/commands/annotate.ts)
- MDTechLabs#237: Add HeuristicEngine for signal-based pattern detection beyond static rules (src/analysis/heuristics/)
- MDTechLabs#238: Add RollbackManager in Rust to track applied fixes and enable safe revert (src/auto-fix/rollback/)
@drips-wave

drips-wave Bot commented Apr 26, 2026

Copy link
Copy Markdown

@portableDD Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mijinummi
mijinummi merged commit 7094625 into MDTechLabs:main Apr 26, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔄 Auto-Fix Rollback System 🧠 Heuristic-Based Pattern Detection 🔍 Inline Code Annotation Output 📊 Rule Coverage Analyzer

2 participants