Skip to content

Speed up inspect and refresh Windows benchmarks#151

Merged
lzehrung merged 1 commit into
mainfrom
agent/speed-up-inspect-and-refresh-benchmarks
Jul 11, 2026
Merged

Speed up inspect and refresh Windows benchmarks#151
lzehrung merged 1 commit into
mainfrom
agent/speed-up-inspect-and-refresh-benchmarks

Conversation

@lzehrung

Copy link
Copy Markdown
Owner

Summary

  • make inspect duplicate analysis opt-in with --duplicates and report duplicates.enabled
  • auto-enable the existing native-worker policy for inspect scans with at least 250 files
  • make npm run bench:docs regenerate the checked JSON and README table directly
  • replace the stale WSL benchmark artifact with current Windows results and clarify that the direct-read baseline is not equivalent work

Why

inspect always paid for duplicate extraction and candidate scoring even when callers only needed architecture summaries. It also missed the automatic native-worker policy already used by agent sessions.

The checked documentation benchmark required a manual promotion step and still described an older WSL checkout, which made regeneration and interpretation unclear.

Impact

On this checkout, the warm-disk inspect median improved from 11,515 ms to 7,505 ms when duplicate analysis became opt-in, then to 6,065 ms with automatic workers: about 47% overall.

Duplicate summaries remain available through inspect --duplicates and the dedicated duplicates command. Default inspect JSON now reports { "duplicates": { "enabled": false } }.

The regenerated Windows documentation benchmark reports cold one-shot explore medians of 461-523 ms with complete evidence anchors.

Validation

  • npm run test:integration: 130 tests passed
  • targeted CLI and AgentSession suites: 170 tests passed
  • public benchmark harness: 23 tests passed
  • npm run bench:docs:check
  • git diff --check
  • npm run check: lint, format, and build passed; the full test stage remains red on 24 Windows path/permission expectations outside this diff

@lzehrung lzehrung marked this pull request as ready for review July 11, 2026 16:12
@kilo-code-bot

kilo-code-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (11 files)
  • src/cli/inspect.ts — opt-in duplicates, auto-native-worker threshold
  • src/cli/options.ts--duplicates flag schema and CLI value option handling
  • src/agent/session.ts — exported NATIVE_WORKER_AUTO_FILE_THRESHOLD
  • src/cli/help.ts — help text updates
  • tests/cli-command-modules.test.ts — native worker threshold test
  • tests/cli-regressions.test.ts — updated inspect assertions for new duplicates shape
  • docs/cli.md — updated inspect command docs
  • codegraph-skill/codegraph/SKILL.md — added --duplicates note
  • docs/benchmarks/README.md — regenerated benchmark docs
  • docs/benchmarks/results.example.json — regenerated benchmark results
  • package.json — updated bench:docs script

Reviewed by kimi-k2.6-20260420 · Input: 77.7K · Output: 12.1K · Cached: 210.9K

@lzehrung lzehrung merged commit 737ee3f into main Jul 11, 2026
2 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.

1 participant