feat(enrichment): deep-nesting / arrow-anti-pattern heuristic analyzer - #3498
feat(enrichment): deep-nesting / arrow-anti-pattern heuristic analyzer#3498bohdansolovie wants to merge 1 commit into
Conversation
Flags newly-added brace depth beyond a threshold in contiguous added lines. Syncs the REES analyzer name registry with hardcodedUrl, debugLeftover, and deepNesting. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-07-05 12:49:39 UTC
🛑 Suggested Action - Reject/Close
Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3498 +/- ##
=======================================
Coverage 93.06% 93.06%
=======================================
Files 300 300
Lines 31336 31336
Branches 11435 11435
=======================================
Hits 29164 29164
Misses 1517 1517
Partials 655 655
🚀 New features to boost your workflow:
|
|
Gittensory is closing this pull request on the maintainer's behalf (AI reviewers agree on a likely critical defect: review-enrichment/src/analyzers/deep-nesting.ts:69 counts every `{` via `advanceBraceDepth(codeOnly(body), run.depth)`, so an added nested object/config literal deeper than four levels will produce a deepNesting finding even though no control flow was introduced; change this to track control-flow constructs before opening braces or rename the analyzer/docs to the broader structural-brace behavior and add tests for object literals.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
Fixes #2030
DeepNestingFindingand a localdeepNestinganalyzer that flags newly-added open-brace depth exceeding a threshold (default 4) inside contiguous added-line runscodeOnly); reset on context/removed lines; cap at 25 findings; skip test pathssrc/review/enrichment-analyzer-names.tswith the enrichment registry (hardcodedUrl,debugLeftover,deepNesting)review-enrichment/test/deep-nesting.test.tscovering over-threshold vs shallow blocks, custom maxDepth, context-line reset, cap, and brief renderingTest plan
cd review-enrichment && npm run build && npm run metadata && node --test test/deep-nesting.test.ts test/analyzer-registry.test.tsvalidate-codeMade with Cursor