Repository Analysis

yvgude/lean-ctx

Control what your AI can see. LeanCTX (Lean Context) is the context intelligence layer for AI agents — one local Rust binary that decides what they read, remembers what they learn, guards what they touch, and proves what they save. 60–90% fewer tokens as the receipt. 76 MCP tools, 30+ agents, local-first.

4.5 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of yvgude/lean-ctx, a Rust project with 3,551 GitHub stars. SynthScan v2.0 examined 768,169 lines of code across 2823 source files, recording 2165 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 4.5 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

4.5
Adjusted Score
4.5
Raw Score
100%
Time Factor
2026-08-08
Last Push
3.6K
Stars
Rust
Language
768.2K
Lines of Code
2.8K
Files
2.2K
Pattern Hits
2026-08-09
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 4HIGH 7MEDIUM 573LOW 1581

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2165 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators465 hits · 1378 pts
SeverityFileLineSnippetContext
MEDIUMbenchmark/run_benchmark.sh23# ═══════════════════════════════════════════════════════COMMENT
MEDIUMbenchmark/run_benchmark.sh26# ═══════════════════════════════════════════════════════COMMENT
MEDIUMbenchmark/run_benchmark.sh86# ═══════════════════════════════════════════════════════COMMENT
MEDIUMbenchmark/run_benchmark.sh89# ═══════════════════════════════════════════════════════COMMENT
MEDIUMbenchmark/run_benchmark.sh125# ═══════════════════════════════════════════════════════COMMENT
MEDIUMbenchmark/run_benchmark.sh127# ═══════════════════════════════════════════════════════COMMENT
MEDIUMbenchmark/run_benchmark.sh135# ═══════════════════════════════════════════════════════COMMENT
MEDIUMbenchmark/run_benchmark.sh137# ═══════════════════════════════════════════════════════COMMENT
MEDIUMbenchmark/run_benchmark.sh143# ═══════════════════════════════════════════════════════COMMENT
MEDIUMbenchmark/run_benchmark.sh145# ═══════════════════════════════════════════════════════COMMENT
MEDIUMrust/tests/compliance_frameworks.rs32// ── meta: mapping ↔ test drift guard ─────────────────────────────────────────COMMENT
MEDIUMrust/tests/compliance_frameworks.rs51// ── AC 1: EU AI Act reference report ─────────────────────────────────────────COMMENT
MEDIUMrust/tests/compliance_frameworks.rs78// ── EU AI Act — full-coverage proofs ─────────────────────────────────────────COMMENT
MEDIUMrust/tests/compliance_frameworks.rs328// ── ISO 42001 — full-coverage proofs ─────────────────────────────────────────COMMENT
MEDIUMrust/tests/compliance_frameworks.rs382// ── SOC 2 — full-coverage proofs ─────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs738// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs740// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs749// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs751// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs17// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs21// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs129// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs131// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs150// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs154// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs223// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs226// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs248// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs252// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs320// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs324// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs390// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs395// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs463// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs467// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs498// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs503// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs539// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs543// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs566// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs568// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs585// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs589// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs644// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs646// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs686// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/ticket_fixes_scenarios.rs688// ──────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/outcome_pricing_e2e.rs79 // ── 1 + 2. Real compression → measured savings → signed hash chain ────────COMMENT
MEDIUMrust/tests/outcome_pricing_e2e.rs108 // ── 3. Signed batch + OFFLINE verification + tamper check ─────────────────COMMENT
MEDIUMrust/tests/outcome_pricing_e2e.rs133 // ── 4. Frozen v1 source-integrity predicate ───────────────────────────────COMMENT
MEDIUMrust/tests/outcome_pricing_e2e.rs150 // ── 5. FOCUS FinOps export — savings as a Credit row ──────────────────────COMMENT
MEDIUMrust/tests/outcome_pricing_e2e.rs166 // ── teardown ──────────────────────────────────────────────────────────────COMMENT
MEDIUMrust/tests/power_user_worksession.rs97// ── Phase 1: Setup & Orientation ───────────────────────────COMMENT
MEDIUMrust/tests/power_user_worksession.rs152// ── Phase 2: Codebase Research (Read Modes) ────────────────COMMENT
MEDIUMrust/tests/power_user_worksession.rs341// ── Phase 3: Code Search ───────────────────────────────────COMMENT
MEDIUMrust/tests/power_user_worksession.rs386// ── Phase 4: Shell & Execution ─────────────────────────────COMMENT
MEDIUMrust/tests/power_user_worksession.rs434// ── Phase 5: Edit & Iteration ──────────────────────────────COMMENT
MEDIUMrust/tests/power_user_worksession.rs476// ── Phase 6: Context Management ────────────────────────────COMMENT
MEDIUMrust/tests/power_user_worksession.rs586// ── Phase 7: Knowledge & Session ───────────────────────────COMMENT
MEDIUMrust/tests/power_user_worksession.rs702// ── Phase 8: Multi-Agent Coordination ──────────────────────COMMENT
405 more matches not shown…
Over-Commented Block968 hits · 959 pts
SeverityFileLineSnippetContext
LOWinstall.sh1#!/bin/shCOMMENT
LOWclients/rust/lean-ctx-client/src/types.rs1//! Wire types for the lean-ctx `/v1` contract.COMMENT
LOWclients/rust/lean-ctx-client/src/types.rs61 /// Serialized tool arguments.COMMENT
LOWclients/rust/lean-ctx-client/src/types.rs101 /// Page size requested.COMMENT
LOWclients/rust/lean-ctx-client/src/types.rs121 /// Monotonic event id within the workspace/channel stream.COMMENT
LOWclients/rust/lean-ctx-client/src/ocla.rs21pub const MAX_OCLA_WIRE_BYTES: usize = 64 * 1024;COMMENT
LOWclients/rust/lean-ctx-client/src/ocla.rs41 /// Supported version.COMMENT
LOWclients/rust/lean-ctx-client/src/ocla.rs81#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize)]COMMENT
LOWclients/rust/lean-ctx-client/src/error.rs1//! Error types for the lean-ctx client.COMMENT
LOWclients/rust/lean-ctx-client/src/lib.rs1//! # lean-ctx-clientCOMMENT
LOWclients/rust/lean-ctx-client/src/lib.rs21//!COMMENT
LOWclients/rust/lean-ctx-client/src/lib.rs41//! - `GET /v1/context/summary`, `GET /v1/events/search`,COMMENT
LOWclients/rust/lean-ctx-client/src/lib.rs61//! This crate is deliberately small and decoupled. It is **not** a binding toCOMMENT
LOWclients/rust/lean-ctx-client/src/conformance.rs1//! Shared SDK conformance kit (EPIC 12.5, industrialized in GL #395).COMMENT
LOWclients/rust/lean-ctx-client/src/tool_text.rs1//! Flatten an MCP tool result into plain text.COMMENT
LOWbench/agent-task/r2/lean-ctx.toml1# Faithful R2 lean-ctx arm — engine config (config.toml).COMMENT
LOWbench/agent-task/r2/lean-ctx.toml21# surface, shrinking the other half of the injected prefix (the tool schemas).COMMENT
LOWlean/README.md1# LeanCtxProofsCOMMENT
LOWrust/Cargo.toml1# Workspace root. The SDK (Track A) is an opt-in member; `default-members` keepsCOMMENT
LOWrust/Cargo.toml261tree-sitter-solidity = { version = "1.2", optional = true }COMMENT
LOWrust/proptest-regressions/core/science_props.txt1# Seeds for failure cases proptest has generated in the past. It isCOMMENT
LOWrust/.config/nextest.toml1experimental = ["setup-scripts"]COMMENT
LOWrust/.config/nextest-tmpdir.sh1#!/usr/bin/env bashCOMMENT
LOWrust/crates/lean-ctx-sdk/src/error.rs1//! The SDK's own error type.COMMENT
LOWrust/crates/lean-ctx-sdk/src/error.rs21 /// The engine could not be constructed (e.g. the project root does notCOMMENT
LOWrust/crates/lean-ctx-sdk/src/lib.rs1//! # lean-ctx-sdk — in-process embedding façade (Track A)COMMENT
LOWrust/crates/lean-ctx-sdk/src/lib.rs21//! assert!(again.saved_tokens >= first.saved_tokens);COMMENT
LOWrust/crates/lean-ctx-sdk/src/read.rs1//! Read-mode selection — the SDK's stable mirror of the engine's `ctx_read`COMMENT
LOWrust/crates/lean-ctx-sdk/src/compress.rs1//! Shell/tool output compression — the same pattern engine the proxy andCOMMENT
LOWrust/crates/lean-ctx-sdk/src/engine.rs1//! The embedding [`Engine`] — a safe, ergonomic handle over the lean-ctxCOMMENT
LOWrust/crates/lean-ctx-sdk/src/engine.rs21//! [`EngineBuilder::build`] is read-mostly and scoped:COMMENT
LOWrust/crates/lean-ctx-sdk/src/engine.rs161 /// Start configuring an engine rooted at `project_root` (the `PathJail` root).COMMENT
LOWrust/crates/grammar-addons/lua/src/lib.rs1//! Lua grammar addon (#690): exports the Lua grammar's raw `LanguageFn`COMMENT
LOWrust/crates/lean-ctx-ocla/src/types.rs201/// Canonical, payload-free representation of a token decision at any engineCOMMENT
LOWrust/crates/lean-ctx-ocla/src/types.rs561 /// [INTERNAL] Whether the user accepted the result.COMMENT
LOWrust/crates/lean-ctx-ocla/src/types.rs621pub struct ExperimentStopConditions {COMMENT
LOWrust/crates/lean-ctx-ocla/src/types.rs701#[derive(Clone, Debug, Serialize, Deserialize)]COMMENT
LOWrust/crates/lean-ctx-ocla/src/types.rs761}COMMENT
LOWrust/crates/lean-ctx-ocla/src/types.rs781 pub relay_tokens_saved: u64,COMMENT
LOWrust/crates/lean-ctx-ocla/src/lib.rs1//! Open Context & Token Lifecycle Architecture (OCLA) — the stable contractCOMMENT
LOWrust/tests/compliance_frameworks.rs81/// data-dir env var, so they run inside ONE #[test] in a controlled order.COMMENT
LOWrust/tests/ticket_fixes_scenarios.rs1// Integration tests for all ticket fixes:COMMENT
LOWrust/tests/read_only_roots_e2e.rs1//! #475 end-to-end: a configured read-only root (`read_only_roots` /COMMENT
LOWrust/tests/outcome_pricing_e2e.rs1//! End-to-end "durchspielbar" proof for **Outcome-Based Pricing** (Epic #671).COMMENT
LOWrust/tests/tcc_sandbox.sh1#!/usr/bin/env bashCOMMENT
LOWrust/tests/gateway_postprocess_e2e.rs1//! End-to-end tests for deeper addon integration (#1102).COMMENT
LOWrust/tests/graph_provider_cold_open.rs1//! Regression: the first *cold* `open_or_build` on a fresh project must return aCOMMENT
LOWrust/tests/codex_proxy_554.rs1//! End-to-end regression for #554 / #597 / #603: `proxy enable` must treat the twoCOMMENT
LOWrust/tests/neuro_physics_scenarios.rs1//! Comprehensive scenario tests for the Neuro-Physics Hardening implementation.COMMENT
LOWrust/tests/issue_249_index_observability.rs1//! Regression test for issue #249 — "semantic index keeps warming up, neverCOMMENT
LOWrust/tests/ciso_great_filter_e2e.rs1//! End-to-end "durchspielbar" proof for **The Great Filter** (CISO product,COMMENT
LOWrust/tests/dropin_install_tests.rs1#![cfg(unix)]COMMENT
LOWrust/tests/xdg_legacy_contract.rs1//! Contract guard for GH #436: a marker-free legacy `~/.lean-ctx` (e.g. runtimeCOMMENT
LOWrust/tests/intensive_benchmarks.rs81 tok_compact < 2450,COMMENT
LOWrust/tests/intensive_benchmarks.rs141 // the live server advertises in full mode. Set with deliberate headroom overCOMMENT
LOWrust/tests/intensive_benchmarks.rs201 " Estimated cost @$3/1M input: ${:.4}",COMMENT
LOWrust/tests/intensive_benchmarks.rs221 // #290 the ceiling must carry "a tool or two" of slack over the actual, soCOMMENT
LOWrust/tests/suite/ctx_read_lmd_md_raw.rs1//! `.lmd.md` reads are raw — like any other file.COMMENT
LOWrust/tests/suite/config_path_parity_594.rs1//! End-to-end regression for GitHub #594:COMMENT
LOWrust/tests/suite/retrieval_eval.rs1//! Retrieval-quality eval harness for the spreading-activation ranker.COMMENT
908 more matches not shown…
Hyper-Verbose Identifiers269 hits · 329 pts
SeverityFileLineSnippetContext
LOWclients/python/tests/test_ocla_wire.py71def test_public_token_and_agent_fixtures_verify() -> None:CODE
LOWclients/python/tests/test_ocla_wire.py81def test_gateway_policy_is_separate_from_wire_integrity() -> None:CODE
LOWclients/python/tests/test_ocla_wire.py107def test_token_decoder_fails_closed(wire: bytes) -> None:CODE
LOWclients/python/tests/test_ocla_wire.py121def test_agent_lineage_identity_budget_and_unknown_fields_fail_closed() -> None:CODE
LOWclients/python/tests/test_ocla_wire.py141def test_wrong_wire_kind_is_rejected() -> None:CODE
LOWclients/python/tests/test_conformance_live.py23def test_live_conformance_all_checks_pass() -> None:CODE
LOWclients/python/tests/test_ocla_package.py54def test_built_wheel_is_dependency_free_and_console_entrypoint_runs(CODE
LOWclients/python/tests/test_adapters_live.py60def test_openai_adapter_live_round_trip(client: LeanCtxClient, smoke_tool: str) -> None:CODE
LOWclients/python/tests/test_adapters_live.py73def test_langchain_adapter_live_round_trip(CODE
LOWclients/python/tests/test_adapters_live.py82def test_llamaindex_adapter_live_round_trip(CODE
LOWclients/python/tests/test_adapters_live.py93def test_crewai_adapter_live_round_trip(CODE
LOWclients/python/tests/test_adapters_live.py102def test_adapter_specs_cover_full_manifest(client: LeanCtxClient) -> None:CODE
LOWclients/python/tests/test_adapters.py85def test_to_openai_tools_shape(client: Tuple[LeanCtxClient, HTTPServer]) -> None:CODE
LOWclients/python/tests/test_adapters.py93def test_run_openai_tool_call_dict_and_object(client: Tuple[LeanCtxClient, HTTPServer]) -> None:CODE
LOWclients/python/tests/test_client.py88def test_capabilities_and_openapi(server: Tuple[str, HTTPServer]) -> None:CODE
LOWclients/python/tests/test_client.py106def test_call_tool_forwards_args_and_workspace(server: Tuple[str, HTTPServer]) -> None:CODE
LOWclients/python/tests/test_ocla_cli.py28def test_cli_accepts_public_fixtures_without_identifiers_in_output() -> None:CODE
LOWclients/python/tests/test_ocla_cli.py41def test_cli_rejection_is_content_free() -> None:CODE
LOWclients/python/tests/test_ocla_cli.py52def test_cli_rejects_lone_unicode_surrogate_without_traceback(CODE
LOWclients/python/tests/test_ocla_cli.py75def test_cli_rejects_bounded_parser_failures_without_traceback(CODE
LOWclients/python/tests/test_ocla_cli.py89def test_cli_rejects_fifo_without_open_block(tmp_path: Path) -> None:CODE
LOWclients/python/tests/test_ocla_cli.py98def test_cli_rejects_symlink_and_special_file(tmp_path: Path) -> None:CODE
LOWclients/python/tests/test_ocla_cli.py107def test_cli_argument_errors_are_stable_and_content_free() -> None:CODE
LOWclients/python/tests/test_conformance.py111def test_conformance_passes_against_valid_server() -> None:CODE
LOWclients/python/tests/test_conformance.py121def test_conformance_flags_malformed_capabilities() -> None:CODE
LOWclients/python/tests/test_conformance.py133def test_route_coverage_catches_endpoint_drift() -> None:CODE
LOWclients/python/leanctx/ocla.py426def decode_canonical_token_envelope(wire: bytes) -> CanonicalTokenEnvelopeV1:CODE
LOWclients/python/leanctx/ocla.py524def verify_agent_gateway_admissibility(envelope: AgentEnvelopeV1) -> None:CODE
LOWpython-sdk/tests/test_client.py42def test_health_and_capabilities() -> None:CODE
LOWpython-sdk/tests/test_client.py71def test_validate_envelope_and_ledger_summary() -> None:CODE
LOWpython-sdk/tests/test_client.py168def test_envelope_payload_models_validate_and_round_trip() -> None:CODE
LOWpython-sdk/tests/test_client.py182def test_stream_events_parses_multiple_events() -> None:CODE
LOWpython-sdk/tests/test_client.py209def test_stream_envelopes_yields_envelope_events_only() -> None:CODE
LOWrust/src/dashboard/static/components/cockpit-live.js396function buildExpandedCompressionDetail(kind) {CODE
LOWtests/security/test_verify_release_integrity.py47 def test_valid_manifest_and_artifacts_verify(self):CODE
LOWtests/security/test_verify_release_integrity.py52 def test_manifest_schema_validation_rejects_unknown_field(self):CODE
LOWtests/security/test_verify_release_integrity.py58 def test_artifact_digest_mismatch_fails(self):CODE
LOWtests/security/test_verify_release_integrity.py64 def test_checksum_parser_handles_gnu_format_and_rejects_paths(self):CODE
LOWtests/security/test_verify_release_integrity.py71 def test_sbom_parser_returns_package_and_license(self):CODE
LOWtests/security/test_verify_release_integrity.py77 def test_download_uses_http_and_fetches_checksum_listed_artifacts(self):CODE
LOWtests/security/test_generate_audit_report.py38 def test_summarize_output_format(self):CODE
LOWtests/security/test_generate_audit_report.py44 def test_markdown_renders_categories_and_next_run(self):CODE
LOWtests/security/test_generate_audit_report.py51 def test_baseline_comparison_detects_new_findings(self):CODE
LOWtests/security/test_generate_audit_report.py58 def test_baseline_comparison_accepts_existing_finding(self):CODE
LOWtests/security/test_generate_audit_report.py69 def test_history_reads_inline_fixture_reports(self):CODE
LOWtests/security/test_history_policy_gate.py73 def test_full_audit_is_bounded_and_redacted(self):CODE
LOWtests/security/test_history_policy_gate.py85 def test_clean_current_and_delta_pass(self):CODE
LOWtests/security/test_history_policy_gate.py89 def test_current_and_delta_secret_fail_closed(self):CODE
LOWtests/security/test_history_policy_gate.py97 def test_current_and_delta_private_path_fail_closed(self):CODE
LOWtests/security/test_history_policy_gate.py104 def test_missing_or_modified_baseline_fails(self):CODE
LOWtests/security/test_history_policy_gate.py112 def test_unreachable_baseline_fails(self):CODE
LOWtests/security/test_history_policy_gate.py117 def test_present_non_ancestor_baseline_is_accepted(self):CODE
LOWtests/security/test_history_policy_gate.py134 def test_pr_base_current_findings_are_inherited(self):CODE
LOWtests/security/test_history_policy_gate.py153 def test_policy_rule_drift_fails(self):CODE
LOWtests/security/test_history_policy_gate.py160 def test_scanner_version_drift_fails(self):CODE
LOWtests/security/test_history_policy_gate.py168 def test_scanner_source_drift_fails(self):CODE
LOWtests/security/test_history_policy_gate.py173 def test_scanner_source_path_hash_set_drift_fails(self):CODE
LOWtests/security/test_history_policy_gate.py187 def test_baseline_report_symlink_fails(self):CODE
LOWtests/security/test_history_policy_gate.py195 def test_policy_fingerprint_mismatch_fails(self):CODE
LOWtests/security/test_history_policy_gate.py239 def test_edit_baselined_secret_path_still_passes(self):CODE
209 more matches not shown…
Modern AI Meta-Vocabulary54 hits · 157 pts
SeverityFileLineSnippetContext
MEDIUMCHANGELOG.md5559- **VS Code / Cursor extension, now publishable** (community feedback): the editor extension is consolidated into a singCODE
MEDIUMbench/research/agent-4-systems-engineering.md71- Even with 90% billing discount, **cached schemas still occupy context slots** — MCP issue [#2808](https://github.com/mCODE
MEDIUMbench/lifecycle/lanes/terraform.json23 "internal/policy/callback/baseline_v3_deferred_test.go": "package callback\n\nimport (\n\t\"context\"\n\t\"testing\"CODE
MEDIUMrust/crates/lean-ctx-sdk/src/lib.rs43//! - [`addon`] — author + statically audit addons in-process (scaffold, audit,COMMENT
MEDIUMrust/crates/lean-ctx-sdk/src/addon.rs4//! ships its capabilities as an addon) needs: scaffold a manifest, then run theCOMMENT
MEDIUMrust/src/core/input_filters/mod.rs6//! checksum guardrails against false positives;COMMENT
MEDIUMrust/src/core/input_filters/pii.rs1//! PII detection with checksum guardrails (GL #675).COMMENT
MEDIUMrust/src/core/input_filters/pii.rs131/// This preserves the checksum guardrails for invalid cards, IBANs, and AHV IDs.COMMENT
MEDIUMrust/src/core/addons/mod.rs19//! - [`scaffold`] — `addon init` starter manifest generator (DX, P4).COMMENT
MEDIUMrust/src/core/addons/trust.rs114/// Used by the `addon init` scaffold to pick capabilities that don't silentlyCOMMENT
MEDIUMrust/src/core/addons/scaffold.rs7//! to end on a fresh scaffold.COMMENT
MEDIUMrust/src/core/addons/scaffold.rs21/// gets `network = full` + `filesystem = read_write` so the scaffold is notCOMMENT
MEDIUMrust/src/core/addons/scaffold.rs23/// scaffold keeps the secure-by-default profile for a local binary.COMMENT
MEDIUMrust/src/core/addons/scaffold.rs173 // GH #1079: an `addon init --command "npx -y pkg@1.2.3"` scaffold mustCOMMENT
MEDIUMrust/src/core/addons/scaffold.rs173 // GH #1079: an `addon init --command "npx -y pkg@1.2.3"` scaffold mustCOMMENT
MEDIUMrust/src/core/extractive/tests.rs147/// `#[ignore]`d (needs the embedding model + is slow); reproduce with:COMMENT
MEDIUMrust/src/core/extractive/tests.rs152#[ignore = "benchmark; needs the embedding model; run with --ignored --nocapture"]COMMENT
MEDIUMrust/src/proxy/compress.rs67/// remote gateway whose agentic loop scans for `hash=<24hex>` (#702).COMMENT
MEDIUMrust/src/proxy/compress.rs591 /// shape, the CCR agentic loop silently stops firing — this test failsCOMMENT
MEDIUMrust/src/proxy/compress_api.rs9//! guardrail resolves through `GET /v1/retrieve/{hash}` — the CCR agentic loopCOMMENT
MEDIUMrust/src/proxy/compress_api.rs297 /// guardrail's CCR agentic loop.COMMENT
MEDIUMrust/src/shell/agent_wrapper.rs18//! The leading scaffold (`source`/`shopt`/`setopt`) and any `< /dev/null` areCOMMENT
MEDIUMrust/src/shell/agent_wrapper.rs41//! requires `eval` AND host scaffold markers (`setopt NO_EXTENDED_GLOB` /COMMENT
MEDIUMrust/src/shell/agent_wrapper.rs111 // Requires BOTH host scaffold markers AND trailing bare pwd.COMMENT
MEDIUMrust/src/shell/agent_wrapper.rs112 // A model-chosen `eval 'x' && pwd` without scaffold stays blocked.COMMENT
MEDIUMrust/src/shell/agent_wrapper.rs291/// True when the command prefix (before any `eval`) contains agent-host scaffoldCOMMENT
MEDIUMrust/src/shell/agent_wrapper.rs521 /// `source <snapshot> … && shopt … &&` scaffold must be scanned past so theCOMMENT
MEDIUMrust/src/shell/agent_wrapper.rs522 /// inner command is still found and the scaffold dropped.COMMENT
MEDIUMrust/src/shell/agent_wrapper.rs583 /// SECURITY: `eval 'payload' && pwd` without host scaffold must NOT unwrap.COMMENT
MEDIUMrust/src/shell/exec/execution.rs230 // #595: when the agent wraps its command in host scaffoldingCOMMENT
MEDIUMrust/src/cli/eval_cmd.rs4//! * `eval init <dir>` — scaffold a runnable starter suite (one QA + one code task).COMMENT
MEDIUMrust/src/cli/dispatch/network/provider.rs36/// `provider init <id>` — scaffold a config-provider TOML in the project-localCOMMENT
MEDIUMrust/src/cli/addon_cmd/authoring.rs3/// `addon init [name]` — scaffold a ready-to-edit `lean-ctx-addon.toml` in theCOMMENT
MEDIUMrust/src/cli/addon_cmd/authoring.rs17 // the scaffold pick capabilities that actually let it run (GH #1079).COMMENT
MEDIUMrust/src/dashboard/routes/system.rs81 // Protection area (GL #487): the OWASP agentic-risk alignment thatCOMMENT
MEDIUMrust/src/dashboard/routes/system.rs81 // Protection area (GL #487): the OWASP agentic-risk alignment thatCOMMENT
MEDIUMdocs/user-journeys.md24### Act I — Govern & scale the context windowCOMMENT
MEDIUMdocs/user-journeys.md129## Journey 2 — "One `grep` blew up my context window" → Context FirewallCOMMENT
MEDIUMdocs/comparisons/vs-naive-rag.md1# lean-ctx vs naive RAGCOMMENT
MEDIUMdocs/comparisons/vs-naive-rag.md75## Where naive RAG is the right callCOMMENT
MEDIUMdocs/comparisons/README.md44### "I want to compress free-form prose / chat history / RAG context"COMMENT
MEDIUMdocs/comparisons/README.md50### "I was going to build plain vector-DB RAG over my codebase"COMMENT
MEDIUMdocs/comparisons/vs-token-company.md149### "I'm compressing chatbot history, RAG context, or long prose prompts"COMMENT
MEDIUMdocs/reference/10-customization-and-governance.md174lean-ctx filter init # scaffold a filter configCODE
MEDIUMdocs/reference/appendix-mcp-tools.md62## 3. Session & multi-agentCOMMENT
MEDIUMdocs/reference/05-advanced.md643lean-ctx plugin init # scaffold a new pluginCODE
MEDIUMdocs/reference/08-multi-agent.md163## 6. Task orchestration — the shared board (A2A)COMMENT
MEDIUMdocs/reference/08-multi-agent.md231## 10. A full multi-agent walkthroughCOMMENT
MEDIUMdocs/reference/08-multi-agent.md249## Storage layout (multi-agent)COMMENT
MEDIUMintegrations/hermes-lean-ctx/config.py21# Sensible default context window when the host has not called update_model().COMMENT
MEDIUMintegrations/hermes-lean-ctx/config.py75 # Fraction of the context window at which compaction fires.COMMENT
MEDIUMbenchmarks/efficiency/RESULTS-baseline.md51## Notes on the token/agentic axisCOMMENT
MEDIUM.github/workflows/ci.yml24 # CI must be hermetic: never let tests download the embedding modelCOMMENT
MEDIUM.github/workflows/ci.yml562 # Raised 3000→3100 after wave of multi-agent merges pushed fixed cost to ~3008.COMMENT
Unused Imports160 hits · 155 pts
SeverityFileLineSnippetContext
LOWclients/python/tests/test_ocla_wire.py1CODE
LOWclients/python/tests/test_conformance_live.py9CODE
LOWclients/python/tests/test_ocla_package.py1CODE
LOWclients/python/tests/test_adapters_live.py12CODE
LOWclients/python/tests/test_adapters.py9CODE
LOWclients/python/tests/test_client.py3CODE
LOWclients/python/tests/test_ocla_cli.py1CODE
LOWclients/python/tests/test_conformance.py3CODE
LOWclients/python/leanctx/client.py10CODE
LOWclients/python/leanctx/ocla.py7CODE
LOWclients/python/leanctx/__init__.py7CODE
LOWclients/python/leanctx/__init__.py9CODE
LOWclients/python/leanctx/__init__.py10CODE
LOWclients/python/leanctx/__init__.py10CODE
LOWclients/python/leanctx/__init__.py10CODE
LOWclients/python/leanctx/__init__.py10CODE
LOWclients/python/leanctx/__init__.py10CODE
LOWclients/python/leanctx/__init__.py17CODE
LOWclients/python/leanctx/__init__.py17CODE
LOWclients/python/leanctx/__init__.py17CODE
LOWclients/python/leanctx/__init__.py17CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py23CODE
LOWclients/python/leanctx/__init__.py38CODE
LOWclients/python/leanctx/ocla_verify.py3CODE
LOWclients/python/leanctx/tool_text.py8CODE
LOWclients/python/leanctx/conformance.py17CODE
LOWclients/python/leanctx/errors.py3CODE
LOWclients/python/leanctx/adapters/crewai.py7CODE
LOWclients/python/leanctx/adapters/_common.py8CODE
LOWclients/python/leanctx/adapters/__init__.py15CODE
LOWclients/python/leanctx/adapters/__init__.py17CODE
LOWclients/python/leanctx/adapters/__init__.py17CODE
LOWclients/python/leanctx/adapters/__init__.py17CODE
LOWclients/python/leanctx/adapters/__init__.py18CODE
LOWclients/python/leanctx/adapters/__init__.py19CODE
LOWclients/python/leanctx/adapters/__init__.py20CODE
LOWclients/python/leanctx/adapters/__init__.py21CODE
LOWclients/python/leanctx/adapters/__init__.py21CODE
LOWclients/python/leanctx/adapters/llamaindex.py7CODE
LOWclients/python/leanctx/adapters/openai.py8CODE
LOWclients/python/leanctx/adapters/langchain.py7CODE
LOWbench/compress/benchmark.py22CODE
LOWbench/agent-task/swebench_harness/collect.py12CODE
LOWbench/agent-task/swebench_harness/run_arm.py15CODE
LOWbench/agent-task/swebench_harness/__init__.py8CODE
LOWbench/agent-task/swebench_harness/select_tasks.py13CODE
LOWbench/agent-task/swebench_harness/select_tasks.py15CODE
LOWbench/agent-task/swebench_harness/report.py12CODE
100 more matches not shown…
Structural Annotation Overuse51 hits · 86 pts
SeverityFileLineSnippetContext
LOWrust/tests/suite/cortex_wiring_integration.rs58 // Step 1: ConsolidateCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs78 // Step 2: Apply to session cacheCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs90 // Step 3: Verify cache contains provider dataCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs100 // Step 4: Cross-source hints for the referenced fileCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs117 // Step 5: Format hints (as ctx_read would append them)COMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs267 // Step 1: Provider query produces chunks and consolidates themCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs295 // Step 2: Apply edges (these would be in the graph index)COMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs300 // Step 3: Simulate ctx_read — check cross-source hints for referenced filesCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs331 // Step 4: Verify format output matches what ctx_read appendsCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs336 // Step 5: Verify cache hit (session cache stores the provider results)COMMENT
LOWrust/src/core/context_compiler.rs270 // Step 4: DEDUP — drop items whose CONTENT is >70% redundant with anCOMMENT
LOWrust/src/core/context_compiler.rs304 // Step 5: ORDER — Lost-in-the-Middle (LiTM) reorder.COMMENT
LOWrust/src/core/cognition_loop.rs101 // Step 3: Fidelity Check (structural only, no LLM)COMMENT
LOWrust/src/core/cognition_loop.rs161/// Step 1: Promote recent session decisions/findings into project knowledge.COMMENT
LOWrust/src/core/cognition_loop.rs219/// Step 2: Remove edges whose endpoints no longer exist in the knowledge store.COMMENT
LOWrust/src/core/cognition_loop.rs235/// Step 4: Connect related facts that share vocabulary but lack an explicit edge.COMMENT
LOWrust/src/core/cognition_loop.rs275/// Step 5: Resolve contradictions — same category+key, different values.COMMENT
LOWrust/src/core/cognition_loop.rs313/// Step 6: Strengthen edges between facts co-retrieved in the same session window.COMMENT
LOWrust/src/core/cognition_loop.rs350/// Step 7: Decay confidence on stale facts, and decay edge counts for unseen edges.COMMENT
LOWrust/src/core/attention_context.rs81 // Step 1: Compute raw density scoresCOMMENT
LOWrust/src/core/attention_context.rs96 // Step 2: Apply redundancy penalties (MMR-like)COMMENT
LOWrust/src/core/attention_context.rs109 // Step 3: Normalize attention scores and allocate budgetCOMMENT
LOWrust/src/core/embeddings/mod.rs758/// NOTE: This function BLOCKS on first call while loading the ONNX model.COMMENT
LOWdocs/guides/claude-code.md37### Step 1: MCP Server RegistrationCOMMENT
LOWdocs/guides/claude-code.md77### Step 2: Agent Instructions (CLAUDE.md block + skill)COMMENT
LOWdocs/guides/claude-code.md122### Step 3: Shell HookCOMMENT
LOWdocs/guides/claude-code.md149### Step 4: SKILL.md (Optional)COMMENT
LOWdocs/guides/windsurf.md42### Step 1: MCP Server RegistrationCOMMENT
LOWdocs/guides/windsurf.md58### Step 2: Agent RulesCOMMENT
LOWdocs/guides/windsurf.md95### Step 3: Shell HookCOMMENT
LOWdocs/guides/cursor.md31### Step 1: MCP Server RegistrationCOMMENT
LOWdocs/guides/cursor.md49### Step 2: Agent Rules (MDC Format)COMMENT
LOWdocs/guides/cursor.md78### Step 3: Shell HookCOMMENT
LOWdocs/guides/cursor.md86### Step 4: SKILL.mdCOMMENT
LOWdocs/guides/codex-cli.md32### Step 1: MCP Server RegistrationCOMMENT
LOWdocs/guides/codex-cli.md46### Step 2: Agent RulesCOMMENT
LOWdocs/guides/codex-cli.md84### Step 3: Shell HookCOMMENT
LOWdocs/guides/codex-cli.md272# Step 1: AnalyzeCOMMENT
LOWdocs/guides/codex-cli.md276# Step 2: PlanCOMMENT
LOWdocs/guides/codex-cli.md280# Step 3: ExecuteCOMMENT
LOWdocs/guides/aider.md122### Step 1: Understand the CodebaseCOMMENT
LOWdocs/guides/aider.md138### Step 2: Analyze ImpactCOMMENT
LOWdocs/guides/aider.md148### Step 3: Add Files to AiderCOMMENT
LOWdocs/guides/aider.md156### Step 4: Make ChangesCOMMENT
LOWdocs/guides/aider.md160### Step 5: DocumentCOMMENT
LOWdocs/guides/gemini-cli.md28### Step 1: MCP Server RegistrationCOMMENT
LOWdocs/guides/gemini-cli.md47### Step 2: Rules (GEMINI.md)COMMENT
LOWdocs/guides/gemini-cli.md83### Step 3: Shell HookCOMMENT
LOWdocs/guides/opencode.md28### Step 1: MCP Server RegistrationCOMMENT
LOWdocs/guides/opencode.md55### Step 2: Rules (AGENTS.md)COMMENT
LOWdocs/guides/opencode.md96### Step 3: Shell HookCOMMENT
AI Slop Vocabulary30 hits · 84 pts
SeverityFileLineSnippetContext
MEDIUMbench/agent-task/r2/lean-ctx.toml9# capability-safe-cheap on a phase-isolated harness.COMMENT
MEDIUMbench/lifecycle/lanes/beets.json30 "prompt": "# Evaluation isolation contract\n\nThis is a treatment lane. Its profile was installed and configured bCODE
MEDIUMbench/lifecycle/lanes/fastify.json54 "prompt": "# Evaluation isolation contract\n\nThis is a treatment lane. Its profile was installed and configured bCODE
MEDIUMbench/lifecycle/lanes/terraform.json34 "prompt": "# Evaluation isolation contract\n\nThis is a treatment lane. Its profile was installed and configured bCODE
MEDIUMrust/Cargo.toml17 # Standalone manual-verification harness the grammar-addon design provedCOMMENT
MEDIUMrust/tests/suite/security_hardening.rs5/// so that the security-invariant checks below stay robust to internal moduleCOMMENT
MEDIUMrust/tests/suite/hn_hardening_scenarios.rs10/// so that the invariant checks below stay robust to internal module structure.COMMENT
MEDIUMrust/tests/suite/hn_hardening_scenarios.rs28/// brace) so structural assertions stay robust to where the guard lives and toCOMMENT
MEDIUMrust/tests/suite/lock_contention_hardening.rs289 // instead of a fixed sleep so the test stays robust on slow/loaded CICOMMENT
MEDIUMrust/tests/suite/setup_symlink_596.rs128 // Fake `codex` binary so detection is robust regardless of host PATH.COMMENT
MEDIUMrust/src/tools/ctx_shell.rs224 // Preserve #989's escape hatch for harness-provided scratch paths.COMMENT
MEDIUMrust/src/tools/ctx_callgraph.rs116 // widely-called AND cognitively complex is the highest-leverage refactor.COMMENT
MEDIUMrust/src/core/path_resolve.rs235 // it. Asserts only the Ok case (robust against parallel env mutation): withCOMMENT
MEDIUMrust/src/core/handle.rs18//! robust than a brittle line-only reference.COMMENT
MEDIUMrust/src/core/tabular_crush.rs17//! The compact form is serialized with `serde_json` (robust quoting, escapes andCOMMENT
MEDIUMrust/src/core/ort_execution_providers.rs67/// scale batch size: small mini-batches under-utilize a GPU and payCOMMENT
MEDIUMrust/src/core/pgvector_store.rs11//! one JSON object per line (`json_build_object(...)::text`), which is robustCOMMENT
MEDIUMrust/src/core/tool_profiles.rs289/// formatting, and unrelated keys (robust against substring/comment matches).COMMENT
MEDIUMrust/src/core/graph_provider.rs268 /// its current [`SymbolInfo`], robust to line drift. Resolution order:COMMENT
MEDIUMrust/src/core/graph_provider.rs279 /// `@Lline` is never a hard requirement, so this is strictly more robustCOMMENT
MEDIUMrust/src/core/graph_provider.rs807 // the current symbol at its real line (robust beyond line-only refs).COMMENT
MEDIUMrust/src/core/auto_mode_resolver.rs488 // Structure-first cold-read floor (#361): on a phase-isolated harness a coldCOMMENT
MEDIUMrust/src/core/code_health/annotate.rs43/// name (more robust than line numbers when attributes/decorators shift lines).COMMENT
MEDIUMrust/src/core/config/proxy_tests.rs385 // assertion is robust without mutating process-global env vars.COMMENT
MEDIUMrust/src/core/config/render.rs189 // through `toml::Value` (map equality is order-independent) so it is robustCOMMENT
MEDIUMrust/src/server/call_tool/pipeline.rs822 // which break a JSON contract. This guard is the robust catch-all:COMMENT
MEDIUMcookbook/package-lock.json2942 "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz",CODE
MEDIUMscripts/generate_ebench_report.py2"""Generate the comprehensive E-Bench v2 report from all benchmark result files."""STRING
MEDIUM.github/workflows/ci.yml374 # a benchmark smoke that proves the harness runs offline (local fallback).COMMENT
MEDIUM.github/workflows/ci.yml578 # 3. Otherwise → skipped (the harness itself is still covered by the test job).COMMENT
Excessive Try-Catch Wrapping58 hits · 71 pts
SeverityFileLineSnippetContext
LOWclients/python/leanctx/client.py317 except Exception: # pragma: no cover - defensiveCODE
LOWclients/python/leanctx/conformance.py76 except Exception as exc: # noqa: BLE001 - capture as a failed checkCODE
LOWbench/compress/benchmark.py49 except Exception:CODE
LOWbench/compress/benchmark.py105 except Exception as exc: # noqa: BLE001 - any failure is reported, not raisedCODE
LOWbench/lifecycle/harness/codex_runner.py228 except Exception as exc:CODE
LOWbench/lifecycle/harness/run_lifecycle.py49 except Exception as exc:CODE
LOWrust/tests/e2e_test.py114 except Exception as e:CODE
LOWrust/tests/embedding_download_test.py105 except Exception as e:CODE
LOWrust/tests/pre_release_check.sh71except Exception:CODE
LOWintegrations/hermes-lean-ctx/transport.py40 except Exception as exc: # pragma: no cover - depends on installCODE
LOWintegrations/hermes-lean-ctx/transport.py56 except Exception as exc:CODE
LOWintegrations/hermes-lean-ctx/transport.py81 except Exception as exc:CODE
LOWintegrations/hermes-lean-ctx/transport.py103 except Exception as exc:CODE
LOWintegrations/hermes-lean-ctx/transport.py117 except Exception as exc:CODE
LOWintegrations/hermes-lean-ctx/transport.py128 except Exception as exc:CODE
LOWintegrations/hermes-lean-ctx/__init__.py31 except Exception:CODE
MEDIUMintegrations/hermes-lean-ctx/__init__.py26def _resolve_hermes_home() -> str:CODE
LOWintegrations/hermes-lean-ctx/tokens.py30 except Exception: # pragma: no cover - depends on optional depCODE
LOWintegrations/hermes-lean-ctx/tokens.py65 except Exception: # pragma: no cover - encoder edge casesCODE
LOWintegrations/hermes-lean-ctx/engine.py17except Exception: # pragma: no cover - exercised outside HermesCODE
LOWintegrations/hermes-lean-ctx/engine.py72 except Exception: # pragma: no cover - exotic host baseCODE
LOWintegrations/hermes-lean-ctx/engine.py146 except Exception as exc: # never break the agent loopCODE
LOWintegrations/hermes-lean-ctx/tests/conftest.py53 except Exception:CODE
MEDIUMintegrations/hermes-lean-ctx/tests/conftest.py48def _ensure_agent_context_engine() -> None:CODE
LOWintegrations/hermes-lean-ctx/benchmarks/engines.py56 except Exception as exc: # noqa: BLE001 - any import failure → skipCODE
LOWintegrations/hermes-lean-ctx/benchmarks/engines.py68 except Exception: # noqa: BLE001 - try the next constructor shapeCODE
LOWscripts/benchmark_shell.py66 except Exception:CODE
LOWscripts/benchmark_shell.py111 except Exception:CODE
MEDIUMscripts/benchmark_shell.py277 print(f"Error: {PYTHON_BIN} not found.", file=sys.stderr)CODE
MEDIUMscripts/benchmark_shell.py280 print(f"Error: {LEAN_CTX_BIN} not found.", file=sys.stderr)CODE
MEDIUMscripts/benchmark_shell.py285 print(f"Error: {tasks_path} not found.", file=sys.stderr)CODE
LOWscripts/benchmark_codex.py146 except Exception:CODE
MEDIUMscripts/benchmark_codex.py313 print(f"Error: {HUMANEVAL_PATH} not found.", file=sys.stderr)CODE
MEDIUMscripts/benchmark_codex.py317 print(f"Error: {PYTHON_BIN} not found. Install Python 3.11+.", file=sys.stderr)CODE
LOWscripts/benchmark_mbpp.py170 except Exception:CODE
LOWscripts/benchmark_mbpp.py222 except Exception:CODE
MEDIUMscripts/benchmark_mbpp.py409 print(f"Error: {MBPP_PATH} not found.", file=sys.stderr)CODE
MEDIUMscripts/benchmark_mbpp.py412 print(f"Error: {PYTHON_BIN} not found.", file=sys.stderr)CODE
LOWscripts/benchmark_codex_compressed.py175 except Exception:STRING
LOWscripts/benchmark_codex_compressed.py215 except Exception:STRING
MEDIUMscripts/benchmark_codex_compressed.py424 print(f"Error: {HUMANEVAL_PATH} not found.", file=sys.stderr)STRING
LOWscripts/verify-test-deployment-evidence.py261 except Exception:CODE
LOWscripts/benchmark_multifile.py55 except Exception:CODE
LOWscripts/benchmark_multifile.py127 except Exception:CODE
MEDIUMscripts/benchmark_multifile.py281 print(f"Error: {PYTHON_BIN} not found.", file=sys.stderr)CODE
LOWscripts/benchmark_bigcode.py231 except Exception:STRING
LOWscripts/benchmark_bigcode.py262 except Exception:STRING
MEDIUMscripts/benchmark_bigcode.py471 print(f"Error: {BIGCODE_PATH} not found.", file=sys.stderr)STRING
MEDIUMscripts/benchmark_bigcode.py474 print(f"Error: {PYTHON_BIN} not found.", file=sys.stderr)STRING
LOWpackages/chrome-lean-ctx/native-host/bridge.py22 except Exception:CODE
LOWpackages/chrome-lean-ctx/native-host/bridge.py116 except Exception as e:CODE
LOWpackages/chrome-lean-ctx/native-host/bridge.py120 except Exception:CODE
MEDIUMpackages/chrome-lean-ctx/native-host/bridge.py17def log(msg):CODE
MEDIUMpackages/chrome-lean-ctx/native-host/bridge.py62def compress(text, binary_path):CODE
LOWpackages/python-lean-ctx/lean_ctx/litellm.py60except Exception: # noqa: BLE001 - any litellm import failure means "not available"CODE
LOWpackages/sublime-lean-ctx/lean_ctx.py38 except Exception:CODE
LOWpackages/sublime-lean-ctx/lean_ctx.py56 except Exception as e:CODE
LOWpackages/sublime-lean-ctx/lean_ctx.py74 except Exception:CODE
Hallucination Indicators4 hits · 40 pts
SeverityFileLineSnippetContext
CRITICAL…t/kotlin/com/leanctx/plugin/EditorFocusReporterTest.kt47 parentDisposable = com.intellij.openapi.util.Disposer.newDisposable(),CODE
CRITICAL…n/kotlin/com/leanctx/plugin/LeanCtxStatusBarFactory.kt81 com.intellij.openapi.wm.ToolWindowManager.getInstance(project)CODE
CRITICAL…in/kotlin/com/leanctx/plugin/actions/LeanCtxActions.kt15 com.intellij.openapi.ui.Messages.showInfoMessage(project, content, "lean-ctx")CODE
CRITICAL…in/kotlin/com/leanctx/plugin/actions/LeanCtxActions.kt24 com.intellij.openapi.wm.ToolWindowManager.getInstance(project)CODE
Verbosity Indicators22 hits · 38 pts
SeverityFileLineSnippetContext
LOWrust/tests/suite/cortex_wiring_integration.rs58 // Step 1: ConsolidateCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs78 // Step 2: Apply to session cacheCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs90 // Step 3: Verify cache contains provider dataCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs100 // Step 4: Cross-source hints for the referenced fileCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs117 // Step 5: Format hints (as ctx_read would append them)COMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs267 // Step 1: Provider query produces chunks and consolidates themCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs295 // Step 2: Apply edges (these would be in the graph index)COMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs300 // Step 3: Simulate ctx_read — check cross-source hints for referenced filesCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs331 // Step 4: Verify format output matches what ctx_read appendsCOMMENT
LOWrust/tests/suite/cortex_wiring_integration.rs336 // Step 5: Verify cache hit (session cache stores the provider results)COMMENT
LOWrust/src/core/context_compiler.rs270 // Step 4: DEDUP — drop items whose CONTENT is >70% redundant with anCOMMENT
LOWrust/src/core/context_compiler.rs304 // Step 5: ORDER — Lost-in-the-Middle (LiTM) reorder.COMMENT
LOWrust/src/core/cognition_loop.rs101 // Step 3: Fidelity Check (structural only, no LLM)COMMENT
LOWrust/src/core/cognition_loop.rs161/// Step 1: Promote recent session decisions/findings into project knowledge.COMMENT
LOWrust/src/core/cognition_loop.rs219/// Step 2: Remove edges whose endpoints no longer exist in the knowledge store.COMMENT
LOWrust/src/core/cognition_loop.rs235/// Step 4: Connect related facts that share vocabulary but lack an explicit edge.COMMENT
LOWrust/src/core/cognition_loop.rs275/// Step 5: Resolve contradictions — same category+key, different values.COMMENT
LOWrust/src/core/cognition_loop.rs313/// Step 6: Strengthen edges between facts co-retrieved in the same session window.COMMENT
LOWrust/src/core/cognition_loop.rs350/// Step 7: Decay confidence on stale facts, and decay edge counts for unseen edges.COMMENT
LOWrust/src/core/attention_context.rs81 // Step 1: Compute raw density scoresCOMMENT
LOWrust/src/core/attention_context.rs96 // Step 2: Apply redundancy penalties (MMR-like)COMMENT
LOWrust/src/core/attention_context.rs109 // Step 3: Normalize attention scores and allocate budgetCOMMENT
Cross-File Repetition7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHscripts/benchmark_shell.py0call codex exec and return (code, elapsed_seconds).STRING
HIGHscripts/benchmark_multifile.py0call codex exec and return (code, elapsed_seconds).STRING
HIGHscripts/benchmark_bigcode.py0call codex exec and return (code, elapsed_seconds).STRING
HIGH…/test/kotlin/com/leanctx/plugin/psi/SymbolMoverTest.kt0class outer { fun target() {} } val shared = outer() fun a() { shared.target() } fun b() { shared.target() }STRING
HIGH…est/kotlin/com/leanctx/plugin/psi/SymbolDeleterTest.kt0class outer { fun target() {} } val shared = outer() fun a() { shared.target() } fun b() { shared.target() }STRING
HIGH…/kotlin/com/leanctx/plugin/psi/SymbolRefactorerTest.kt0class outer { fun target() {} } val shared = outer() fun a() { shared.target() } fun b() { shared.target() }STRING
HIGH…t/kotlin/com/leanctx/plugin/psi/ReferenceFinderTest.kt0class outer { fun target() {} } val shared = outer() fun a() { shared.target() } fun b() { shared.target() }STRING
Deep Nesting25 hits · 25 pts
SeverityFileLineSnippetContext
LOWclients/python/tests/test_client.py27CODE
LOWclients/python/tests/test_conformance.py37CODE
LOWclients/python/tests/test_conformance.py50CODE
LOWclients/python/leanctx/client.py178CODE
LOWclients/python/leanctx/client.py308CODE
LOWclients/python/leanctx/tool_text.py13CODE
LOWbench/compress/benchmark.py53CODE
LOWbench/agent-task/swebench_harness/run_arm.py118CODE
LOWbench/agent-task/swebench_harness/select_tasks.py22CODE
LOWbench/lifecycle/harness/codex_runner.py138CODE
LOWpython-sdk/lean_ctx/streaming.py11CODE
LOWrust/tests/e2e_test.py33CODE
LOWrust/tests/embedding_download_test.py119CODE
LOWrust/tests/embedding_download_test.py32CODE
LOWintegrations/hermes-lean-ctx/tokens.py35CODE
LOWintegrations/hermes-lean-ctx/compaction.py147CODE
LOWintegrations/hermes-lean-ctx/compaction.py268CODE
LOWintegrations/hermes-lean-ctx/tests/test_tools.py62CODE
LOWintegrations/hermes-lean-ctx/benchmarks/engines.py50CODE
LOWscripts/gen-sdk-matrix.py34CODE
LOWscripts/check-addon-versions.py109CODE
LOWscripts/benchmark_codex.py73CODE
LOWscripts/history-policy-gate.py294CODE
LOWscripts/benchmark_codex_compressed.py272CODE
LOWpackages/chrome-lean-ctx/native-host/bridge.py93CODE
Fake / Example Data16 hits · 16 pts
SeverityFileLineSnippetContext
LOWrust/src/tools/ctx_transcript_compact.rs414 "lorem ipsum dolor sit amet ".repeat(n)CODE
LOWrust/src/tools/ctx_transcript_compact.rs414 "lorem ipsum dolor sit amet ".repeat(n)CODE
LOWrust/src/core/redaction.rs122 "placeholder",CODE
LOWrust/src/core/graph_enricher.rs410 assert_eq!(commits[0].author, "John Doe");CODE
LOWrust/src/core/providers/jira.rs508 crate::test_env::set_var("JIRA_EMAIL", "test@test.com");CODE
LOWrust/src/core/eval_ab/conditions.rs301 "Lorem ipsum dolor sit amet, totally unrelated filler content about cats and weather.",CODE
LOWrust/src/core/eval_ab/conditions.rs301 "Lorem ipsum dolor sit amet, totally unrelated filler content about cats and weather.",CODE
LOWrust/src/proxy/cache_policy.rs183 let big = "lorem ipsum dolor sit amet ".repeat(50);CODE
LOWrust/src/proxy/cache_policy.rs183 let big = "lorem ipsum dolor sit amet ".repeat(50);CODE
LOWrust/src/proxy/compress.rs638 .map(|i| format!("Line {i:04}: lorem ipsum dolor sit amet consectetur"))CODE
LOWrust/src/proxy/compress.rs638 .map(|i| format!("Line {i:04}: lorem ipsum dolor sit amet consectetur"))CODE
LOWrust/src/proxy/compress.rs653 .map(|i| format!("Line {i:04}: lorem ipsum dolor sit amet consectetur"))CODE
LOWrust/src/proxy/compress.rs653 .map(|i| format!("Line {i:04}: lorem ipsum dolor sit amet consectetur"))CODE
LOWintegrations/hermes-lean-ctx/tests/_helpers.py9 return "lorem ipsum dolor sit amet " * nCODE
LOWintegrations/hermes-lean-ctx/tests/_helpers.py9 return "lorem ipsum dolor sit amet " * nCODE
LOWscripts/generate_multifile_benchmark_tasks.py748r = dispatch("user.created", {"email": "test@test.com"})STRING
Slop Phrases8 hits · 15 pts
SeverityFileLineSnippetContext
LOWbench/agent-task/tasks.lock.json1{"dataset":"princeton-nlp/SWE-bench_Verified","instances":[{"base_commit":"d16bfe05a744909de4b27f5875fe0d4ed41ce607","enCODE
MEDIUMrust/src/tools/ctx_response.rs399 assert!(is_filler_line("Let me know if you need more"));CODE
MEDIUMrust/src/proxy/response_shaper.rs392 let input = "The fix is applied.\n\nLet me know if you need anything else!";CODE
MEDIUMrust/src/proxy/response_shaper.rs420 let input = "Great, I'll fix that for you.\n\nChanged line 42 from `x` to `y`.\n\nLet me know if you need anythiCODE
MEDIUMrust/src/proxy/response_shaper.rs441 "content": "Great, I'll check that.\n\nThe answer is 42.\n\nLet me know if you need more help!"CODE
MEDIUMrust/src/proxy/response_shaper.rs556 let text = "Sure, I'll help.\n\nDone.\n\nLet me know if you need more!";CODE
MEDIUMrust/src/proxy/shaping_hook.rs85 "choices": [{"message": {"role": "assistant", "content": "Great, I'll do that.\n\nDone.\n\nLet me know if yoCODE
MEDIUMrust/src/proxy/shaping_hook.rs94 "choices": [{"message": {"role": "assistant", "content": "Sure, let me check that.\n\nThe answer is 42.\n\nLCODE
Modern Structural Boilerplate12 hits · 12 pts
SeverityFileLineSnippetContext
LOWclients/python/leanctx/__init__.py42__all__ = [CODE
LOWclients/python/leanctx/adapters/__init__.py23__all__ = [CODE
LOWpython-sdk/lean_ctx/__init__.py29__all__ = [CODE
LOWpy-sdk/leanctx/__init__.py15__all__ = [CODE
LOWintegrations/hermes-lean-ctx/transport.py16logger = logging.getLogger(__name__)CODE
LOWintegrations/hermes-lean-ctx/__init__.py23logger = logging.getLogger(__name__)CODE
LOWintegrations/hermes-lean-ctx/__init__.py74__all__ = ["register", "LeanCtxEngine", "__version__"]CODE
LOWintegrations/hermes-lean-ctx/tokens.py13logger = logging.getLogger(__name__)CODE
LOWintegrations/hermes-lean-ctx/_hermes_compat.py62 def update_from_response(self, usage: Dict[str, Any]) -> None:CODE
LOWintegrations/hermes-lean-ctx/engine.py27logger = logging.getLogger(__name__)CODE
LOWintegrations/hermes-lean-ctx/engine.py93 def update_from_response(self, usage: Dict[str, Any]) -> None:CODE
LOWpackages/python-lean-ctx/lean_ctx/__init__.py17__all__ = [CODE
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWinstall.sh4# Usage:COMMENT
LOWscripts/demo-great-filter.sh25# Usage:COMMENT
LOWscripts/preflight.sh25# Usage:COMMENT
LOWscripts/demo-outcome-pricing.sh19# Usage:COMMENT
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWbenchmark/run_benchmark.sh104# Display resultsCOMMENT
LOWrust/src/core/code_health/cognitive.rs10//! ## Increment rulesCOMMENT
LOWscripts/monitor-agents-tickets.sh37 # Check if agent has committed on its branchCOMMENT
LOWscripts/monitor-agents-tickets.sh40 # Check if log contains error/panicCOMMENT
TODO Padding5 hits · 6 pts
SeverityFileLineSnippetContext
LOWrust/tests/neuro_physics_scenarios.rs719 "// TODO: implement // TODO: implement // TODO: implement // placeholder // placeholder",CODE
LOWrust/eval/recording.json19 "text": "```bash\n// file: solution.sh\n# TODO: implement add() so that `add a b` prints a+b\nadd() { echo \"$(( $CODE
LOWrust/eval/accuracy/code/solution.sh1# TODO: implement factorial() so that `factorial n` prints n! (1 for n <= 1).COMMENT
LOWrust/eval/testbench/repos/code-fizz/solution.sh1# TODO: implement fizzbuzz(n).COMMENT
LOWrust/src/cli/eval_cmd.rs599 "# TODO: implement add() so that `add a b` prints a+b\nadd() { echo 0; }\n",CODE
Self-Referential Comments2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUM…ents/rust/lean-ctx-client/tests/dependency_boundary.rs33 "# This file is automatically @generated by Cargo.\n\CODE
MEDIUMrust/tests/suite/pattern_snapshots.rs664 release # Create a release build\n\CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWintegrations/hermes-lean-ctx/benchmarks/run.py68CODE