Repository Analysis

chopratejas/headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

39.5 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of chopratejas/headroom, a Python project with 59,068 GitHub stars. SynthScan v2.0 examined 551,102 lines of code across 1703 source files, recording 15064 pattern matches distributed across 26 syntactic categories. The overall adjusted score of 39.5 places this repository in the Strong AI signal 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).

39.5
Adjusted Score
39.5
Raw Score
100%
Time Factor
2026-07-14
Last Push
59.1K
Stars
Python
Language
551.1K
Lines of Code
1.7K
Files
15.1K
Pattern Hits
2026-07-14
Scan Date
0.11
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 9HIGH 179MEDIUM 2589LOW 12287

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 15064 distinct pattern matches across 26 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 Separators2390 hits · 8426 pts
SeverityFileLineSnippetContext
MEDIUMCargo.toml89# ── Release profile — wheel size optimization ───────────────────────COMMENT
MEDIUMcrates/headroom-core/config/pipeline.toml35# ─── Per-domain bloat estimator config ──────────────────────────────COMMENT
MEDIUMcrates/headroom-core/config/pipeline.toml79# ─── Reformat configs ───────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/config/pipeline.toml106# ─── JSON-array offload config (SmartCrusher wrapper) ─────────────COMMENT
MEDIUMcrates/headroom-core/config/pipeline.toml122# ─── Diff-noise offload config ─────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/ccr_backends.rs155// ─── Redis-feature-gated tests ─────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/auth_mode.rs27// ── Required matrix ──────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/auth_mode.rs96// ── Bonus matrix ──────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/auth_mode.rs152// ── Performance ──────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/live_zone_dispatch.rs81// ─── Routing tests ─────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/live_zone_dispatch.rs343// ─── Cache-safety invariant ────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/ccr_roundtrip.rs226// ─── PR8 additions: marker injection + walker unification ──────────COMMENT
MEDIUMcrates/headroom-core/tests/ccr_roundtrip.rs364// ─── helpers ──────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/cache_control.rs199// ─── Property tests ───────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/benches/ccr_store.rs26// ─── Baseline: the old single-Mutex<HashMap> design ────────────────COMMENT
MEDIUMcrates/headroom-core/src/auth_mode.rs122 // ── User-Agent ───────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/auth_mode.rs147 // ── Authorization header ─────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/auth_mode.rs193 // ── Vendor-specific API-key headers ──────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/auth_mode.rs204 // ── Default ──────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/unidiff_detector.rs100// ─── Tests ─────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs47// ─── Score-weight constants ────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs74// ─── Public API ─────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs530// ─── Internal types ────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs580// ─── Parser ────────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs826// ─── Scoring ───────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs879// ─── Hunk selection (max_hunks_per_file cap) ───────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs962// ─── Context trimming ──────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1045// ─── Output formatter ──────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1115// ─── Helpers ───────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1179// ─── Tests ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1277 // ─── Lossy-path tests ───────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1477 // ─── Bug-fix tests (rename/combined-diff/no-newline/pre-diff) ──────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs487 // ── JSON ───────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs494 // ── Diffs ──────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs497 // ── HTML ───────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs500 // ── Source code ────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs511 // ── Plain text-ish ─────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs519 // ── Default: passthrough ───────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs524// ─── Tests ─────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/live_zone.rs112// ─── Tunable constants (no magic numbers in the dispatch logic) ────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/live_zone.rs140// ─── Per-content-type byte thresholds ──────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/live_zone.rs188// ─── Public types ──────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/live_zone.rs524// ─── Compressor singletons ─────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/live_zone.rs552// ─── Public entry point ────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/live_zone.rs808// ─── Internal helpers ──────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/live_zone.rs1730 // ─── Manifest accessor helpers (consumed by PyO3 binding) ─────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/live_zone.rs1836// ─── OpenAI Chat Completions live-zone dispatcher (Phase C PR-C2) ────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/live_zone.rs2269// ─── OpenAI Responses live-zone dispatcher (Phase C PR-C3) ────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/detection.rs63 // ── Tier 1: Magika ──────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/detection.rs83 // ── Tier 2: unidiff parser ──────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/detection.rs88 // ── Tier 3: fallthrough ─────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/content_detector.rs83// ─── Regex patterns (compiled once, shared) ───────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/content_detector.rs108// ─── Code patterns by language ─────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/content_detector.rs170// ─── Log / build output patterns ───────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/content_detector.rs191// ─── HTML patterns ─────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/content_detector.rs207// ─── Public entry point ────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/content_detector.rs272// ─── Per-type detection helpers ────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/tag_protector.rs738// ─── Tiny byte-search helper ──────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/tag_protector.rs945 // ─── Bug-fix tests (fixed_in_3e4) ─────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/tag_protector.rs1017 // ─── Edge-case correctness ────────────────────────────────────────COMMENT
2330 more matches not shown…
Hyper-Verbose Identifiers8138 hits · 7904 pts
SeverityFileLineSnippetContext
LOW…ates/headroom-core/src/transforms/search_compressor.rs13//! src/models.py:15:class DataProcessor:COMMENT
LOWplugins/headroom-oauth2/tests/test_oauth2.py288def test_install_noop_when_unset(monkeypatch):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py298def test_install_fail_closed_on_bad_config(monkeypatch):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py305def test_install_warns_for_envauth_backend(monkeypatch, caplog):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py142def test_concurrent_single_flight(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py156def test_error_on_bad_status_hides_body(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py171def test_unreachable_token_url():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py219def test_parse_headers_rejects_control_chars():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py225def test_provider_from_env_wires_knobs(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py242def test_provider_from_env_none_when_unset():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py247def test_middleware_injects_bearer(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py258def test_middleware_non_http_passthrough():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py322def test_install_fail_closed_on_bad_timeout(monkeypatch):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py331def test_parse_headers_rejects_bad_keys():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py343def test_middleware_handles_missing_headers_key(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py384def test_allow_insecure_env_permits_nonloopback_http():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py397def test_extra_params_cannot_override_canonical(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py413def test_auth_style_basic_via_env(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py427def test_scopes_comma_separated_via_env(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py440def test_expires_in_missing_falls_back(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py447def test_expires_in_non_numeric_falls_back(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py463def test_single_flight_on_refresh(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py477def test_install_sets_static_headers(monkeypatch):CODE
LOWplugins/openclaw/src/proxy-manager.ts413export function normalizeAndValidateProxyUrl(proxyUrl: string): string {CODE
LOWplugins/openclaw/src/gateway-config.ts18export function resolveGatewayProviderIds(config: Record<string, unknown> | undefined): string[] {CODE
LOWplugins/openclaw/src/gateway-config.ts31function normalizeGatewayProviderIds(value: unknown): string[] {CODE
LOWplugins/openclaw/src/gateway-config.ts67export function applyGatewayProviderBaseUrlsInPlace(CODE
LOWplugins/openclaw/src/convert.ts297function normalizeAssistantMessage(message: Record<string, any>): Record<string, any> {CODE
LOWplugins/openclaw/src/convert.ts321function normalizeToolResultMessage(message: Record<string, any>): Record<string, any> {CODE
LOWplugins/openclaw/src/convert.ts345function normalizeAssistantContent(content: unknown): any[] {CODE
LOWplugins/openclaw/src/convert.ts385function normalizeToolResultContent(content: unknown): any[] {CODE
LOWplugins/openclaw/src/tools/headroom-retrieve.ts15export function createHeadroomRetrieveTool(config: RetrieveToolConfig) {CODE
LOWplugins/hermes/headroom_retrieve/__init__.py47def _handle_headroom_retrieve(args: dict, **kw) -> str:CODE
LOWplugins/opencode/src/retrieve.ts18export function createHeadroomRetrieveTool(config: RetrieveToolConfig) {CODE
LOWplugins/opencode/src/transport.ts182function normalizedOpenAiProxyPath(pathname: string): string | undefined {CODE
LOWplugins/opencode/src/transport.ts456export function uninstallHeadroomTransport(): void {CODE
LOWplugins/opencode/src/provider.ts73export function buildOpencodeConfigContent(CODE
LOWplugins/opencode/src/provider.ts85export function buildOpencodeConfigContentJson(CODE
LOWtests/test_quota_registry.py88def test_register_single_tracker():CODE
LOWtests/test_quota_registry.py95def test_register_multiple_trackers():CODE
LOWtests/test_quota_registry.py104def test_duplicate_key_raises():CODE
LOWtests/test_quota_registry.py111def test_get_unknown_key_returns_none():CODE
LOWtests/test_quota_registry.py116def test_trackers_property_is_snapshot():CODE
LOWtests/test_quota_registry.py131def test_start_all_calls_available_trackers():CODE
LOWtests/test_quota_registry.py139def test_start_all_skips_unavailable_trackers():CODE
LOWtests/test_quota_registry.py183def test_passive_tracker_start_stop_are_noops():CODE
LOWtests/test_quota_registry.py197def test_get_all_stats_includes_available_with_data():CODE
LOWtests/test_quota_registry.py205def test_get_all_stats_excludes_unavailable():CODE
LOWtests/test_quota_registry.py212def test_get_all_stats_excludes_none_data():CODE
LOWtests/test_quota_registry.py228def test_get_stats_single_key():CODE
LOWtests/test_quota_registry.py234def test_get_stats_missing_key_returns_none():CODE
LOWtests/test_quota_registry.py244def test_get_quota_registry_returns_same_instance():CODE
LOWtests/test_quota_registry.py250def test_reset_quota_registry_gives_fresh_instance():CODE
LOWtests/test_quota_registry.py259def test_reset_quota_registry_clears_registrations():CODE
LOWtests/test_quota_registry.py155def test_stop_all_calls_stop_on_all_registered():CODE
LOWtests/test_quota_registry.py165def test_stop_all_continues_on_exception():CODE
LOWtests/test_sse_thinking_blocks.py52def test_thinking_delta_accumulated() -> None:CODE
LOWtests/test_sse_thinking_blocks.py82def test_signature_delta_preserved() -> None:CODE
LOWtests/test_sse_thinking_blocks.py124def test_citations_delta_accumulated() -> None:CODE
LOWtests/test_sse_thinking_blocks.py174def test_redacted_thinking_data_preserved() -> None:CODE
8078 more matches not shown…
Unused Imports1718 hits · 1556 pts
SeverityFileLineSnippetContext
LOWdocker/differential-network-capture/mitm_capture.py3CODE
LOWplugins/headroom-oauth2/src/headroom_oauth2/provider.py8CODE
LOWplugins/headroom-oauth2/src/headroom_oauth2/__init__.py7CODE
LOWplugins/headroom-oauth2/src/headroom_oauth2/__init__.py14CODE
LOW…gins/headroom-oauth2/src/headroom_oauth2/middleware.py8CODE
LOWplugins/hermes/headroom_retrieve/__init__.py13CODE
LOWtests/test_quota_registry.py3CODE
LOWtests/test_sse_thinking_blocks.py21CODE
LOWtests/test_paths_backward_compat.py16CODE
LOWtests/test_provider_codex_install.py1CODE
LOWtests/test_memory_decision.py27CODE
LOWtests/e2e_cortex_savings.py30CODE
LOWtests/e2e_cortex_savings.py45CODE
LOWtests/test_openai_responses_t3_replay_regression.py1CODE
LOWtests/test_h2_stream_reset_retry.py11CODE
LOWtests/test_memory_wrapper.py1CODE
LOWtests/test_codex_responses_passthrough_bytes.py11CODE
LOWtests/test_tool_name_policy.py1CODE
LOWtests/test_proxy_pipeline_lifecycle.py1CODE
LOWtests/test_tool_injection_config.py1CODE
LOWtests/test_codex_ws_per_frame_memory.py1CODE
LOWtests/test_rtk_docker_availability.py3CODE
LOWtests/test_memory_rank_policy.py3CODE
LOWtests/test_hermes_passthrough_compression.py15CODE
LOWtests/test_openai_responses_context_compaction.py1CODE
LOWtests/test_perf_cli_filtering.py10CODE
LOWtests/test_image_compression_offload.py12CODE
LOWtests/test_turn_hooks.py10CODE
LOWtests/test_proxy_loop_exception_health.py3CODE
LOWtests/test_provider_registry_extended.py1CODE
LOWtests/test_stats_new_input_savings_rate.py10CODE
LOWtests/test_utils.py1CODE
LOWtests/test_proxy_cache_ttl_metrics.py3CODE
LOWtests/test_storage_backends.py1CODE
LOWtests/test_provider_route_specs.py1CODE
LOWtests/test_codex_rate_limits.py3CODE
LOWtests/test_stateless_writers.py8CODE
LOWtests/test_update_helpers.py3CODE
LOWtests/test_stateless_toin.py7CODE
LOWtests/test_proxy_per_provider_kompress.py9CODE
LOWtests/test_proxy_byte_faithful_forwarding.py19CODE
LOWtests/test_request_outcome.py12CODE
LOWtests/test_proxy_cors.py12CODE
LOWtests/test_subscription_tracker.py1CODE
LOWtests/test_custom_base_passthrough_telemetry.py1CODE
LOWtests/test_codex_ws_compression_scheduler.py23CODE
LOWtests/test_proxy_savings_history.py3CODE
LOWtests/test_proxy_anthropic_compression_diagnostics.py16CODE
LOWtests/test_ccr_batch_store.py1CODE
LOWtests/test_codex_client_stamp.py9CODE
LOWtests/test_memory_tool_mode.py14CODE
LOWtests/test_copilot_linux_secret.py1CODE
LOWtests/test_fsutil.py3CODE
LOWtests/test_ccr_response_handler_extra.py1CODE
LOWtests/test_proxy_warmup.py13CODE
LOWtests/test_tokenizers.py3CODE
LOWtests/test_image_compression.py7CODE
LOWtests/test_image_compression.py26CODE
LOWtests/test_image_compression.py222CODE
LOWtests/test_image_compression.py223CODE
1658 more matches not shown…
Excessive Try-Catch Wrapping738 hits · 670 pts
SeverityFileLineSnippetContext
LOWclaude_analysis_ttl.py55 except Exception:CODE
LOWclaude_analysis_ttl.py65 except Exception:CODE
LOWclaude_analysis_ttl.py108 except Exception:CODE
LOWdocker/differential-network-capture/mitm_capture.py52 except Exception:CODE
LOWplugins/headroom-oauth2/src/headroom_oauth2/provider.py133 except Exception:CODE
LOWplugins/headroom-oauth2/src/headroom_oauth2/__init__.py119 except Exception as e: # pragma: no coverCODE
LOWtests/e2e_cortex_savings.py382 except Exception as e:CODE
LOWtests/test_stateless_writers.py32 except Exception:CODE
LOWtests/e2e_real_compression.py86 except Exception:CODE
LOWtests/e2e_real_compression.py124 except Exception:CODE
MEDIUMtests/test_compression_cache.py477def reader() -> None:CODE
MEDIUMtests/test_compression_cache.py484def writer() -> None:CODE
LOWtests/test_compression_cache.py481 except Exception as e: # pragma: no coverCODE
LOWtests/test_compression_cache.py489 except Exception as e: # pragma: no coverCODE
LOWtests/test_compression_cache.py590 except Exception as e: # pragma: no coverCODE
LOWtests/test_compression_cache.py630 except Exception as e: # pragma: no coverCODE
LOWtests/test_startup_log_noise.py40 except Exception:CODE
LOWtests/test_startup_log_noise.py60 except Exception:CODE
MEDIUMtests/test_compression_store.py1056def retrieve_item() -> None:CODE
LOWtests/test_compression_store.py1036 except Exception as e:CODE
LOWtests/test_compression_store.py1061 except Exception as e:CODE
LOWtests/test_compression_store.py1096 except Exception as e:CODE
LOWtests/e2e_cortex_mcp.py336 except Exception as e:CODE
LOWtests/e2e_cortex_quality.py371 except Exception as exc:CODE
MEDIUMtests/test_memory_bridge.py73def wrapper(*args, **kwargs):CODE
LOWtests/test_memory_bridge.py76 except Exception as exc:CODE
LOWtests/test_critical_gaps.py364 except Exception as e:CODE
LOWtests/test_critical_gaps.py476 except Exception as e:CODE
LOWtests/test_critical_gaps.py490 except Exception as e:CODE
LOWtests/test_critical_gaps.py501 except Exception as e:CODE
MEDIUMtests/test_memory_handler_concurrent_init.py34def wrapper(*args, **kwargs):CODE
LOWtests/test_memory_handler_concurrent_init.py37 except Exception as exc:CODE
LOWtests/test_memory_handler_concurrent_init.py256 except Exception:CODE
LOWtests/test_memory_handler_concurrent_init.py259 except Exception: # pragma: no cover - env-dependentCODE
LOWtests/e2e_cortex_latency.py434 except Exception as exc:CODE
LOWtests/e2e_cortex_proxy_mcp.py107 except Exception:CODE
LOWtests/e2e_cortex_proxy_mcp.py360 except Exception as e:CODE
LOWtests/e2e_cortex_proxy.py116 except Exception:CODE
LOWtests/e2e_cortex_proxy.py217 except Exception as e:CODE
LOWtests/e2e_cortex_proxy.py274 except Exception as e:CODE
LOWtests/e2e_cortex_proxy.py288 except Exception as e:CODE
LOWtests/test_provider_codex_runtime.py207 except Exception: # pragma: no cover - best effort pollCODE
LOWtests/e2e_ws_responses_compression.py55 except Exception:CODE
LOWtests/test_ccr.py351 except Exception as e:CODE
MEDIUMtests/test_ccr.py336def store_and_retrieve(i):CODE
MEDIUMtests/test_google_multimodal_e2e.py59 print(f"Error: {response.text[:200]}")CODE
MEDIUMtests/test_google_multimodal_e2e.py100 print(f"Error: {response.text[:200]}")CODE
MEDIUMtests/test_google_multimodal_e2e.py159 print(f"Error: {response.text[:200]}")CODE
MEDIUMtests/test_google_multimodal_e2e.py223 print(f"Error: {response.text[:300]}")CODE
MEDIUMtests/test_google_multimodal_e2e.py268 print(f"Error: {response.text[:200]}")CODE
MEDIUMtests/test_google_multimodal_e2e.py315 print(f"Error: {response.text[:300]}")CODE
LOWtests/e2e_ws_codex_usage_headers.py72 except Exception:CODE
LOWtests/e2e_ws_codex_usage_headers.py220 except Exception as exc: # noqa: BLE001 - best-effort secondary checkCODE
MEDIUMtests/e2e_ws_codex_usage_headers.py88def _handler(self, ws):CODE
LOWtests/test_proxy_streaming_resilience.py376 except Exception as e:CODE
MEDIUMtests/test_cache/test_backends.py263def setter() -> None:CODE
MEDIUMtests/test_cache/test_backends.py270def getter() -> None:CODE
MEDIUMtests/test_cache/test_backends.py277def deleter() -> None:CODE
LOWtests/test_cache/test_backends.py267 except Exception as e:CODE
LOWtests/test_cache/test_backends.py274 except Exception as e:CODE
678 more matches not shown…
Over-Commented Block725 hits · 666 pts
SeverityFileLineSnippetContext
LOWCargo.toml41# I1 (byte-faithful passthrough on unmutated bytes; see REALIGNMENT/02-COMMENT
LOWCargo.toml61axum = "0.7"COMMENT
LOWCargo.toml81# (ADC) → bearer token for the `Authorization: Bearer <token>` header.COMMENT
LOWCargo.toml101# * Single codegen unit (better inlining + dead-code elim, at theCOMMENT
LOWpyproject.toml101# ML-based compression with Kompress (ModernBERT).COMMENT
LOWpyproject.toml141 "sentence-transformers>=2.2.0; sys_platform == 'darwin'",COMMENT
LOWpyproject.toml161# * rapidocr 3.x — engine-agnostic core, supports Python 3.13+.COMMENT
LOWpyproject.toml281 "respx>=0.20.0", # HTTP mock transport for passthrough handler testsCOMMENT
LOWpyproject.toml301# - ml (torch — the PyTorch Kompress backend; ONNX path in [proxy] stillCOMMENT
LOWpyproject.toml321Documentation = "https://headroom-docs.vercel.app/docs"COMMENT
LOWpyproject.toml361# `pypi.netflix.net/simple` — and bakes those URLs into uv.lock, whichCOMMENT
LOW.gitguardian.yaml1# GitGuardian configuration — secret-detection allowlistCOMMENT
LOWrust-toolchain.toml1[toolchain]COMMENT
LOWclaude_analysis_ttl.py181 f" Median post-idle write (5-60min gap) : {med_5_60:>10,} tokens "COMMENT
LOWRUST_DEV.md101# Top compressors by invocation count (last process lifetime)COMMENT
LOWcrates/headroom-parity/src/lib.rs421 "was_modified": result.was_modified,COMMENT
LOWcrates/headroom-core/Cargo.toml21# `hf-hub` is the HuggingFace Hub client. We use the blocking `ureq` transportCOMMENT
LOWcrates/headroom-core/Cargo.toml41# sizing pipeline uses `zlib.compress(..., level=1)` to validate the chosenCOMMENT
LOWcrates/headroom-core/Cargo.toml61# (release matrix, e2e/wrap, e2e/init, devcontainer, ci.yml) needsCOMMENT
LOWcrates/headroom-core/Cargo.toml81# in a line in O(n + m) — orders of magnitude faster than running NCOMMENT
LOWcrates/headroom-core/Cargo.toml101# `<<ccr:HASH>>` marker. Pinning the algorithm + truncation length hereCOMMENT
LOW…core/proptest-regressions/transforms/tag_protector.txt1# Seeds for failure cases proptest has generated in the past. It isCOMMENT
LOWcrates/headroom-core/config/pipeline.toml1# Compression pipeline default configuration.COMMENT
LOWcrates/headroom-core/config/pipeline.toml21COMMENT
LOWcrates/headroom-core/config/pipeline.toml41COMMENT
LOWcrates/headroom-core/config/pipeline.toml81# Reformats pack input denser without losing information. Configs hereCOMMENT
LOWcrates/headroom-core/config/pipeline.toml101# Floor on the number of constant tokens a template must have. ACOMMENT
LOWcrates/headroom-core/config/pipeline.toml121COMMENT
LOWcrates/headroom-core/tests/recommendations_loader.rs1//! Integration tests for `transforms::recommendations` (PR-B5).COMMENT
LOWcrates/headroom-core/tests/auth_mode.rs1//! Integration tests for `headroom_core::auth_mode::classify`.COMMENT
LOW…ates/headroom-core/tests/live_zone_token_validation.rs61 let s = std::str::from_utf8(bytes).expect("body is UTF-8 JSON");COMMENT
LOW…ates/headroom-core/tests/live_zone_token_validation.rs81 // tokenize into many short BPE pieces post-rewrite.COMMENT
LOW…ates/headroom-core/tests/live_zone_token_validation.rs201proptest! {COMMENT
LOWcrates/headroom-core/tests/tokenizer_proptest.rs41 let est = EstimatingCounter::default();COMMENT
LOWcrates/headroom-core/tests/live_zone_dispatch.rs1//! Integration tests for the PR-B3 live-zone dispatcher.COMMENT
LOWcrates/headroom-core/tests/cache_control.rs1//! Unit + property tests for the `cache_control` walker (PR-A4).COMMENT
LOWcrates/headroom-core/tests/cache_control.rs61 });COMMENT
LOWcrates/headroom-core/tests/cache_control.rs201proptest! {COMMENT
LOWcrates/headroom-core/benches/auth_mode.rs1//! Criterion benchmark for the auth-mode classifier (Phase F PR-F1).COMMENT
LOWcrates/headroom-core/benches/ccr_store.rs1//! CCR store throughput benchmark — single-threaded and multi-threaded.COMMENT
LOWcrates/headroom-core/src/compression_policy.rs1//! Per-auth-mode compression policy — Phase F PR-F2.1, extended in F2.2.COMMENT
LOWcrates/headroom-core/src/compression_policy.rs21//! 2. **Test surface.** `for_mode(AuthMode) -> CompressionPolicy` isCOMMENT
LOWcrates/headroom-core/src/compression_policy.rs41//! `CacheAligner` transform's `should_apply` MUST return `False`.COMMENT
LOWcrates/headroom-core/src/compression_policy.rs61//!COMMENT
LOWcrates/headroom-core/src/compression_policy.rs81//!COMMENT
LOWcrates/headroom-core/src/compression_policy.rs101use crate::auth_mode::AuthMode;COMMENT
LOWcrates/headroom-core/src/compression_policy.rs121/// Subscription: conservative — flag volatile content earlier (32COMMENT
LOWcrates/headroom-core/src/compression_policy.rs141pub const CACHE_READ_MULTIPLIER: f32 = 0.1;COMMENT
LOWcrates/headroom-core/src/compression_policy.rs161 ///COMMENT
LOWcrates/headroom-core/src/compression_policy.rs241 ///COMMENT
LOWcrates/headroom-core/src/compression_policy.rs301 ) -> bool {COMMENT
LOWcrates/headroom-core/src/auth_mode.rs1//! Auth-mode classifier — Phase F PR-F1.COMMENT
LOWcrates/headroom-core/src/auth_mode.rs21//!COMMENT
LOWcrates/headroom-core/src/auth_mode.rs61 AuthMode::OAuth => "oauth",COMMENT
LOWcrates/headroom-core/src/auth_mode.rs81 "codex-cli/",COMMENT
LOWcrates/headroom-core/src/auth_mode.rs101/// [`AuthMode::Payg`] (Anthropic / OpenAI API key).COMMENT
LOWcrates/headroom-core/src/auth_mode.rs181 // Unknown bearer shape — fall through to header-basedCOMMENT
LOWcrates/headroom-core/src/onnx_cpu.rs1//! Shared CPU-capability guard for the precompiled ONNX Runtime binary.COMMENT
LOWcrates/headroom-core/src/cache_control.rs1//! Customer `cache_control` marker walker for Anthropic `/v1/messages`COMMENT
LOWcrates/headroom-core/src/cache_control.rs21//! For an Anthropic request body parsed into `serde_json::Value`,COMMENT
665 more matches not shown…
Cross-Language Confusion74 hits · 368 pts
SeverityFileLineSnippetContext
HIGHtests/test_proxy_savings_history.py1334 assert "if (this.historySelectedSeriesKey === 'history') return null;" in htmlCODE
HIGHtests/test_cortex_code_compression.py13 cd headroom && uv run python tests/test_cortex_code_compression.pySTRING
HIGHtests/test_cortex_code_compression.py16 cd headroom && uv run --with pytest pytest tests/test_cortex_code_compression.py -v -sSTRING
HIGHtests/test_observed_wire_shapes.py305 "cd /x && cat a.py",CODE
HIGHtests/test_observed_wire_shapes.py306 "cd /x && cat -A a.py | head -60",CODE
HIGHtests/test_observed_wire_shapes.py358 "cd /tmp/core && rg -l safe_math --type py",CODE
HIGHtests/test_observed_wire_shapes.py359 "cd /tmp/core && grep -rn foo suma/",CODE
HIGHtests/test_observed_wire_shapes.py361 "cd /a && cd b && rg pat", # chained cdsCODE
HIGHtests/test_observed_wire_shapes.py367 for cmd in ["cd /x && cat a.py", "cd /x && python -c 'x'", "cd /x && ls -la"]:CODE
HIGHtests/test_observed_wire_shapes.py372 assert _stripcd("cd /tmp/core && rg x") == "rg x"CODE
HIGHtests/test_observed_wire_shapes.py374 assert _stripcd("cd a && cd b && grep x") == "grep x"CODE
HIGHtests/test_observed_wire_shapes.py480 anthropic_input = {"command": "cd /tmp/core && cat suma/x.py"} # Anthropic: dictCODE
HIGHtests/test_observed_wire_shapes.py481 openai_args = json.dumps({"command": "cd /tmp/core && cat suma/x.py"}) # OpenAI: JSON stringCODE
HIGHtests/test_observed_wire_shapes.py486 assert not _isread2(_cmdtext({"command": "cd /x && rg pat"}))CODE
HIGHtests/test_observed_wire_shapes.py51 "input": {"command": 'cd /tmp/core && rg -l "safe_math" --type py | head'},CODE
HIGHtests/test_observed_wire_shapes.py394 "content": "THOUGHT: look\n```bash\ncd /r && cat x.py\n```",CODE
HIGHtests/test_observed_wire_shapes.py423 _fenced_shell_command("T\n```mswea_bash_command\ncd /r && cat x.py\n```")CODE
HIGHtests/test_observed_wire_shapes.py424 == "cd /r && cat x.py"CODE
HIGHtests/test_observed_wire_shapes.py435 "content": "T\n```mswea_bash_command\ncd /r && cat a.py\n```",CODE
HIGHtests/test_observed_wire_shapes.py444 "content": "T\n```mswea_bash_command\ncd /r && grep -rn foo .\n```",CODE
HIGHtests/test_observed_wire_shapes.py557 {"role": "assistant", "content": "", "tool_calls": [tc("c_read", "cd /r && cat a.py")]},CODE
HIGHtests/test_observed_wire_shapes.py562 "tool_calls": [tc("c_grep", "cd /r && grep -rn foo .")],CODE
HIGHtests/test_toin_feedback.py413 'data: {"type":"message_start","message":{"id":"msg_01","model":"claude-3-5-sonnet-20241022","role":"assistaCODE
HIGHtests/test_openai_codex_ws_timings.py230 with ``upstream_first_event`` absent (null)."""STRING
HIGHtests/test_code_aware_brace_comment_regressions.py61 this.users.push(user);CODE
HIGHtests/test_proxy_streaming_request_logger.py260 b'"content":[],"stop_reason":null,"usage":{'CODE
HIGHtests/test_cache_prefix_overlay.py112 cmd = "cd /tmp/core && cat suma/apps/underwriting/followup/service.py"CODE
HIGHtests/test_cache_prefix_overlay.py138 _openai_asst("cd /tmp/core && rg -n foo ."),CODE
HIGHtests/test_cache_prefix_overlay.py140 _openai_asst("cd /tmp/core && cat foo.py"), # NEW delta (assistant)CODE
HIGH…sts/test_integrations/langchain/test_langchain_live.py6 set -a && source .env && set +a && pytest tests/test_integrations/langchain/test_langchain_live.py -v -sSTRING
HIGHtests/test_memory/test_budget.py83 "Use source .venv/bin/activate && pytest for running tests", importance=0.5CODE
HIGHtests/test_memory/test_budget.py86 "Use source .venv/bin/activate && pytest for running tests", importance=0.8CODE
HIGHtests/test_memory/test_traffic_learner.py199 assert _bash_first_binary("source .venv/bin/activate && pytest -x") == "pytest"CODE
HIGHtests/test_memory/test_traffic_learner.py303 tool_input={"command": "source /project/.venv/bin/activate && pytest"},CODE
HIGHtests/test_memory/test_traffic_learner.py1672 assert _normalize_bash_for_hash("cd /tmp && ls") == "cd /tmp"CODE
HIGHtests/test_memory/test_traffic_learner.py269 tool_input={"command": "source .venv/bin/activate && ruff check ."},CODE
HIGHtests/parity/recorder.py667 "type Maybe<T> = T | null;\n"CODE
HIGHtests/test_compression/test_json_handler.py78 content = '{"value": null}'CODE
HIGHtests/test_compression/test_json_handler.py333 content = '{"a": true, "b": false, "c": null}'CODE
HIGHtests/test_compression/test_json_handler.py376 content = '{"str": "hello", "num": 1.5, "bool": true, "null": null}'CODE
HIGHtests/test_compression/test_evals.py438 private socket: Socket | null = null;STRING
HIGHtests/test_compression/test_evals.py444 private heartbeatTimer: NodeJS.Timer | null = null;STRING
HIGHtests/test_compression/test_evals.py507 this.socket = null;STRING
HIGHtests/test_compression/test_evals.py542 this.pendingOperations.push(operation);STRING
HIGHtests/test_compression/test_evals.py638 this.heartbeatTimer = null;STRING
HIGHtests/test_compression/test_evals.py643 if (this.pendingOperations.length > 0 && this.socket?.connected) {STRING
HIGHbenchmarks/adversarial_ccr_tests.py565 '[{"id": 1}, null, {"id": 2}]', # Null in arrayCODE
HIGHbenchmarks/prefix_cache_benchmark.py701 print(" source .env && python benchmarks/prefix_cache_benchmark.py")CODE
HIGHbenchmarks/prefix_cache_benchmark.py16 source .env && python benchmarks/prefix_cache_benchmark.pySTRING
HIGHbenchmarks/prefix_cache_benchmark.py19 source .env && python benchmarks/prefix_cache_benchmark.py --turns 5STRING
HIGHbenchmarks/prefix_cache_benchmark.py22 source .env && python benchmarks/prefix_cache_benchmark.py --model claude-sonnet-4-6STRING
HIGHbenchmarks/comprehensive_eval.py263 data: null,STRING
HIGHbenchmarks/comprehensive_eval.py264 error: null,STRING
HIGHbenchmarks/comprehensive_eval.py274 setState(prev => ({ ...prev, loading: true, error: null }));STRING
HIGHbenchmarks/comprehensive_eval.py278 if (mountedRef.current && callId === lastCallId.current) {STRING
HIGHbenchmarks/comprehensive_eval.py279 setState({ data: result, error: null, loading: false });STRING
HIGHbenchmarks/comprehensive_eval.py284 if (mountedRef.current && callId === lastCallId.current) {STRING
HIGHbenchmarks/comprehensive_eval.py286 setState({ data: null, error: err, loading: false });STRING
HIGHbenchmarks/comprehensive_eval.py246 data: T | null;STRING
HIGHbenchmarks/comprehensive_eval.py247 error: Error | null;STRING
14 more matches not shown…
Deep Nesting432 hits · 360 pts
SeverityFileLineSnippetContext
LOWclaude_analysis_ttl.py45CODE
LOWclaude_analysis_ttl.py98CODE
LOWplugins/headroom-oauth2/src/headroom_oauth2/__init__.py95CODE
LOWtests/test_output_only_request_blocks.py42CODE
LOWtests/e2e_real_compression.py79CODE
LOWtests/e2e_real_compression.py252CODE
LOWtests/test_read_maturation_handler_nobust.py135CODE
LOWtests/test_handler_outcome_tag_invariant.py38CODE
LOWtests/test_lean_ctx_installer.py115CODE
LOWtests/test_lean_ctx_installer.py159CODE
LOWtests/test_proxy_system_prompt_immutable.py371CODE
LOWtests/test_memory_integration.py280CODE
LOWtests/test_critical_gaps.py163CODE
LOWtests/test_critical_gaps.py340CODE
LOWtests/test_critical_gaps.py355CODE
LOWtests/test_realignment_live_multi_turn.py558CODE
LOWtests/test_realignment_live_multi_turn.py861CODE
LOWtests/test_tag_protector_invariant.py121CODE
LOWtests/_mcp_stub.py58CODE
LOWtests/e2e_cortex_proxy_mcp.py148CODE
LOWtests/test_proxy_anthropic_cache_stability.py1351CODE
LOWtests/test_anthropic_pre_upstream_backpressure.py877CODE
LOWtests/test_anthropic_pre_upstream_backpressure.py882CODE
LOWtests/test_tool_result_interceptors.py28CODE
LOWtests/e2e_ws_responses_compression.py48CODE
LOWtests/test_claude_session_mode_benchmark.py429CODE
LOWtests/test_claude_session_mode_benchmark.py437CODE
LOWtests/test_release_workflows.py354CODE
LOWtests/e2e_ws_codex_usage_headers.py65CODE
LOWtests/test_cache/test_client_integration.py38CODE
LOWtests/test_integrations/langchain/test_chat_model.py1041CODE
LOWtests/test_integrations/agno/test_model.py1042CODE
LOWtests/test_cli/test_wrap_copilot.py47CODE
LOWtests/test_cli/test_wrap_copilot.py245CODE
LOWtests/test_cli/test_wrap_codex.py1518CODE
LOWtests/test_cli/test_wrap_codex.py1673CODE
LOWtests/test_cli/test_wrap_codex.py1730CODE
LOWtests/test_cli/test_main_help_version.py50CODE
LOWtests/integrations/test_strands/test_hooks.py161CODE
LOWtests/test_transforms/test_code_compressor.py1334CODE
LOWtests/test_transforms/test_read_lifecycle.py619CODE
LOWexamples/strands_mcp_dispatch_test.py66CODE
LOWexamples/strands_mcp_dispatch_test.py122CODE
LOWexamples/strands_bundle_demo.py76CODE
LOWexamples/strands_via_proxy_demo.py122CODE
LOWexamples/strands_via_proxy_demo.py275CODE
LOWexamples/langchain_demo/run_comparison.py154CODE
LOWexamples/langchain_demo/run_comparison.py241CODE
LOWexamples/langchain_demo/show_compression.py35CODE
LOWbenchmarks/conftest.py52CODE
LOWbenchmarks/adversarial_ccr_tests.py1177CODE
LOWbenchmarks/adversarial_ccr_tests.py1582CODE
LOWbenchmarks/adversarial_ccr_tests.py1765CODE
LOWbenchmarks/adversarial_ccr_tests.py1838CODE
LOWbenchmarks/adversarial_ccr_tests.py1787CODE
LOWbenchmarks/agent_cost_benchmark.py133CODE
LOWbenchmarks/agent_cost_benchmark.py352CODE
LOWbenchmarks/agent_cost_benchmark.py421CODE
LOWbenchmarks/agent_cost_benchmark.py597CODE
LOWbenchmarks/cache_validation_bundle.py49CODE
372 more matches not shown…
Modern Structural Boilerplate266 hits · 268 pts
SeverityFileLineSnippetContext
LOWplugins/headroom-oauth2/src/headroom_oauth2/__init__.py16__all__ = ["install", "OAuth2ClientCredentials", "OAuth2Error", "OAuth2Middleware", "parse_headers"]CODE
LOWtests/test_providers_opencode_config.py22def _set_test_home(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_cli_learn.py405 def set_context_target(self, target: str | None) -> None:CODE
LOWtests/test_ssl_context.py82 def set_alpn_protocols(self, protocols: list[str]) -> None:CODE
LOW…ts/test_proxy/test_anthropic_ccr_deferred_injection.py64 def update_from_result(self, originals, compressed) -> None: # noqa: ARG002CODE
LOWtests/parity/recorder.py845__all__ = [CODE
LOWtests/test_cli/test_wrap_codex.py28def _set_test_home(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_cli/test_wrap_opencode.py21def _set_test_home(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_cli/test_wrap_bridge.py24def _set_test_home(monkeypatch, tmp_path: Path) -> None:CODE
LOWtests/test_compression/test_evals.py132logger = logging.getLogger(__name__)STRING
LOWbenchmarks/__init__.py36__all__ = [CODE
LOWbenchmarks/scenarios/__init__.py22__all__ = [CODE
LOWscripts/version-sync.py40def update_package_json(file_path: Path, version: str) -> None:CODE
LOWscripts/version-sync.py50def update_plugin_manifest(file_path: Path, version: str) -> None:CODE
LOWscripts/version-sync.py60def update_marketplace_manifest(file_path: Path, version: str) -> None:CODE
LOWscripts/version-sync.py77def update_plugin_versions(root: Path, version: str) -> None:CODE
LOWscripts/version-sync.py90def update_openclaw_package_json(file_path: Path, version: str, sdk_version: str) -> None:CODE
LOWscripts/version-sync.py102def update_pyproject_version(root: Path, version: str) -> None:CODE
LOWe2e/_lib/harness.py327__all__ = [CODE
LOWe2e/_lib/__init__.py23__all__ = [CODE
LOWheadroom/paths.py108def set_process_stateless(value: bool) -> None:CODE
LOWheadroom/paths.py408__all__ = [CODE
LOWheadroom/binaries.py42logger = logging.getLogger(__name__)CODE
LOWheadroom/binaries.py44__all__ = [CODE
LOWheadroom/update_check.py31logger = logging.getLogger(__name__)CODE
LOWheadroom/update_check.py297__all__ = [CODE
LOWheadroom/savings_ledger.py393__all__ = [CODE
LOWheadroom/client.py38logger = logging.getLogger(__name__)CODE
LOWheadroom/__init__.py91__all__ = [CODE
LOWheadroom/copilot_linux_secret.py14logger = logging.getLogger(__name__)CODE
LOWheadroom/shared_context.py33logger = logging.getLogger(__name__)CODE
LOWheadroom/compress.py69logger = logging.getLogger(__name__)CODE
LOWheadroom/_ort.py54logger = logging.getLogger(__name__)CODE
LOWheadroom/copilot_auth.py26logger = logging.getLogger(__name__)CODE
LOWheadroom/copilot_auth.py733def _set_header_default(headers: dict[str, str], name: str, value: str) -> None:CODE
LOWheadroom/agent_savings.py11logger = logging.getLogger(__name__)CODE
LOWheadroom/copilot_macos_keychain.py14logger = logging.getLogger(__name__)CODE
LOWheadroom/mcp_registry/codex.py29logger = logging.getLogger(__name__)CODE
LOWheadroom/mcp_registry/claude.py26logger = logging.getLogger(__name__)CODE
LOWheadroom/mcp_registry/__init__.py30__all__ = [CODE
LOWheadroom/mcp_registry/opencode.py18logger = logging.getLogger(__name__)CODE
LOWheadroom/relevance/embedding.py58logger = logging.getLogger(__name__)CODE
LOWheadroom/relevance/__init__.py57__all__ = [CODE
LOWheadroom/tokenizers/mistral.py17logger = logging.getLogger(__name__)CODE
LOWheadroom/tokenizers/registry.py20logger = logging.getLogger(__name__)CODE
LOWheadroom/tokenizers/__init__.py58__all__ = [CODE
LOWheadroom/tokenizers/huggingface.py17logger = logging.getLogger(__name__)CODE
LOWheadroom/tokenizers/tiktoken_counter.py21logger = logging.getLogger(__name__)CODE
LOWheadroom/reporting/__init__.py5__all__ = ["generate_report"]CODE
LOWheadroom/capture/__init__.py11__all__ = [CODE
LOWheadroom/capture/network_diff.py20logger = logging.getLogger(__name__)CODE
LOWheadroom/evals/suite_runner.py29logger = logging.getLogger(__name__)CODE
LOWheadroom/evals/prompt_comparison.py35logger = logging.getLogger(__name__)CODE
LOWheadroom/evals/cost_tracker.py13logger = logging.getLogger(__name__)CODE
LOWheadroom/evals/__init__.py83__all__ = [CODE
LOWheadroom/evals/html_oss_benchmarks.py32logger = logging.getLogger(__name__)CODE
LOWheadroom/evals/comprehensive_benchmark.py42logger = logging.getLogger(__name__)CODE
LOWheadroom/evals/batch_compression_eval.py51logger = logging.getLogger(__name__)CODE
LOWheadroom/evals/html_extraction.py21logger = logging.getLogger(__name__)CODE
LOWheadroom/evals/memory/runner.py34logger = logging.getLogger(__name__)CODE
206 more matches not shown…
Cross-File Repetition50 hits · 250 pts
SeverityFileLineSnippetContext
HIGHtests/test_integrations/langchain/test_streaming.py0tests for behavior when langchain is not available.STRING
HIGHtests/test_integrations/langchain/test_memory.py0tests for behavior when langchain is not available.STRING
HIGHtests/test_integrations/langchain/test_retriever.py0tests for behavior when langchain is not available.STRING
HIGHtests/test_integrations/langchain/test_agents.py0tests for behavior when langchain is not available.STRING
HIGHtests/test_integrations/langchain/test_streaming.py0_check_langchain_available raises importerror when not available.STRING
HIGHtests/test_integrations/langchain/test_memory.py0_check_langchain_available raises importerror when not available.STRING
HIGHtests/test_integrations/langchain/test_retriever.py0_check_langchain_available raises importerror when not available.STRING
HIGHtests/test_integrations/langchain/test_agents.py0_check_langchain_available raises importerror when not available.STRING
HIGHtests/test_cli/test_wrap_goose.py0if the openhands binary is missing the command must fail with a clear error.STRING
HIGHtests/test_cli/test_wrap_opencode.py0if the openhands binary is missing the command must fail with a clear error.STRING
HIGHtests/test_cli/test_wrap_openhands.py0if the openhands binary is missing the command must fail with a clear error.STRING
HIGHheadroom/memory/system.py0retrieve a specific memory by id. args: memory_id: the memory identifier. returns: memory if found, none otherwise.STRING
HIGHheadroom/memory/backends/mem0_system_adapter.py0retrieve a specific memory by id. args: memory_id: the memory identifier. returns: memory if found, none otherwise.STRING
HIGHheadroom/memory/backends/direct_mem0.py0retrieve a specific memory by id. args: memory_id: the memory identifier. returns: memory if found, none otherwise.STRING
HIGHheadroom/memory/ports.py0get a memory by id. args: memory_id: the unique identifier of the memory. returns: the memory if found, none otherwise.STRING
HIGHheadroom/memory/adapters/sqlite.py0get a memory by id. args: memory_id: the unique identifier of the memory. returns: the memory if found, none otherwise.STRING
HIGHheadroom/memory/backends/local.py0get a memory by id. args: memory_id: the unique identifier of the memory. returns: the memory if found, none otherwise.STRING
HIGHheadroom/memory/ports.py0get the full history chain for a memory. follows supersession links to return all versions of a memory. args: memory_id:STRING
HIGHheadroom/memory/adapters/sqlite.py0get the full history chain for a memory. follows supersession links to return all versions of a memory. args: memory_id:STRING
HIGHheadroom/memory/core.py0get the full history chain for a memory. follows supersession links to return all versions of a memory. args: memory_id:STRING
HIGHheadroom/memory/ports.py0clear all memories at or below a scope level. args: user_id: required user scope. session_id: if provided, clear sessionSTRING
HIGHheadroom/memory/core.py0clear all memories at or below a scope level. args: user_id: required user scope. session_id: if provided, clear sessionSTRING
HIGHheadroom/memory/adapters/sqlite.py0clear all memories at or below a scope level. args: user_id: required user scope. session_id: if provided, clear sessionSTRING
HIGHheadroom/memory/ports.py0remove multiple memories from the text index (protocol-compliant). args: memory_ids: list of memory ids to remove. returSTRING
HIGHheadroom/memory/adapters/hnsw.py0remove multiple memories from the text index (protocol-compliant). args: memory_ids: list of memory ids to remove. returSTRING
HIGHheadroom/memory/adapters/fts5.py0remove multiple memories from the text index (protocol-compliant). args: memory_ids: list of memory ids to remove. returSTRING
HIGHheadroom/memory/adapters/sqlite_vector.py0remove multiple memories from the text index (protocol-compliant). args: memory_ids: list of memory ids to remove. returSTRING
HIGHheadroom/memory/ports.py0retrieve an entity by id. args: entity_id: the unique identifier of the entity. returns: the entity if found, none otherSTRING
HIGHheadroom/memory/adapters/sqlite_graph.py0retrieve an entity by id. args: entity_id: the unique identifier of the entity. returns: the entity if found, none otherSTRING
HIGHheadroom/memory/adapters/graph.py0retrieve an entity by id. args: entity_id: the unique identifier of the entity. returns: the entity if found, none otherSTRING
HIGHheadroom/memory/ports.py0delete a single relationship. args: relationship_id: the unique identifier of the relationship. returns: true if the relSTRING
HIGHheadroom/memory/adapters/sqlite_graph.py0delete a single relationship. args: relationship_id: the unique identifier of the relationship. returns: true if the relSTRING
HIGHheadroom/memory/adapters/graph.py0delete a single relationship. args: relationship_id: the unique identifier of the relationship. returns: true if the relSTRING
HIGHheadroom/memory/adapters/fts5.py0get a new database connection (thread-safe pattern). returns: a new sqlite connection with row factory configured.STRING
HIGHheadroom/memory/adapters/sqlite_graph.py0get a new database connection (thread-safe pattern). returns: a new sqlite connection with row factory configured.STRING
HIGHheadroom/memory/adapters/sqlite.py0get a new database connection (thread-safe pattern). returns: a new sqlite connection with row factory configured.STRING
HIGHheadroom/memory/adapters/graph.py0get memory statistics for the memorytracker. returns: componentstats with current memory usage.STRING
HIGHheadroom/memory/adapters/hnsw.py0get memory statistics for the memorytracker. returns: componentstats with current memory usage.STRING
HIGHheadroom/proxy/request_logger.py0get memory statistics for the memorytracker. returns: componentstats with current memory usage.STRING
HIGHheadroom/proxy/semantic_cache.py0get memory statistics for the memorytracker. returns: componentstats with current memory usage.STRING
HIGHheadroom/cache/compression_store.py0get memory statistics for the memorytracker. returns: componentstats with current memory usage.STRING
HIGHheadroom/proxy/memory_tool_adapter.py0extract tool calls from response based on provider format.STRING
HIGHheadroom/proxy/memory_handler.py0extract tool calls from response based on provider format.STRING
HIGHheadroom/ccr/response_handler.py0extract tool calls from response based on provider format.STRING
HIGHheadroom/cache/compression_feedback.py0fraction of retrievals that were full (not search).STRING
HIGHheadroom/telemetry/toin.py0fraction of retrievals that were full (not search).STRING
HIGHheadroom/telemetry/models.py0fraction of retrievals that were full (not search).STRING
HIGHheadroom/integrations/strands/hooks.py0reset all tracked metrics (thread-safe). clears the metrics history and resets the total tokens saved counter. useful foSTRING
HIGHheadroom/integrations/strands/model.py0reset all tracked metrics (thread-safe). clears the metrics history and resets the total tokens saved counter. useful foSTRING
HIGHheadroom/integrations/agno/model.py0reset all tracked metrics (thread-safe). clears the metrics history and resets the total tokens saved counter. useful foSTRING
Docstring Block Structure44 hits · 220 pts
SeverityFileLineSnippetContext
HIGHtests/test_compression/test_evals.py116"""Authentication middleware for FastAPI applications. This module provides JWT-based authentication with role-based acSTRING
HIGHheadroom/onnx_runtime.py42Download a file from HuggingFace Hub, preferring the local cache. Tries ``local_files_only=True`` first to avoid a STRING
HIGHheadroom/compress.py171Compress messages using Headroom's full compression pipeline. This is the simplest way to use Headroom. No proxy, nSTRING
HIGHheadroom/relevance/__init__.py76Factory function to create a relevance scorer. Args: tier: Scorer tier to create: - "hybrid": HSTRING
HIGHheadroom/tokenizers/registry.py134Get tokenizer for a model. Args: model: Model name (e.g., 'gpt-4o', 'claude-3-sonnet'). STRING
HIGHheadroom/tokenizers/huggingface.py325Encode text to token IDs. Args: text: Text to encode. Returns: List of token ISTRING
HIGHheadroom/tokenizers/huggingface.py344Decode token IDs to text. Args: tokens: List of token IDs. Returns: Decoded teSTRING
HIGHheadroom/tokenizers/base.py330Encode text to token IDs. Optional method - not all backends support encoding. Default implementation rSTRING
HIGHheadroom/tokenizers/base.py347Decode token IDs to text. Optional method - not all backends support decoding. Default implementation rSTRING
HIGHheadroom/evals/prompt_comparison.py220Compare two prompts using an LLM judge to verify semantic equivalence. This function sends both prompts to GPT-4o (STRING
HIGHheadroom/evals/prompt_comparison.py594Verify that Headroom preserves the semantic meaning of a request. This is the main entry point for verifying HeadroSTRING
HIGHheadroom/learn/analyzer.py471Strip optional markdown fences and parse JSON. Handles raw JSON and fenced code blocks (e.g. ``​`json ... ``​`), inSTRING
HIGHheadroom/learn/analyzer.py522Call a locally installed CLI tool as the LLM backend. Enables keyless usage for subscription-based CLI tools that hSTRING
HIGHheadroom/memory/system.py99Update an existing memory with new content. Creates a new version while preserving history (supersession). STRING
HIGHheadroom/memory/core.py517Supersede an existing memory with a new version. Creates a temporal chain where the old memory's validity ends STRING
HIGHheadroom/memory/factory.py69Create a complete memory system from configuration. This factory function creates and initializes all memory systemSTRING
HIGHheadroom/memory/factory.py117Create a memory store backend. Args: config: Memory system configuration. Returns: A MemoryStoSTRING
HIGHheadroom/memory/factory.py145Create or return a cached embedder backend. The embedder is shared across every ``LocalBackend`` instance that STRING
HIGHheadroom/memory/factory.py231Create a vector index backend. Args: config: Memory system configuration. Returns: A VectorIndSTRING
HIGHheadroom/memory/factory.py324Create a text index backend. Args: config: Memory system configuration. Returns: A TextIndex iSTRING
HIGHheadroom/memory/backends/local.py532Update a memory with new content (creates versioned history). Uses HierarchicalMemory.supersede() to create a nSTRING
HIGHheadroom/memory/backends/mem0_system_adapter.py231Update an existing memory with new content. Creates a new version while preserving history (supersession). STRING
HIGHheadroom/memory/adapters/embedders.py663Call OpenAI API with retry logic for transient failures. Args: texts: List of texts to embed. STRING
HIGHheadroom/memory/adapters/embedders.py707Generate an embedding for a single text. Args: text: The text to embed. Returns: STRING
HIGHheadroom/memory/adapters/embedders.py726Generate embeddings for multiple texts. Automatically handles batching for large inputs. Args: STRING
HIGHheadroom/memory/adapters/embedders.py885Call Ollama API with retry logic for a single text. Args: text: Text to embed. Returns: STRING
HIGHheadroom/memory/adapters/embedders.py940Generate an embedding for a single text. Args: text: The text to embed. Returns: STRING
HIGHheadroom/memory/adapters/embedders.py959Generate embeddings for multiple texts. Ollama API doesn't support batch embedding natively, so we makeSTRING
HIGHheadroom/memory/adapters/sqlite.py632Supersede an existing memory with a new version. This creates a temporal chain: the old memory's valid_until isSTRING
HIGHheadroom/memory/adapters/hnsw.py575Search for similar memories using vector similarity. Args: filter: Vector search filter with query STRING
HIGHheadroom/proxy/server.py1197Run a synchronous compression callable on the bounded executor with cancel-aware metrics. Replaces ``asSTRING
HIGHheadroom/cache/registry.py83 Get a cache optimizer for a provider. Args: provider: Provider name (e.g., "anthropic", "oSTRING
HIGHheadroom/providers/base.py54 Get a token counter for a specific model. Args: model: The model name. Returns: STRING
HIGHheadroom/providers/base.py70 Get the context window limit for a model. Args: model: The model name. Returns: STRING
HIGHheadroom/backends/base.py125Send an OpenAI-format message request. Unlike send_message(), this takes OpenAI-format input and returns STRING
HIGHheadroom/backends/base.py148Stream an OpenAI-format chat completion. Yields SSE-formatted strings: 'data: {...}\\n\\n' for each chunk, STRING
HIGHheadroom/cli/_utils/parsers.py10Parse a duration string into a timedelta. Supported formats: - "7d" - 7 days - "2w" - 2 weeks STRING
HIGHheadroom/transforms/spreadsheet_ingest.py74Load a spreadsheet file into ``{sheet_name: csv_text}``. Args: path: Path to a ``.xlsx`` or ``.xls`` file. STRING
HIGHheadroom/transforms/code_compressor.py106Get a tree-sitter parser for the given language. Returns a **thread-local** ``tree_sitter.Parser`` instance. tSTRING
HIGHheadroom/transforms/kompress_compressor.py1223Compress multiple texts. Uses batched inference on GPU, sequential on CPU. On GPU (PyTorch + CUDA / MPS), runs STRING
HIGHheadroom/compression/masks.py88Combine masks - preserve if EITHER mask says preserve. Useful when combining multiple structure detection stratSTRING
HIGHheadroom/compression/masks.py111Combine masks - preserve only if BOTH masks say preserve. Useful for being more aggressive with compression. STRING
HIGHheadroom/rtk/installer.py76Download rtk binary from GitHub releases. Args: version: Version to download (e.g., "v0.42.4"). Defaults toSTRING
HIGHheadroom/pricing/registry.py103Estimate the cost for a given token usage. Args: model: The model name/identifier. inpuSTRING
AI Slop Vocabulary66 hits · 190 pts
SeverityFileLineSnippetContext
MEDIUMcodecov.yml6 # Gate on the comprehensive unit suite (`python` flag from ci.yml's 4 testCOMMENT
MEDIUMpyproject.toml286# EleutherAI lm-evaluation-harness (lm-eval), which headroom invokes as anCOMMENT
MEDIUMpyproject.toml291# need the accuracy harness opt in explicitly with `pip installCOMMENT
MEDIUMpyproject.toml306# ML weight a sandbox avoids; evals is a dev/test harness, not aCOMMENT
MEDIUMpyproject.toml476 # test-teardown thread; this is a test-harness artifact, not a production issueCOMMENT
MEDIUMcrates/headroom-parity/src/lib.rs53/// differing by 1 ULP). To make comparisons robust we round-trip theCOMMENT
MEDIUMcrates/headroom-py/Cargo.toml23# Disable the default test harness — Rust `cargo test` can't run a cdylib thatCOMMENT
MEDIUMtests/test_openai_responses_t3_replay_regression.py173 # Simulate a harness that changed/trimmed the ancient envelope.COMMENT
MEDIUMtests/test_request_outcome.py146# ── classify_client — the harness ID source ─────────────────────────COMMENT
MEDIUMtests/test_request_outcome.py169 # X-Client wins even when UA matches a different harnessCOMMENT
MEDIUMtests/test_request_outcome.py107 assert o.client is None # unidentified harnessCODE
MEDIUMtests/test_request_outcome.py214 # Bind the real method to this harness.COMMENT
MEDIUMtests/test_google_multimodal.py557# Parametrized tests for comprehensive coverageCOMMENT
MEDIUMtests/test_dashboard_cache_net_playwright.py54 # escapes the harness to the real network.COMMENT
LOWtests/test_image_compressor.py613 # URL images should just pass through since we can't extract dataCOMMENT
MEDIUMtests/test_ccr_feedback.py304 """get_stats returns comprehensive overview."""STRING
MEDIUM…test_dashboard_context_tool_availability_playwright.py127 # escapes the harness to the real network.COMMENT
MEDIUMtests/test_observed_wire_shapes.py289# HEADROOM_LOG_MESSAGES trace of the `inspect` non-litellm harness);COMMENT
MEDIUMtests/test_observed_wire_shapes.py332# Section 5 — command classification is harness-agnostic (Bug A + Bug B)COMMENT
MEDIUMtests/test_observed_wire_shapes.py474 # The SAME read action, as each provider/harness serializes its tool call.COMMENT
MEDIUMtests/test_observed_wire_shapes.py511 # object — raw and harness-wrapped — is RELEASED (not protected) for compressionCOMMENT
MEDIUMtests/test_observed_wire_shapes.py534 # whatever role the harness stamps on it.COMMENT
MEDIUMtests/test_observed_wire_shapes.py411 # command* so cat/sed code reads are passed verbatim on ANY model/harness.COMMENT
MEDIUMtests/test_cross_turn_dedup.py253# — role:tool, role:function, or a text-harness role:user string — keyed off theCOMMENT
MEDIUMtests/test_cross_turn_dedup.py270 # Text-harness shape: the read output arrives as a role:user STRING after anCOMMENT
LOWtests/test_bedrock_region.py162 # We need to actually test the function, so let's just use theCOMMENT
MEDIUMtests/test_proxy_hooks_regression.py46 # from that same tokenizer so the test stays robust to any futureCOMMENT
MEDIUMtests/test_savings_ledger.py255 # identified harness -> recorded as that clientCOMMENT
MEDIUMtests/test_savings_ledger.py267 # unidentified harness -> falls back to "proxy"COMMENT
MEDIUMtests/test_dashboard_cache_ttl_playwright.py167 # escapes the harness to the real network.COMMENT
LOWtests/test_evals/test_html_extraction_eval.py308 # These should not fail (just create the evaluator)COMMENT
MEDIUMtests/test_evals/test_html_oss_benchmarks.py279 # Print comprehensive resultsCOMMENT
MEDIUMexamples/strands_via_proxy_demo.py9 Fix #4 Strands harness label in CLIENT_UA_MAPSTRING
MEDIUMbenchmarks/conftest.py241 "\n\n## Guidelines\n1. Always explain your reasoning\n2. Provide code examples when helpful\n3. Consider edge caCODE
MEDIUMbenchmarks/comprehensive_eval.py708 """Run comprehensive evaluation."""STRING
MEDIUMe2e/init/run.py33# Add repo root to sys.path so the harness import works whether the file isCOMMENT
MEDIUMe2e/init/run.py56 # The harness restores PATH before assertions, but `headroom init` ran with aCOMMENT
MEDIUMheadroom/evals/suite_runner.py60 # Standard benchmarks via lm-eval harness (through Headroom proxy)COMMENT
MEDIUMheadroom/evals/comprehensive_benchmark.py63 "mmlu", # 57 subjects - comprehensive but slowCODE
MEDIUMheadroom/evals/comprehensive_benchmark.py467 """Run comprehensive benchmark suite.STRING
MEDIUMheadroom/learn/verbosity.py273 # Backfill has_tools (a session-level property of the harness).COMMENT
MEDIUMheadroom/memory/extraction.py39FACT_EXTRACTION_PROMPT = """You are a comprehensive fact extractor. Your goal is to capture ALL meaningful information fCODE
MEDIUMheadroom/proxy/server.py3643 """Get comprehensive proxy statistics.STRING
MEDIUMheadroom/proxy/prometheus_metrics.py702 # client is the harness classified from the User-Agent / X-ClientCOMMENT
MEDIUMheadroom/proxy/prometheus_metrics.py704 # when the harness is unidentified.COMMENT
MEDIUMheadroom/proxy/outcome.py120 # client: identified harness driving the request (codex /COMMENT
MEDIUMheadroom/proxy/outcome.py123 # User-Agent matched a known harness. Populated by handlersCOMMENT
MEDIUMheadroom/proxy/outcome.py127 # can slice by harness without a separate column. This is theCOMMENT
MEDIUMheadroom/proxy/outcome.py129 # harness visibility appears across EVERY handler with zeroCOMMENT
MEDIUMheadroom/proxy/outcome.py412 # tag-based filtering surfaces per-harness slicing for free —COMMENT
MEDIUMheadroom/proxy/outcome.py446 # a harness was identified — keeps the unidentified-trafficCOMMENT
MEDIUMheadroom/proxy/handlers/openai.py4825 # Identify the WS harness before downstream auth/header rewrites.COMMENT
MEDIUMheadroom/proxy/handlers/anthropic.py791 # Identify the harness (codex / claude-code / aider / etc.)COMMENT
MEDIUMheadroom/proxy/handlers/streaming.py1065 # Identify the harness (codex / claude-code / aider / cursor /COMMENT
MEDIUMheadroom/cache/prefix_tracker.py321 # stripping) so it is robust to ALL per-turn transport / annotation churn —COMMENT
LOWheadroom/backends/litellm.py339# Provider Registry - to add a new provider, just add an entry here!COMMENT
MEDIUMheadroom/subscription/tracker.py382 # PR-G2 remediation (H1): elevate to ERROR — this is configCOMMENT
MEDIUMheadroom/transforms/content_detector.py195# WRAPPED payload to still count as JSON: a small structural wrapper (a harnessCOMMENT
MEDIUMheadroom/transforms/content_router.py3608 # keeps exact bytes to patch — regardless of how THIS harness labelsCOMMENT
MEDIUMheadroom/transforms/content_router.py3610 # harnesses (Anthropic tool_use, OpenAI/Kimi `role:tool`, text-harnessCOMMENT
6 more matches not shown…
Redundant / Tautological Comments116 hits · 158 pts
SeverityFileLineSnippetContext
LOWtests/test_memory_system.py26# Check if hnswlib is available for LocalBackend testsCOMMENT
LOWtests/test_proxy_memory_integration.py221 # Check if response indicates tool was usedCOMMENT
LOWtests/test_proxy_memory_integration.py281 # Check if response mentions the saved infoCOMMENT
LOWtests/test_memory_integration.py264 # Check if memory tool was calledCOMMENT
LOWtests/test_memory_integration.py271 # Check if auto-handledCOMMENT
LOWtests/test_memory_integration.py310 # Check if memory tool was called with pre-extractionCOMMENT
LOWtests/test_memory_integration.py558 # Check if search was invokedCOMMENT
LOWtests/test_critical_gaps.py830 # Set _last_save_time to past so elapsed > intervalCOMMENT
LOWtests/test_proxy_ccr.py445 # Check if compression was actually performed (not skipped)COMMENT
LOWtests/test_hnsw_only.py16# Check if hnswlib is available (use lazy check to avoid SIGILL on incompatible CPUs)COMMENT
LOWtests/test_sqlite_vector_index.py22# Check if sqlite-vec is availableCOMMENT
LOWtests/test_google_multimodal_e2e.py145 # Check if model made a function callCOMMENT
LOWtests/test_cache/test_anthropic.py70 # Check if cache_control was insertedCOMMENT
LOWtests/test_evals/test_html_oss_benchmarks.py70 # Print resultsCOMMENT
LOWtests/test_integrations/langchain/test_chat_model.py1021 # Check if Ollama server is running on default portCOMMENT
LOWtests/test_integrations/langchain/test_chat_model.py18# Check if LangChain is availableCOMMENT
LOWtests/test_integrations/langchain/test_extended.py17# Check if LangChain is availableCOMMENT
LOWtests/test_integrations/langchain/test_streaming.py16# Check if LangChain is availableCOMMENT
LOWtests/test_integrations/langchain/test_langgraph.py15# Check if LangChain is availableCOMMENT
LOWtests/test_integrations/langchain/test_memory.py15# Check if LangChain is availableCOMMENT
LOWtests/test_integrations/langchain/test_retriever.py15# Check if LangChain is availableCOMMENT
LOWtests/test_integrations/langchain/test_agents.py16# Check if LangChain is availableCOMMENT
LOWtests/test_integrations/agno/test_model.py15# Check if Agno is availableCOMMENT
LOWtests/test_integrations/agno/test_model.py1032 # Check if Ollama server is running on default portCOMMENT
LOWtests/test_integrations/agno/test_hooks.py14# Check if Agno is availableCOMMENT
LOWtests/test_memory/test_factory.py29# Check if hnswlib is available (most factory tests require it)COMMENT
LOWtests/test_memory/test_hierarchical.py659# Check if hnswlib is available (use lazy check to avoid SIGILL on incompatible CPUs)COMMENT
LOWtests/test_memory/test_easy.py29# Check if hnswlib is available (local backend requires it)COMMENT
LOWtests/test_memory/test_core_operations.py36# Check if hnswlib is available (HierarchicalMemory requires it)COMMENT
LOWtests/test_cli/test_mcp.py24# Check if MCP SDK is availableCOMMENT
LOWtests/integrations/test_strands/test_model.py23# Check if strands-agents is installedCOMMENT
LOWtests/integrations/test_strands/test_model_unit.py16# Check if strands-agents is installed for proper skip handlingCOMMENT
LOWtests/integrations/test_strands/test_hooks.py23# Check if strands-agents is installedCOMMENT
LOWtests/integrations/test_strands/test_hooks_unit.py18# Check if strands-agents is installed for proper skip handlingCOMMENT
LOWexamples/strands_bedrock_demo.py646 # Display resultsCOMMENT
LOWexamples/strands_bedrock_demo.py816 # Display resultsCOMMENT
LOWexamples/langchain_demo/run_comparison.py195 # Check if doneCOMMENT
LOWexamples/langchain_demo/run_comparison.py299 # Check if doneCOMMENT
LOWexamples/deployment/macos-launchagent/uninstall.sh67# Check if we're on macOSCOMMENT
LOWexamples/deployment/macos-launchagent/uninstall.sh74# Check if LaunchAgent is installedCOMMENT
LOWexamples/deployment/macos-launchagent/uninstall.sh81# Check if service is running and stop itCOMMENT
LOWexamples/deployment/macos-launchagent/install.sh75# Check if we're on macOSCOMMENT
LOWexamples/deployment/macos-launchagent/install.sh81# Check if headroom is installedCOMMENT
LOWexamples/deployment/macos-launchagent/install.sh96# Check if service is already installedCOMMENT
LOWexamples/deployment/macos-launchagent/install.sh100 # Check if service is runningCOMMENT
LOWexamples/deployment/macos-launchagent/install.sh130# Check if port is in useCOMMENT
LOWexamples/deployment/macos-launchagent/install.sh189 # Check if port is listeningCOMMENT
LOW…ples/deployment/macos-launchagent/shell-integration.sh32# Check if proxy is running (fast path using lsof)COMMENT
LOW…ples/deployment/macos-launchagent/shell-integration.sh41 # Check if LaunchAgent is installedCOMMENT
LOWbenchmarks/adversarial_ccr_tests.py658 # Check if error items with unicode were preservedCOMMENT
LOWbenchmarks/adversarial_ccr_tests.py1505 # Check if we kept the TARGET itemCOMMENT
LOWbenchmarks/adversarial_ccr_tests.py1614 # Check if null-byte items were preserved (they have status=error)COMMENT
LOWbenchmarks/adversarial_ccr_tests.py332 # Check if anomaly was preservedCOMMENT
LOWbenchmarks/adversarial_ccr_tests.py618 # Check if our compression worked despite fake markersCOMMENT
LOWbenchmarks/adversarial_ccr_tests.py1001 # Check if the nested error was preservedCOMMENT
LOWbenchmarks/adversarial_ccr_tests.py1121 # Check if future timestamp was preservedCOMMENT
LOWbenchmarks/compression_benchmark.py537 # Check if most key terms appear in answerCOMMENT
LOWbenchmarks/run_benchmarks.py260 # Write fileCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py150 # Check if ALL errors were retainedCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py225 # Check if target UUID was foundCOMMENT
56 more matches not shown…
Modern AI Meta-Vocabulary46 hits · 145 pts
SeverityFileLineSnippetContext
MEDIUMCHANGELOG.md115* **wrap/doctor:** make the Claude Remote Control gate warning accurate and stop it firing for users who never had the fCOMMENT
MEDIUMcrates/headroom-core/src/ccr/mod.rs63/// (`CCRConfig.store_ttl_seconds`). Session-scale: agentic sessionsCOMMENT
MEDIUMREALIGNMENT/04-phase-B-live-zone.md88- **MessageScorer Rust port retirement:** PR #338 and #343 (April 2026) ported MessageScorer to Rust. That work becomes CODE
MEDIUMREALIGNMENT/12-decisions-needed.md35The PR #338 / #343 port (April 2026) was investment in the wrong abstraction (per Agent G's audit: scoring's only consumCODE
MEDIUMtests/test_proxy_warmup.py102# Startup orchestration tests — use HeadroomProxy + stubbed transformsCOMMENT
MEDIUMtests/test_openai_codex_ws_lifecycle.py768 # out is a cancel from the handler's orchestration.COMMENT
MEDIUMtests/test_memory_handler_native_ops.py848 # handles its own context window. See ``MemoryQuery``.COMMENT
MEDIUMtests/test_relevance_split.py202 # the embedding model on the request thread (the swap happens later, in theCOMMENT
MEDIUMtests/test_memory/test_traffic_learner.py2105 # Malformed input — we'd rather drop than persist scaffolding.COMMENT
MEDIUMtests/test_cli/test_wrap_helpers.py840# _resolve_1m_model — 1M context window suffix logic (#1158).COMMENT
MEDIUMwiki/langchain.md396### Example 2: RAG Pipeline with Document FilteringCOMMENT
MEDIUMbenchmarks/agent_cost_benchmark.py348# SCENARIO 3: RAG Context ScalingCOMMENT
MEDIUMbenchmarks/agent_cost_benchmark.py362 # Generate RAG conversation with ~50K tokens of contextCOMMENT
MEDIUMbenchmarks/bench_latency.py114 content_type: str # json, code, text, logs, agentic, ragCODE
MEDIUMbenchmarks/bench_latency.py589 # Set a model_limit large enough to exercise compression on big agentic contextsCOMMENT
MEDIUMbenchmarks/bench_latency.py601 # --- RAG conversations ---COMMENT
MEDIUMbenchmarks/bench_latency.py864 # --- Per-Transform Breakdown (for agentic/rag scenarios) ---COMMENT
MEDIUM.github/workflows/ci.yml7# prefetch-model — download the embedding model ONCE (authenticated), warm shared cacheCOMMENT
MEDIUMheadroom/config.py540 # Session-scale TTL. The original 5-minute default predates agenticCOMMENT
MEDIUMheadroom/__init__.py189 # Shared context for multi-agent workflowsCOMMENT
MEDIUMheadroom/parser.py39# Patterns for RAG detection (best effort)COMMENT
MEDIUMheadroom/parser.py260 # Check if this looks like RAG contentCOMMENT
MEDIUMheadroom/evals/datasets.py49# RAG / RETRIEVAL DATASETSCOMMENT
MEDIUMheadroom/evals/datasets.py1148 # RAG/RetrievalCOMMENT
MEDIUMheadroom/evals/README.md176### RAG / RetrievalCOMMENT
MEDIUMheadroom/evals/__main__.py389 python -m headroom.evals benchmark --dataset rag # Run all RAG datasetsCODE
MEDIUMheadroom/learn/models.py162 # guards against a detected repeated pattern. Loop guardrails are rankedCOMMENT
MEDIUMheadroom/learn/analyzer.py200 # Weight loop guardrails above one-off rules using MEASURED waste.COMMENT
MEDIUMheadroom/memory/traffic_learner.py958 # implementation matched scaffolding ("don't mention thisCOMMENT
MEDIUMheadroom/proxy/server.py775 # code/RAG context — see issue #454).COMMENT
MEDIUMheadroom/proxy/server.py2848 # remain the unauthenticated probes for orchestration health.COMMENT
MEDIUMheadroom/proxy/models.py219 # of input lives in user messages (pasted code/text, RAG context) and theCOMMENT
MEDIUMheadroom/proxy/helpers.py2612# local context window — tens of K tokens. That decision is made client-sideCOMMENT
MEDIUMheadroom/proxy/helpers.py2724# Anthropic then excludes deferred tools from the context window (they stopCOMMENT
MEDIUMheadroom/proxy/handlers/anthropic.py2256 # them from the context window — they stop counting as input tokens untilCOMMENT
MEDIUMheadroom/providers/openai.py72# OpenAI context window limitsCOMMENT
MEDIUMheadroom/providers/anthropic.py96 # Claude Sonnet 4.6 - 1M context windowCOMMENT
MEDIUMheadroom/providers/claude/runtime.py12# every one into its context window) when ANTHROPIC_BASE_URL is a custom hostCOMMENT
MEDIUMheadroom/providers/claude/runtime.py30# family as #746 (on-demand tool loading) and #1158 (1M context window), both ofCOMMENT
MEDIUMheadroom/providers/claude/install.py20 # its context window (GH #746) — breaking sub-agents and forcing compaction.COMMENT
MEDIUMheadroom/cli/init.py170 # all into its context window — overflowing it (breaks sub-agent spawns,COMMENT
MEDIUMheadroom/cli/wrap.py169# inflates the local context window by tens of K tokens. Setting the env varCOMMENT
MEDIUMheadroom/cli/wrap.py179# 1M context window for `wrap claude` (#1158). Claude Code only sends theCOMMENT
MEDIUMheadroom/cli/wrap.py4208 # Issue #1158: opt-in 1M context window. Claude Code only sends theCOMMENT
MEDIUMheadroom/cli/wrap.py3932 headroom wrap claude --1m # Preserve the 1M context windowSTRING
MEDIUMheadroom/transforms/content_router.py1144 # embedding model is pre-warmed in the background (BM25 scores until it'sCOMMENT
Self-Referential Comments43 hits · 134 pts
SeverityFileLineSnippetContext
MEDIUMcrates/headroom-core/config/pipeline.toml3# This file is embedded into the headroom-core binary via `include_str!`COMMENT
MEDIUMtests/test_security_validations.py109 # Create a memory with safe metadataCOMMENT
MEDIUMtests/test_memory_system.py642 # Create a simple graph: e1 -> e2 -> e3COMMENT
MEDIUMtests/test_memory_system.py802 # Create a chain longer than max_depthCOMMENT
MEDIUMtests/test_memory_system.py665 # Create a chain: e1 -> e2 -> e3 -> e4COMMENT
MEDIUMtests/test_memory_system.py1688 # Create a graph structureCOMMENT
MEDIUMtests/test_image_compression.py256 # Create a simple test imageCOMMENT
MEDIUMtests/test_image_compressor.py61 # Create a simple 100x100 red imageCOMMENT
MEDIUMtests/test_image_compressor.py74 # Create a 1024x1024 image with some patternCOMMENT
MEDIUMtests/test_critical_fixes.py110 # Create a signature using the correct factory methodCOMMENT
MEDIUMtests/test_critical_gaps.py69 # Create a patternCOMMENT
MEDIUMtests/test_toin_feedback.py338 # Create a minimal proxy to test the methodCOMMENT
MEDIUMtests/test_proxy_batch_integration.py76 # Create a list of items that will be compressibleCOMMENT
MEDIUMtests/test_backend_bugs.py617 # Create an async iterator for the mock streaming responseCOMMENT
MEDIUMtests/test_acceptance.py16# Create a shared provider for testsCOMMENT
MEDIUMtests/repro_unsendable_panic.py41 # Create the parser on the main threadCOMMENT
MEDIUMtests/test_memory_tracker_integration.py414 # Create a component that reports large sizeCOMMENT
MEDIUMtests/test_memory_sync.py232 # Create an existing MEMORY.mdCOMMENT
MEDIUMtests/test_adapter_hooks.py213 # Create a new TOIN instance with same backend — should load patternsCOMMENT
MEDIUMtests/test_cli_update.py247 # Create a fake .pyd fileCOMMENT
MEDIUMtests/test_proxy_streaming_resilience.py247 # Create a realistic HTTP 429 errorCOMMENT
MEDIUMtests/test_proxy_compress_endpoint.py175 # Create a large repetitive tool output that should be compressibleCOMMENT
MEDIUMtests/test_cache/test_client_integration.py294 # Create a spy optimizer to track callsCOMMENT
MEDIUMtests/test_cache/test_client_integration.py618 # Create a conversation that will trigger some optimizationCOMMENT
MEDIUMtests/test_integrations/langchain/test_chat_model.py1213 # Create a conversation with repetitive content that should be compressedCOMMENT
MEDIUMtests/test_integrations/agno/test_model.py877 # Create a real OpenAIChat model (doesn't need API key for instantiation)COMMENT
MEDIUMtests/test_integrations/agno/test_model.py55 # Create a proper ModelResponse that Agno's response() can processCOMMENT
MEDIUMtests/test_memory/test_hierarchical.py344 # Create a chain: v1 -> v2 -> v3COMMENT
MEDIUMtests/test_memory/test_hierarchical.py594 # Create a supersession chainCOMMENT
MEDIUMtests/test_memory/test_budget.py124 # Create a manager with git check disabled but file-exists check activeCOMMENT
MEDIUMtests/test_memory/test_budget.py147 # Create the referenced fileCOMMENT
MEDIUMtests/test_transforms/test_diff_compressor.py124 # Create a diff with many hunksCOMMENT
MEDIUMe2e/_lib/make_shim.sh2# Create a noop executable shim at $2/$1 suitable for use in PATH duringCOMMENT
MEDIUMheadroom/evals/batch_compression_eval.py737 # Create a long documentCOMMENT
MEDIUMheadroom/evals/runners/compression_only.py294 # Create a document with specific facts embeddedCOMMENT
MEDIUMheadroom/memory/backends/direct_mem0.py587 # Create the background taskSTRING
MEDIUMheadroom/memory/adapters/fts5.py412 # Create a minimal Memory object from FTS dataCOMMENT
MEDIUMheadroom/cache/compression_store.py765 # Create a synthetic "success" event that we'll process laterCOMMENT
MEDIUMheadroom/backends/anyllm.py49 # Create the AnyLLM instance once and reuse. api_key/api_base are onlyCOMMENT
MEDIUMheadroom/integrations/asgi.py164 # Create a new receive that returns the (possibly modified) bodyCOMMENT
MEDIUMheadroom/integrations/strands/hooks.py10 # Create the hook providerSTRING
MEDIUMheadroom/transforms/content_router.py639 # Create a deterministic structure hash based on content typeCOMMENT
MEDIUMheadroom/transforms/content_router.py1444 # Create a content-type signatureCOMMENT
Structural Annotation Overuse61 hits · 111 pts
SeverityFileLineSnippetContext
LOWcrates/headroom-core/tests/ccr_backends.rs136 // Step 1: same payload yields byte-equal keys.COMMENT
LOWcrates/headroom-core/tests/ccr_backends.rs139 // Step 2: store in sqlite, mirror to in-memory under the sameCOMMENT
LOWtests/test_proxy_count_tokens_integration.py464 # Step 1: Count tokens with large contentSTRING
LOWtests/test_proxy_count_tokens_integration.py470 # Step 2: Make countTokens requestSTRING
LOWtests/test_proxy_count_tokens_integration.py479 # Step 3: Verify stats updatedSTRING
LOWtests/test_proxy_count_tokens_integration.py483 # Step 4: Verify tokens saved is tracked (may be negative for small overhead)STRING
LOWtests/test_proxy_batch_integration.py150 # Step 1: Create JSONL content with compressible messagesCOMMENT
LOWtests/test_proxy_batch_integration.py169 # Step 2: Upload the JSONL file directly to OpenAICOMMENT
LOWtests/test_proxy_batch_integration.py183 # Step 3: Create batch through proxy with compressionCOMMENT
LOWtests/test_proxy_batch_integration.py221 # Step 4: Cancel the batch to avoid costsCOMMENT
LOWtests/test_proxy_ccr.py599 # Step 2: Retrieve through proxy endpoint (by hash → full content)COMMENT
LOWtests/test_proxy_ccr.py609 # Step 3: Verify TOIN learnedCOMMENT
LOWtests/test_proxy_ccr.py620 # Step 4: Verify field semantics were learnedCOMMENT
LOWtests/test_proxy_ccr.py627 # Step 5: PR-B5 retired the request-time recommendation API in favor ofCOMMENT
LOWwiki/ARCHITECTURE.md304### Step 1: You call the APICOMMENT
LOWwiki/ARCHITECTURE.md319### Step 2: HeadroomClient interceptsCOMMENT
LOWwiki/ARCHITECTURE.md331### Step 3: Transform Pipeline runsCOMMENT
LOWwiki/ARCHITECTURE.md362### Step 4: Call real APICOMMENT
LOWwiki/ARCHITECTURE.md371### Step 5: Log metrics and returnCOMMENT
LOWwiki/quickstart.md50### Step 1: Start the ProxyCOMMENT
LOWwiki/quickstart.md56### Step 2: Verify It's RunningCOMMENT
LOWwiki/quickstart.md63### Step 3: Point Your ClientCOMMENT
LOWwiki/quickstart.md80### Step 4: Check SavingsCOMMENT
LOWwiki/macos-deployment.md106### Step 1: Create Log DirectoryCOMMENT
LOWwiki/macos-deployment.md112### Step 2: Generate LaunchAgent PlistCOMMENT
LOWwiki/macos-deployment.md139### Step 3: Load the LaunchAgentCOMMENT
LOWwiki/macos-deployment.md145### Step 4: Verify ServiceCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py642 # Step 1: CompressCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py647 # Step 2: CacheCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py656 # Step 3: Record compression in feedbackCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py659 # Step 4: Retrieve and searchCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py663 # Step 5: Process feedbackCOMMENT
LOWbenchmarks/scenarios/conversations.py502### Step 1: SetupCOMMENT
LOWbenchmarks/scenarios/conversations.py508### Step 2: ImplementationCOMMENT
LOWbenchmarks/scenarios/conversations.py523### Step 3: TestingCOMMENT
LOWheadroom/memory/budget.py107 # Step 1: Apply temporal decay to importance scoresCOMMENT
LOWheadroom/memory/budget.py110 # Step 2: Detect and flag stale memoriesCOMMENT
LOWheadroom/memory/budget.py114 # Step 3: Merge similar memoriesCOMMENT
LOWheadroom/memory/budget.py118 # Step 4: Rank by score and apply budgetCOMMENT
LOWheadroom/proxy/handlers/batch.py893 # Step 3: Create compressed JSONL contentCOMMENT
LOWheadroom/proxy/handlers/batch.py896 # Step 4: Upload compressed file to OpenAICOMMENT
LOWheadroom/proxy/handlers/batch.py861 # Step 1: Download the input file from OpenAICOMMENT
LOWheadroom/proxy/handlers/batch.py877 # Step 2: Parse and compress each lineCOMMENT
LOWheadroom/proxy/handlers/batch.py914 # Step 5: Create batch with compressed fileCOMMENT
LOWheadroom/cache/anthropic.py135 # Step 1: Analyze content sectionsCOMMENT
LOWheadroom/cache/anthropic.py138 # Step 2: Stabilize prefixCOMMENT
LOWheadroom/cache/anthropic.py144 # Step 3: Plan breakpoint placementCOMMENT
LOWheadroom/cache/anthropic.py148 # Step 4: Insert cache_control blocksCOMMENT
LOWheadroom/cache/anthropic.py153 # Step 5: Compute metricsCOMMENT
LOWheadroom/image/trained_router.py346 # Step 1: Classify query with trained modelCOMMENT
LOWheadroom/image/trained_router.py349 # Step 2: Analyze image with SigLIP (if enabled)COMMENT
LOWheadroom/image/trained_router.py355 # Step 3: Combine signals for final decisionCOMMENT
LOWheadroom/image/tile_optimizer.py60 # Step 1: scale so max dimension ≤ 2048COMMENT
LOWheadroom/image/tile_optimizer.py67 # Step 2: scale so shortest side ≤ 768COMMENT
LOWheadroom/image/tile_optimizer.py74 # Step 3: count 512×512 tilesCOMMENT
LOWheadroom/image/compressor.py649 # Step 2: ML-based technique routingCOMMENT
LOWheadroom/image/compressor.py699 # Step 3: Apply compression techniqueCOMMENT
LOWheadroom/image/compressor.py634 # Step 1: Tile-boundary optimization (always safe, pure math)COMMENT
LOWheadroom/telemetry/toin.py1438 # Step 1: Serialize under lock (fast in-memory operation)COMMENT
LOWheadroom/telemetry/toin.py1442 # Step 2: Write outside lock (slow I/O operation)COMMENT
1 more matches not shown…
Hallucination Indicators9 hits · 95 pts
SeverityFileLineSnippetContext
CRITICALtests/test_proxy_savings_history.py1162 client.app.state.proxy.metrics.savings_tracker.flush()CODE
CRITICALtests/test_openai_chat_turn_hooks.py207 logs = client.app.state.proxy.logger.get_recent(10)CODE
CRITICALtests/test_compression/test_evals.py357 at com.example.app.client.InventoryClient.updateStock(InventoryClient.java:87)STRING
CRITICALtests/test_compression/test_evals.py358 at com.example.app.service.InventoryService.decrementStock(InventoryService.java:156)STRING
CRITICALbenchmarks/headroom_worst_case_benchmark.py290 at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:897)CODE
CRITICALbenchmarks/comprehensive_eval.py139 at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)CODE
CRITICALbenchmarks/comprehensive_eval.py140 at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376)CODE
CRITICALbenchmarks/comprehensive_eval.py143 at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1421)CODE
CRITICALheadroom/memory/wrapper.py243 response = self._wrapper._client.chat.completions.create(**kwargs)CODE
Verbosity Indicators48 hits · 90 pts
SeverityFileLineSnippetContext
LOWcrates/headroom-core/tests/ccr_backends.rs136 // Step 1: same payload yields byte-equal keys.COMMENT
LOWcrates/headroom-core/tests/ccr_backends.rs139 // Step 2: store in sqlite, mirror to in-memory under the sameCOMMENT
LOWtests/test_proxy_count_tokens_integration.py464 # Step 1: Count tokens with large contentSTRING
LOWtests/test_proxy_count_tokens_integration.py470 # Step 2: Make countTokens requestSTRING
LOWtests/test_proxy_count_tokens_integration.py479 # Step 3: Verify stats updatedSTRING
LOWtests/test_proxy_count_tokens_integration.py483 # Step 4: Verify tokens saved is tracked (may be negative for small overhead)STRING
LOWtests/test_proxy_batch_integration.py150 # Step 1: Create JSONL content with compressible messagesCOMMENT
LOWtests/test_proxy_batch_integration.py169 # Step 2: Upload the JSONL file directly to OpenAICOMMENT
LOWtests/test_proxy_batch_integration.py183 # Step 3: Create batch through proxy with compressionCOMMENT
LOWtests/test_proxy_batch_integration.py221 # Step 4: Cancel the batch to avoid costsCOMMENT
LOWtests/test_proxy_ccr.py599 # Step 2: Retrieve through proxy endpoint (by hash → full content)COMMENT
LOWtests/test_proxy_ccr.py609 # Step 3: Verify TOIN learnedCOMMENT
LOWtests/test_proxy_ccr.py620 # Step 4: Verify field semantics were learnedCOMMENT
LOWtests/test_proxy_ccr.py627 # Step 5: PR-B5 retired the request-time recommendation API in favor ofCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py642 # Step 1: CompressCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py647 # Step 2: CacheCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py656 # Step 3: Record compression in feedbackCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py659 # Step 4: Retrieve and searchCOMMENT
LOWbenchmarks/ccr_regression_benchmark.py663 # Step 5: Process feedbackCOMMENT
LOWbenchmarks/scenarios/conversations.py502### Step 1: SetupCOMMENT
LOWbenchmarks/scenarios/conversations.py508### Step 2: ImplementationCOMMENT
LOWbenchmarks/scenarios/conversations.py523### Step 3: TestingCOMMENT
LOWheadroom/memory/budget.py107 # Step 1: Apply temporal decay to importance scoresCOMMENT
LOWheadroom/memory/budget.py110 # Step 2: Detect and flag stale memoriesCOMMENT
LOWheadroom/memory/budget.py114 # Step 3: Merge similar memoriesCOMMENT
LOWheadroom/memory/budget.py118 # Step 4: Rank by score and apply budgetCOMMENT
LOWheadroom/proxy/handlers/batch.py893 # Step 3: Create compressed JSONL contentCOMMENT
LOWheadroom/proxy/handlers/batch.py896 # Step 4: Upload compressed file to OpenAICOMMENT
LOWheadroom/proxy/handlers/batch.py861 # Step 1: Download the input file from OpenAICOMMENT
LOWheadroom/proxy/handlers/batch.py877 # Step 2: Parse and compress each lineCOMMENT
LOWheadroom/proxy/handlers/batch.py914 # Step 5: Create batch with compressed fileCOMMENT
LOWheadroom/cache/anthropic.py135 # Step 1: Analyze content sectionsCOMMENT
LOWheadroom/cache/anthropic.py138 # Step 2: Stabilize prefixCOMMENT
LOWheadroom/cache/anthropic.py144 # Step 3: Plan breakpoint placementCOMMENT
LOWheadroom/cache/anthropic.py148 # Step 4: Insert cache_control blocksCOMMENT
LOWheadroom/cache/anthropic.py153 # Step 5: Compute metricsCOMMENT
LOWheadroom/image/trained_router.py346 # Step 1: Classify query with trained modelCOMMENT
LOWheadroom/image/trained_router.py349 # Step 2: Analyze image with SigLIP (if enabled)COMMENT
LOWheadroom/image/trained_router.py355 # Step 3: Combine signals for final decisionCOMMENT
LOWheadroom/image/tile_optimizer.py60 # Step 1: scale so max dimension ≤ 2048COMMENT
LOWheadroom/image/tile_optimizer.py67 # Step 2: scale so shortest side ≤ 768COMMENT
LOWheadroom/image/tile_optimizer.py74 # Step 3: count 512×512 tilesCOMMENT
LOWheadroom/image/compressor.py649 # Step 2: ML-based technique routingCOMMENT
LOWheadroom/image/compressor.py699 # Step 3: Apply compression techniqueCOMMENT
LOWheadroom/image/compressor.py634 # Step 1: Tile-boundary optimization (always safe, pure math)COMMENT
LOWheadroom/telemetry/toin.py1438 # Step 1: Serialize under lock (fast in-memory operation)COMMENT
LOWheadroom/telemetry/toin.py1442 # Step 2: Write outside lock (slow I/O operation)COMMENT
LOWheadroom/telemetry/toin.py1446 # Step 3: Update state under lock (fast)COMMENT
Magic Placeholder Names10 hits · 48 pts
SeverityFileLineSnippetContext
HIGHtests/test_transforms/test_html_extractor.py466 <pre><code>Authorization: Bearer YOUR_API_KEY</code></pre>CODE
HIGHwiki/typescript-sdk.md59 apiKey: 'your-api-key', // optional, for authenticated endpointsCODE
HIGHwiki/typescript-sdk.md92 apiKey: 'your-api-key',CODE
HIGHwiki/configuration.md431export HEADROOM_API_KEY=your-api-keyCODE
HIGHwiki/configuration.md443 apiKey: 'your-api-key',CODE
HIGHwiki/proxy.md317 api_key="your-api-key", # Still needed for upstreamCODE
HIGHsdk/typescript/README.md363 apiKey: 'your-api-key', // optional, for authenticated endpointsCODE
HIGHbenchmarks/scenarios/conversations.py542Authorization: Bearer <your-api-key>CODE
HIGHheadroom/evals/html_extraction.py557 <pre><code>Authorization: Bearer YOUR_API_KEY</code></pre>CODE
HIGHheadroom/providers/google.py14 genai.configure(api_key="your-api-key")STRING
Fake / Example Data36 hits · 32 pts
SeverityFileLineSnippetContext
LOWcrates/headroom-core/tests/live_zone_ccr.rs27 "notes": "lorem ipsum dolor sit amet, consectetur adipiscing elit",CODE
LOWcrates/headroom-core/tests/live_zone_ccr.rs27 "notes": "lorem ipsum dolor sit amet, consectetur adipiscing elit",CODE
LOW…/headroom-core/src/transforms/smart_crusher/anchors.rs295 assert!(anchors.contains("user@example.com"));CODE
LOW…-proxy/tests/integration_e3_anthropic_cache_control.rs84 .header("x-api-key", "sk-ant-api01-fake-key")CODE
LOW…-proxy/tests/integration_e3_anthropic_cache_control.rs174 .header("x-api-key", "sk-ant-api01-fake-key")CODE
LOW…-proxy/tests/integration_e3_anthropic_cache_control.rs278 .header("x-api-key", "sk-ant-api01-fake-key")CODE
LOW…-proxy/tests/integration_e3_anthropic_cache_control.rs374 .header("x-api-key", "sk-ant-api01-fake-key")CODE
LOWtests/test_memory_system.py1424 entities=["Alice", "Acme Corp"],CODE
LOWtests/test_memory_system.py1428 assert "Acme Corp" in memory.entity_refsCODE
LOWtests/test_memory_system.py1433 acme_entity = await graph.get_entity_by_name("alice", "Acme Corp")CODE
LOWtests/test_memory_system.py1445 entities=["Alice", "Acme Corp"],CODE
LOWtests/test_memory_system.py1446 relationships=[{"source": "Alice", "target": "Acme Corp", "type": "works_at"}],CODE
LOWtests/test_memory_integration.py412 entities=["Alice", "Acme Corp"],CODE
LOWtests/test_memory_integration.py415 {"entity": "Acme Corp", "entity_type": "organization"},CODE
LOWtests/test_memory_integration.py421 "destination": "Acme Corp",CODE
LOWtests/test_memory_integration.py430 entities=["Acme Corp", "San Francisco"],CODE
LOWtests/test_memory_integration.py432 {"entity": "Acme Corp", "entity_type": "organization"},CODE
LOWtests/test_quality_retention.py325 "snippet": "Lorem ipsum " * 20,CODE
LOWtests/test_backend_bugs.py778 "x-api-key": "sk-ant-dummy-key",CODE
LOWtests/test_backend_bugs.py779 "authorization": "Bearer sk-ant-dummy-key",CODE
LOWtests/parity/recorder.py571 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",STRING
LOWtests/parity/recorder.py571 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",STRING
LOWtests/test_transforms/test_html_extractor.py218 <meta name="author" content="John Doe">CODE
LOWtests/test_compression/test_llm_eval.py201 email="admin@example.com",CODE
LOWwiki/langchain.md525 ("placeholder", "{agent_scratchpad}"),CODE
LOWexamples/mcp_demo/run_agent_eval.py180 "email": "test@test.com",CODE
LOWexamples/mcp_demo/mock_mcp_servers.py179 "body": "Lorem ipsum dolor sit amet..." if random.random() > 0.5 else "",CODE
LOWexamples/mcp_demo/mock_mcp_servers.py179 "body": "Lorem ipsum dolor sit amet..." if random.random() > 0.5 else "",CODE
LOWscripts/replay_codex_ws_load.py126 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "CODE
LOWscripts/replay_codex_ws_load.py126 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "CODE
LOWscripts/replay_codex_ws_load.py154 # plain_text_like / unknown / jsonl_like → lorem ipsum is fine as aCOMMENT
LOWheadroom/evals/datasets.py1040 "name": "Acme Corp",CODE
LOWheadroom/memory/tools.py326 Example: [{"source": "user", "relationship": "works_at", "destination": "Acme Corp"}]CODE
LOWheadroom/memory/extraction.py106 {"entity": "Acme Corp", "entity_type": "organization"},CODE
LOWheadroom/memory/backends/local.py98 entities=["Alice", "Acme Corp"],STRING
LOWheadroom/memory/backends/local.py99 relationships=[{"source": "Alice", "target": "Acme Corp", "type": "works_at"}],STRING
AI Structural Patterns28 hits · 22 pts
SeverityFileLineSnippetContext
LOWplugins/headroom-oauth2/src/headroom_oauth2/provider.py41CODE
LOWtests/test_memory_system.py898CODE
LOWtests/test_proxy_compression_executor.py114CODE
LOWheadroom/pipeline.py132CODE
LOWheadroom/evals/prompt_comparison.py537CODE
LOWheadroom/memory/core.py131CODE
LOWheadroom/memory/easy.py108CODE
LOWheadroom/memory/backends/direct_mem0.py531CODE
LOWheadroom/memory/backends/local.py231CODE
LOWheadroom/memory/adapters/embedders.py155CODE
LOWheadroom/memory/adapters/hnsw.py223CODE
LOWheadroom/proxy/savings_tracker.py615CODE
LOWheadroom/proxy/server.py1769CODE
LOWheadroom/proxy/prometheus_metrics.py570CODE
LOWheadroom/proxy/outcome.py190CODE
LOWheadroom/proxy/helpers.py167CODE
LOWheadroom/proxy/handlers/streaming.py787CODE
LOWheadroom/proxy/handlers/streaming.py958CODE
LOWheadroom/cache/semantic.py412CODE
LOWheadroom/cache/compression_store.py253CODE
LOWheadroom/prediction/feature_extractor.py2298CODE
LOWheadroom/cli/wrap.py423CODE
LOWheadroom/cli/wrap.py2992CODE
LOWheadroom/cli/wrap.py3501CODE
LOWheadroom/observability/metrics.py324CODE
LOWheadroom/transforms/smart_crusher.py255CODE
LOWheadroom/transforms/content_router.py4278CODE
LOWheadroom/telemetry/collector.py101CODE
Dead Code9 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_openai_responses_context_compaction.py357CODE
MEDIUMtests/test_openai_responses_context_compaction.py358CODE
MEDIUMtests/test_openai_responses_context_compaction.py369CODE
MEDIUMtests/test_openai_responses_context_compaction.py373CODE
MEDIUMtests/test_openai_responses_context_compaction.py378CODE
MEDIUMtests/test_openai_responses_context_compaction.py381CODE
MEDIUMtests/test_bedrock_region.py549CODE
MEDIUMtests/test_integrations/langchain/test_streaming.py609CODE
MEDIUMheadroom/backends/base.py165CODE
Overly Generic Function Names12 hits · 11 pts
SeverityFileLineSnippetContext
LOWtests/test_search_compressor.py39src/main.py:42:def process_data(items):CODE
LOWtests/test_search_compressor.py24 content = """src/main.py:42:def process_data(items):CODE
LOWtests/test_search_compressor.py66C:\\Users\\dev\\src\\utils.py:20:def helper():CODE
LOWtests/test_search_compressor.py176 content = """src/main.py:10:def process_data():CODE
LOWtests/test_ccr_rust_marker_hash_bridge.py65 original = "src/app.py:12: def handle_request(payload):\n" * 40CODE
LOWtests/test_compression_summary.py101 ("function handleRequest(req, res) {", " res.send('ok');", 5),CODE
LOWtests/test_text_compressors.py36 content = """src/main.py:42:def process_data(items):CODE
LOWtests/test_text_compressors.py90def process_data(items: list[dict]) -> dict[str, Any]:CODE
LOWtests/test_transforms/test_content_router.py97 lines.append(f"src/module{i}.py:42: def process_data(input: str) -> str:")CODE
LOWheadroom/evals/batch_compression_eval.py716function processData(items) {CODE
LOWheadroom/transforms/code_compressor.py805 ... def process_data(items: List[str]) -> List[str]:STRING
LOWheadroom/transforms/code_compressor.py821 def process_data(items: List[str]) -> List[str]:STRING
Cross-Language Confusion (JS/TS)1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsdk/typescript/test/parity.test.ts73print(json.dumps({CODE
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM.serena/project.yml74# Same syntax as gitignore, so you can use * and **.COMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/test_proxy_count_tokens_integration.py300# Example usageCOMMENT
LOW…ples/deployment/macos-launchagent/shell-integration.sh8# Usage:COMMENT
TODO Padding1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_search_compressor.py226src/main.py:30:# TODO: implement laterCODE