Skip to content

Update README.md - #171

Closed
lyonzin wants to merge 1 commit into
masterfrom
lyonzin-patch-1
Closed

Update README.md#171
lyonzin wants to merge 1 commit into
masterfrom
lyonzin-patch-1

Conversation

@lyonzin

@lyonzin lyonzin commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #

Type of change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • refactor — no behavior change
  • perf — performance improvement
  • test — adding or improving tests
  • chore — tooling, deps, CI
  • BREAKING CHANGE (explain in Migration section below)

What changed

Why


7 Pillars Quality Gate

Mark each item. CI enforces these via the quality-gate.yml workflow.

1. Security

  • No new secrets, tokens, or credentials in the diff (gitleaks will block)
  • No new use of eval, exec, subprocess shell=True, pickle.loads on untrusted input, or arbitrary deserialization
  • New dependencies (if any) reviewed for known CVEs and license compatibility
  • Path traversal, command injection, and SSRF surfaces explicitly considered for any new I/O code

2. Stability

  • All existing tests still pass on Linux + Windows × Python 3.11/3.12
  • New behavior covered by tests; tests are deterministic (no time.sleep / network / OS-scheduler dependencies)
  • Coverage does not regress (codecov gate)
  • No tests were skipped, deleted, or marked xfail to make the PR pass

3. Memory leak

  • Long-lived objects (orchestrator, watcher, cache) are bounded
  • New caches have eviction policy (LRU, TTL, or explicit size limit)
  • No new global state that grows unbounded with usage
  • If you added a new module that loads heavy resources, consider lazy initialization

4. Versatility

  • Works on Linux, Windows, macOS (paths, line endings, locale considered)
  • Works on Python 3.11, 3.12, 3.13 (no Python-version-specific syntax without fallback)
  • No hardcoded paths, locales, or encodings (use pathlib.Path, encoding="utf-8" explicit)
  • If you touched a parser, all 20 supported formats still parse correctly

5. Scalability

  • No O(n²) or worse algorithms on user-controlled inputs
  • Benchmark impact considered (run pytest bench/ locally if you touched search/index/embed)
  • If perf regression > 10% in any metric, justification provided below
  • Concurrency safety: no new shared mutable state without lock or documented thread confinement

Performance impact (required if you touched mcp_server/server.py, mcp_server/ingestion.py, or bench/):

metric          before    after    delta
search p95      ___ ms    ___ ms   ___%
index docs/sec  ___       ___      ___%
RSS @ 1k docs   ___ MB    ___ MB   ___%

6. Versioning

  • If this is user-facing change: bumped version in pyproject.toml, mcp_server/__init__.py, and npm/package.json atomically
  • If this is a breaking change: bumped MAJOR, added migration notes in CHANGELOG, marked BREAKING CHANGE: in commit footer
  • CHANGELOG updated with entry under ## Unreleased in README.md
  • Public API surface (mcp_server/server.py MCP tool decorators) unchanged, OR breaking changes documented

7. Quality

  • ruff check passes
  • ruff format --check passes
  • Type hints on new public functions (mypy --strict clean for new files)
  • Docstrings on new public functions (used by interrogate)
  • Cyclomatic complexity reasonable (radon cc --max=C)
  • No dead code (vulture would not flag new code)
  • PR is reasonably sized (< 500 lines of diff preferred; bigger PRs split or justify)

Migration / Breaking changes

N/A

Test plan

  • pytest tests/ -v passed locally
  • pre-commit run --all-files clean
  • Manual smoke test:

Documentation

  • Updated README.md (if user-facing)
  • Updated docs/ (if applicable)
  • Added entry to ## Unreleased in README CHANGELOG section

Reviewer checklist

  • Reviewed line-by-line
  • Verified the 7 pillars CI status checks are green
  • Verified no obvious adversarial implications
  • Approved performance impact

By submitting this PR I confirm I read CONTRIBUTING.md and agree to the Code of Conduct.

Greptile Summary

The PR updates one lexical-query example in the README's explanation of hybrid_alpha.

  • Replaces MDR-AD002 with C2-CLOUDFLARE.
  • The replacement does not satisfy the default lexical-routing patterns, making the documented behavior inaccurate.

Confidence Score: 4/5

The inaccurate routing example should be corrected before merging because it reverses the documented behavior of hybrid_alpha for that query.

Under the default patterns, C2-CLOUDFLARE does not trigger lexical routing, so auto search uses the hybrid pipeline despite the README claiming otherwise.

Files Needing Attention: README.md

Important Files Changed

Filename Overview
README.md Replaces a valid lexical-routing example with an identifier that the default QueryRouter classifies as semantic.

Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
README.md:421
**Lexical routing example is invalid**

When `C2-CLOUDFLARE` is submitted with `search_method="auto"`, it matches none of the default lexical patterns and is classified as semantic, so the hybrid pipeline consults `hybrid_alpha` despite the README claiming that the FTS5 fast path fires.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "Update README.md" | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 6 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: f75a6c0e-2641-45c1-ac02-d93f7e5c81a2

📥 Commits

Reviewing files that changed from the base of the PR and between 3f91f7b and 34b488d.

📒 Files selected for processing (1)
  • README.md

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

Comment thread README.md
### hybrid_alpha Parameter Effect

`hybrid_alpha` weights RRF fusion between semantic and BM25 rankings on the **hybrid pipeline only**. When `search_method="auto"` and the QueryRouter classifies the query as lexical (e.g. `CVE-2021-4034`, `MDR-AD002`, `T1078.001`, file hashes), the FTS5 fast-path fires and `hybrid_alpha` is not consulted — FTS5 uses SQLite's native `bm25()` scoring exclusively. Pass `search_method="hybrid"` to force RRF fusion + rerank on every query if you want deterministic hybrid semantics regardless of the query shape.
`hybrid_alpha` weights RRF fusion between semantic and BM25 rankings on the **hybrid pipeline only**. When `search_method="auto"` and the QueryRouter classifies the query as lexical (e.g. `CVE-2021-4034`, `C2-CLOUDFLARE`, `T1078.001`, file hashes), the FTS5 fast-path fires and `hybrid_alpha` is not consulted — FTS5 uses SQLite's native `bm25()` scoring exclusively. Pass `search_method="hybrid"` to force RRF fusion + rerank on every query if you want deterministic hybrid semantics regardless of the query shape.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Lexical routing example is invalid

When C2-CLOUDFLARE is submitted with search_method="auto", it matches none of the default lexical patterns and is classified as semantic, so the hybrid pipeline consults hybrid_alpha despite the README claiming that the FTS5 fast path fires.

Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 421

Comment:
**Lexical routing example is invalid**

When `C2-CLOUDFLARE` is submitted with `search_method="auto"`, it matches none of the default lexical patterns and is classified as semantic, so the hybrid pipeline consults `hybrid_alpha` despite the README claiming that the FTS5 fast path fires.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code

@lyonzin lyonzin closed this Aug 11, 2026
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