Skip to content

docs(topology): retain eslint with benchmark evidence (sc-1678) - #398

Open
norvalbv wants to merge 1 commit into
mainfrom
codex/sc-1678-topology-guard-benchmark
Open

docs(topology): retain eslint with benchmark evidence (sc-1678)#398
norvalbv wants to merge 1 commit into
mainfrom
codex/sc-1678-topology-guard-benchmark

Conversation

@norvalbv

Copy link
Copy Markdown
Owner

Summary

  • benchmark a dependency-free filesystem walker against Devkit's incumbent ESLint topology gate on disposable fixtures
  • preserve the full coverage accounting: generic placement/ignore behavior, import walls, illegal empty directories, and Electron's six hand-written folder trees
  • retain ESLint because the faster candidate does not yet preserve the incumbent policy surface
  • record the prior-art and pre-implementation critique alongside raw 20-sample evidence

Decision

The direct walker is materially cheaper, but this PR deliberately makes no runtime change. On Node 24.19.0 it reduced median CPU by 75.5% on the clean lane and 76.0% on the placement lane, with median tree RSS down 31.8% and 31.7%. It still misses three required responsibilities:

  1. Electron renderer/main/shared/preload/socket/vercel folder trees are hand-written in the ESLint preset and are not represented in guard config.
  2. Electron import walls require parsed/resolved imports.
  3. Illegal empty directories are observable by the current filesystem-aware ESLint plugin but not by the candidate's file-only walk.

The ignored-directory fixture now uses an invalid selected .ts file, so the zero-diagnostic result proves actual ignore semantics rather than extension non-selection.

Benchmark

Lane Current ESLint median CPU Direct walker median CPU CPU delta RSS delta
Clean 490 ms 120 ms -75.5% -31.8%
Placement 500 ms 120 ms -76.0% -31.7%

Method: Node 24.19.0, 3 discarded warm-ups, 20 measured samples per lane, fresh disposable fixture roots, wall/CPU/process-tree RSS captured in raw results.json.

Validation

  • benchmark result assertions
  • all benchmark scripts pass node --check
  • ignored .ts directory parity verified
  • decision-record checker
  • bun run lint
  • bun run typecheck
  • bun run lint:structure
  • git diff --check
  • GitNexus staged change analysis: LOW, documentation/evidence only

Shortcut: sc-1678

## Summary

- benchmark a dependency-free filesystem walker against Devkit's incumbent ESLint topology gate on disposable fixtures
- preserve the full coverage accounting: generic placement/ignore behavior, import walls, illegal empty directories, and Electron's six hand-written folder trees
- retain ESLint because the faster candidate does not yet preserve the incumbent policy surface
- record the prior-art and pre-implementation critique alongside raw 20-sample evidence

## Decision

The direct walker is materially cheaper, but this PR deliberately makes no runtime change. On Node 24.19.0 it reduced median CPU by 75.5% on the clean lane and 76.0% on the placement lane, with median tree RSS down 31.8% and 31.7%. It still misses three required responsibilities:

1. Electron renderer/main/shared/preload/socket/vercel folder trees are hand-written in the ESLint preset and are not represented in guard config.
2. Electron import walls require parsed/resolved imports.
3. Illegal empty directories are observable by the current filesystem-aware ESLint plugin but not by the candidate's file-only walk.

The ignored-directory fixture now uses an invalid selected `.ts` file, so the zero-diagnostic result proves actual ignore semantics rather than extension non-selection.

## Benchmark

| Lane | Current ESLint median CPU | Direct walker median CPU | CPU delta | RSS delta |
| --- | ---: | ---: | ---: | ---: |
| Clean | 490 ms | 120 ms | -75.5% | -31.8% |
| Placement | 500 ms | 120 ms | -76.0% | -31.7% |

Method: Node 24.19.0, 3 discarded warm-ups, 20 measured samples per lane, fresh disposable fixture roots, wall/CPU/process-tree RSS captured in raw `results.json`.

## Validation

- benchmark result assertions
- all benchmark scripts pass `node --check`
- ignored `.ts` directory parity verified
- decision-record checker
- `bun run lint`
- `bun run typecheck`
- `bun run lint:structure`
- `git diff --check`
- GitNexus staged change analysis: LOW, documentation/evidence only

Shortcut: sc-1678
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@norvalbv, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f40b34b-85b6-4107-94f3-6f1916cec457

📥 Commits

Reviewing files that changed from the base of the PR and between 4d624d0 and 996f3ad.

📒 Files selected for processing (8)
  • docs/benchmarks/experiments/2026-08-16-topology-guard/README.md
  • docs/benchmarks/experiments/2026-08-16-topology-guard/benchmark.mjs
  • docs/benchmarks/experiments/2026-08-16-topology-guard/candidate.mjs
  • docs/benchmarks/experiments/2026-08-16-topology-guard/feature-critique.md
  • docs/benchmarks/experiments/2026-08-16-topology-guard/fixture.mjs
  • docs/benchmarks/experiments/2026-08-16-topology-guard/import-wall-current.mjs
  • docs/benchmarks/experiments/2026-08-16-topology-guard/results.json
  • docs/decisions/oxc-toolchain-migration.md

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.

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.

1 participant