Skip to content

Fix #266: dedupe relaxed ESLint overrides#605

Merged
flyingrobots merged 3 commits into
mainfrom
fix-266-eslint-relaxed-duplicates
Jun 3, 2026
Merged

Fix #266: dedupe relaxed ESLint overrides#605
flyingrobots merged 3 commits into
mainfrom
fix-266-eslint-relaxed-duplicates

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Jun 3, 2026

Copy link
Copy Markdown
Member

Summary

  • remove duplicate file entries from relaxed ESLint complexity override blocks
  • add a TypeScript-AST config-shape guard that rejects duplicate file globs inside one override block
  • keep the relaxed override behavior intact while preventing stale duplicate entries from returning

Closes #266

Validation

  • npm exec vitest run test/unit/scripts/eslint-relaxed-complexity-shape.test.ts
  • npm run lint
  • npm run typecheck:test
  • pre-push IRONCLAD gates 0-7 passed with WARP_QUICK_PUSH=1

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated ESLint configuration file allowlist to improve module categorization and removed a duplicate entry.
  • Tests

    • Added validation test to prevent duplicate file entries in ESLint configuration, improving code quality consistency.

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@flyingrobots, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 22 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ab922e4e-b84f-4fa4-a10b-9a7d9286edb0

📥 Commits

Reviewing files that changed from the base of the PR and between 3a7ba5f and 6a149a1.

📒 Files selected for processing (1)
  • test/unit/scripts/eslint-override-files-shape.test.ts
📝 Walkthrough

Walkthrough

This PR audits and cleans the ESLint relaxed-complexity allowlist in eslint.config.ts, replacing stale module references with active patch/materialize controllers and CLI entrypoints, removes a duplicate JoinReducer entry, and adds a test to prevent future duplicates in the configuration.

Changes

ESLint Relaxed-Complexity Allowlist Audit

Layer / File(s) Summary
Algorithm-heavy and CLI allowlist updates
eslint.config.ts
In the algorithm-heavy modules allowlist (lines 366–377), replaced stale src/domain/services/controllers/*, query, and sync-related entries with patch/materialize controllers, checkpoint state helpers, and message codec/detector modules. Updated the CLI allowlist (lines 475–478) by removing bin/warp-graph.ts and adding bin/cli/infrastructure.ts, bin/cli/shared.ts, and command entrypoints (info, materialize, verify, trust, seek, patch, tree, bisect). Removed a duplicate src/domain/services/JoinReducer.ts entry from the JoinReducer override block (line 715).
Duplicate detection test
test/unit/scripts/eslint-relaxed-complexity-shape.test.ts
Added a Vitest unit test that reads and parses eslint.config.ts using the TypeScript compiler API, extracts all string literals from files array properties across each override block, computes per-array duplicates via Set intersection, and asserts the duplicate list is empty to prevent future configuration drift.

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 The config's now clean, no paths repeat,
A test guards duplicates in defeat,
Stale modules trimmed with CLI commands neat,
ESLint rules make the codebase complete!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly references issue #266 and accurately summarizes the main change: deduplicating ESLint overrides.
Description check ✅ Passed The PR description includes a clear summary, closes the linked issue, provides a comprehensive validation plan, but the 'ADR checks' section from the template is entirely omitted.
Linked Issues check ✅ Passed The PR addresses #266 by removing duplicates from ESLint overrides and adding a guard to prevent future duplicates, directly meeting the audit and cleanup objectives.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing #266: deduplicating ESLint configuration and adding test coverage for preventing duplicates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-266-eslint-relaxed-duplicates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 18.0.0
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v18.0.0, release workflow will publish.

@flyingrobots

Copy link
Copy Markdown
Member Author

Code Lawyer Findings

@codex please confirm this review posture.

Severity File Lines Type Issue Recommended mitigation prompt
P3 Medium test/unit/scripts/eslint-relaxed-complexity-shape.test.ts L25-L64 Test witness robustness The test is named as if it only audits relaxed-complexity overrides, but it inspects every ESLint files override block. It also silently filters out non-string files entries, making the duplicate witness incomplete if a future override uses a nonliteral pattern. Rename the witness to eslint-override-files-shape.test.ts, update the describe text to match the whole override-files contract, add a regression test proving nonliteral files entries are rejected, and make collectFilesArrays throw instead of silently skipping non-string AST elements.

@flyingrobots

Copy link
Copy Markdown
Member Author

Code Lawyer Activity Summary

@codex please confirm this closure.

Source Severity File Lines Issue Commit Outcome
Self P3 Medium test/unit/scripts/eslint-relaxed-complexity-shape.test.ts L25-L64 Witness name was narrower than behavior, and AST collector silently skipped nonliteral files entries. 6a149a1c Renamed the witness to eslint-override-files-shape.test.ts, updated describe text, added a RED/GREEN nonliteral-entry regression, and made the collector throw on unsupported file entries.

Validation:

  • RED: npm exec vitest run test/unit/scripts/eslint-relaxed-complexity-shape.test.ts failed because the collector did not throw for [dynamicPattern].
  • GREEN: npm exec vitest run test/unit/scripts/eslint-override-files-shape.test.ts
  • npm run typecheck:test
  • npm run lint -- test/unit/scripts/eslint-override-files-shape.test.ts
  • git diff --check
  • WARP_QUICK_PUSH=1 git push static pre-push gates 0-7 passed; unit gate intentionally skipped by quick mode.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 18.0.0
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v18.0.0, release workflow will publish.

@flyingrobots flyingrobots merged commit 5488117 into main Jun 3, 2026
17 checks passed
@flyingrobots flyingrobots deleted the fix-266-eslint-relaxed-duplicates branch June 3, 2026 22:11
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.

ESLint relaxed-complexity overrides may contain stale entries

1 participant