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.

38.5 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of chopratejas/headroom, a Python project with 67,929 GitHub stars. SynthScan v2.0 examined 668,133 lines of code across 1978 source files, recording 18491 pattern matches distributed across 26 syntactic categories. The overall adjusted score of 38.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).

38.5
Adjusted Score
38.5
Raw Score
100%
Time Factor
2026-08-28
Last Push
67.9K
Stars
Python
Language
668.1K
Lines of Code
2.0K
Files
18.5K
Pattern Hits
2026-08-29
Scan Date
0.12
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 10HIGH 228MEDIUM 2827LOW 15426

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 18491 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.

Hyper-Verbose Identifiers10554 hits · 10210 pts
SeverityFileLineSnippetContext
LOW…ates/headroom-core/src/transforms/search_compressor.rs13//! src/models.py:15:class DataProcessor:COMMENT
LOWplugins/headroom-oauth2/tests/test_oauth2.py310def test_install_noop_when_unset(monkeypatch):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py320def test_install_fail_closed_on_bad_config(monkeypatch):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py327def test_install_warns_for_envauth_backend(monkeypatch, caplog):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py144def test_concurrent_single_flight(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py158def test_error_on_bad_status_hides_body(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py166def test_error_body_drain_failure_is_sanitized(monkeypatch, caplog):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py193def test_unreachable_token_url():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py241def test_parse_headers_rejects_control_chars():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py247def test_provider_from_env_wires_knobs(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py264def test_provider_from_env_none_when_unset():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py269def test_middleware_injects_bearer(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py280def test_middleware_non_http_passthrough():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py344def test_install_fail_closed_on_bad_timeout(monkeypatch):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py353def test_parse_headers_rejects_bad_keys():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py365def test_middleware_handles_missing_headers_key(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py406def test_allow_insecure_env_permits_nonloopback_http():CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py419def test_extra_params_cannot_override_canonical(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py435def test_auth_style_basic_via_env(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py449def test_scopes_comma_separated_via_env(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py462def test_expires_in_missing_falls_back(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py469def test_expires_in_non_numeric_falls_back(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py485def test_single_flight_on_refresh(idp):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py499def test_install_sets_static_headers(monkeypatch):CODE
LOWplugins/headroom-oauth2/tests/test_oauth2.py519def test_install_handles_invalid_litellm_headers(monkeypatch, caplog):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.ts199function normalizedOpenAiProxyPath(pathname: string): string | undefined {CODE
LOWplugins/opencode/src/transport.ts483export function uninstallHeadroomTransport(): void {CODE
LOWplugins/opencode/src/provider.ts73export function buildOpencodeConfigContent(CODE
LOWplugins/opencode/src/provider.ts85export function buildOpencodeConfigContentJson(CODE
LOWtests/test_copilot_integration_id_hmac.py90def test_token_is_minted_under_the_clients_integration_id(monkeypatch) -> None:CODE
LOWtests/test_copilot_integration_id_hmac.py101def test_forwarded_header_matches_the_minted_token(monkeypatch) -> None:CODE
LOWtests/test_copilot_integration_id_hmac.py112def test_no_duplicate_integration_id_header_is_emitted(monkeypatch) -> None:CODE
LOWtests/test_copilot_integration_id_hmac.py127def test_a_forwardable_client_token_keeps_the_clients_id(monkeypatch) -> None:CODE
LOWtests/test_copilot_integration_id_hmac.py143def test_a_client_that_states_its_identity_beats_the_configured_default(CODE
LOWtests/test_copilot_integration_id_hmac.py160def test_the_configured_default_applies_when_the_client_sends_none(CODE
LOWtests/test_copilot_integration_id_hmac.py172def test_client_value_wins_over_the_default(monkeypatch) -> None:CODE
LOWtests/test_copilot_integration_id_hmac.py176def test_default_when_the_client_sends_none(monkeypatch) -> None:CODE
LOWtests/test_copilot_integration_id_hmac.py186def test_blank_client_values_fall_back(blank) -> None:CODE
LOWtests/test_copilot_integration_id_hmac.py190def test_non_copilot_upstream_is_untouched(monkeypatch) -> None:CODE
LOWtests/test_copilot_integration_id_hmac.py203def test_tokens_are_cached_per_integration_id(monkeypatch) -> None: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
10494 more matches not shown…
Decorative Section Separators2608 hits · 9166 pts
SeverityFileLineSnippetContext
MEDIUMrun-all-plugins.sh2# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMrun-all-plugins.sh13# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMrun-all-plugins.sh24# ── 1. venv ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMrun-all-plugins.sh31# ── 2. install (guarded) ──────────────────────────────────────────────────────COMMENT
MEDIUMrun-all-plugins.sh63# ── 3. secrets from ~/env.txt ─────────────────────────────────────────────────COMMENT
MEDIUMrun-all-plugins.sh71# ── 4. plugin license (Ed25519, offline, wildcard) ────────────────────────────COMMENT
MEDIUMrun-all-plugins.sh83# ── 5. Kompress ML offload → Modal ────────────────────────────────────────────COMMENT
MEDIUMrun-all-plugins.sh90# ── 6. observability sink → Langfuse + spend attribution ──────────────────────COMMENT
MEDIUMrun-all-plugins.sh102# ── 7. tier_router ─────────────────────────────────────────────────────────────COMMENT
MEDIUMrun-all-plugins.sh108# ── 8. plugin tuning (defaults shown; override as needed) ─────────────────────COMMENT
MEDIUMrun-all-plugins.sh115# ── 9. coding profile + mode ───────────────────────────────────────────────────COMMENT
MEDIUMrun-all-plugins.sh120# ── 10. run + confirm ──────────────────────────────────────────────────────────COMMENT
MEDIUMCargo.toml89# ── Release profile — wheel size optimization ───────────────────────COMMENT
MEDIUMdocker-compose.yml1# =============================================================================COMMENT
MEDIUMdocker-compose.yml3# =============================================================================COMMENT
MEDIUMdocker-compose.yml33# =============================================================================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/config/pipeline.toml153# ─── Structured prose-field offload config ─────────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/ccr_backends.rs155// ─── Sliding (idle-window) TTL semantics — #2604 ───────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/ccr_backends.rs155// ─── Sliding (idle-window) TTL semantics — #2604 ───────────────────────COMMENT
MEDIUMcrates/headroom-core/tests/ccr_backends.rs324// ─── 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.rs404// ─── 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.rs152// ─── 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.rs917// ─── Hunk selection (max_hunks_per_file cap) ───────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1000// ─── Context trimming ──────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1083// ─── Output formatter ──────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1153// ─── Helpers ───────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1217// ─── Tests ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1315 // ─── Lossy-path tests ───────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/diff_compressor.rs1515 // ─── Bug-fix tests (rename/combined-diff/no-newline/pre-diff) ──────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/kompress.rs71// ─── Tunable defaults (parity-pinned to kompress-v2-base) ───────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/kompress.rs108// ─── Types ──────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/kompress.rs185// ─── Compressor ─────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/kompress.rs559// ─── Loading helpers ────────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs451 // ── JSON ───────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs458 // ── Diffs ──────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs461 // ── HTML ───────────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs464 // ── Source code ────────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs475 // ── Plain text-ish ─────────────────────────────────────────COMMENT
MEDIUMcrates/headroom-core/src/transforms/magika_detector.rs483 // ── Default: passthrough ───────────────────────────────────COMMENT
2548 more matches not shown…
Unused Imports2031 hits · 1834 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_copilot_integration_id_hmac.py32CODE
LOWtests/test_quota_registry.py3CODE
LOWtests/test_sse_thinking_blocks.py21CODE
LOWtests/test_paths_backward_compat.py16CODE
LOWtests/test_usage_reporter_snapshot.py6CODE
LOWtests/test_provider_codex_install.py1CODE
LOWtests/test_token_count_cache.py8CODE
LOWtests/test_memory_decision.py27CODE
LOWtests/test_extension_attribution.py10CODE
LOWtests/test_dataset_recall_runner.py9CODE
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_error_detection.py3CODE
LOWtests/test_proxy_pipeline_lifecycle.py1CODE
LOWtests/test_tool_injection_config.py1CODE
LOWtests/_gemini_live.py3CODE
LOWtests/test_wrap_concurrent_settings.py16CODE
LOWtests/test_codex_ws_per_frame_memory.py1CODE
LOWtests/test_memory_rank_policy.py3CODE
LOWtests/test_mcp_registry_grok.py1CODE
LOWtests/test_hermes_passthrough_compression.py15CODE
LOWtests/test_openai_responses_buffered_sse.py5CODE
LOWtests/test_openai_responses_context_compaction.py1CODE
LOWtests/test_codex_ws_savings_deferral.py11CODE
LOWtests/test_websearch_tool_result_protection.py3CODE
LOWtests/test_image_compression_offload.py9CODE
LOWtests/test_turn_hooks.py10CODE
LOWtests/test_system_compaction.py10CODE
LOWtests/test_provider_copilot_vscode_config.py1CODE
LOWtests/test_proxy_loop_exception_health.py3CODE
LOWtests/test_provider_registry_extended.py1CODE
LOWtests/test_stats_new_input_savings_rate.py10CODE
LOWtests/test_outcome_token_scale.py19CODE
LOWtests/test_utils.py1CODE
LOWtests/test_proxy_cache_ttl_metrics.py3CODE
LOWtests/test_prometheus_obs_counters.py17CODE
LOWtests/test_storage_backends.py1CODE
LOWtests/test_provider_route_specs.py1CODE
LOWtests/test_codex_rate_limits.py3CODE
LOWtests/test_stateless_writers.py8CODE
LOWtests/test_cli_memory_index_sync.py12CODE
LOWtests/test_update_helpers.py3CODE
LOWtests/test_stateless_toin.py7CODE
LOWtests/test_request_body_decompression_limits.py17CODE
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
1971 more matches not shown…
Over-Commented Block916 hits · 818 pts
SeverityFileLineSnippetContext
LOWrun-all-plugins.sh1#!/usr/bin/env bashCOMMENT
LOWrun-all-plugins.sh81fiCOMMENT
LOWrun-all-plugins.sh101COMMENT
LOWCargo.toml41# I1 (byte-faithful passthrough on unmutated bytes; see REALIGNMENT/02-COMMENT
LOWCargo.toml61axum = "0.8"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 "headroom-ai[proxy]",COMMENT
LOWpyproject.toml121 "transformers>=5.5.0,<6.0",COMMENT
LOWpyproject.toml161# Stage 3c.1 — fastembed is faster (~2-3x), smaller (no torchCOMMENT
LOWpyproject.toml301# All optional dependencies (everything you need).COMMENT
LOWpyproject.toml341Changelog = "https://github.com/chopratejas/headroom/blob/main/CHANGELOG.md"COMMENT
LOWpyproject.toml361 # GHSA-4xgf-cpjx-pc3j (Medium) — transitive via mcp; fix at 2.14.2COMMENT
LOWpyproject.toml381COMMENT
LOWdocker-compose.yml1# =============================================================================COMMENT
LOWdocker-compose.yml21# None of these three services authenticates inbound callers by default: theCOMMENT
LOWdocker-compose.yml41 args:COMMENT
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.rs141 ComparisonOutcome::Skipped { reason } => {COMMENT
LOWcrates/headroom-parity/src/lib.rs181COMMENT
LOWcrates/headroom-parity/src/lib.rs241 // Rust default rather than to a Python-equivalent value, so theCOMMENT
LOWcrates/headroom-parity/src/lib.rs521 Ok(serde_json::json!({COMMENT
LOWcrates/headroom-parity/src/lib.rs621/// `kompress-v2-base` ONNX model + ModernBERT tokenizer. The comparatorCOMMENT
LOWcrates/headroom-core/Cargo.toml21# `hf-hub` is the HuggingFace Hub client. We use the blocking `ureq` transportCOMMENT
LOWcrates/headroom-core/Cargo.toml41# ASCII terminators, so the default ASCII splitter/tokenizer collapses a wholeCOMMENT
LOWcrates/headroom-core/Cargo.toml61# >15% ratio divergence so small per-byte differences don't change theCOMMENT
LOWcrates/headroom-core/Cargo.toml81# Stage-3d ContentRouter detection arch). Bundled standard-model isCOMMENT
LOWcrates/headroom-core/Cargo.toml101aho-corasick = "1"COMMENT
LOWcrates/headroom-core/Cargo.toml121blake3 = "1"COMMENT
LOWcrates/headroom-core/Cargo.toml161# on Windows it emits DirectML link libs (`DXCORE`, `DXGI`, `D3D12`,COMMENT
LOWcrates/headroom-core/Cargo.toml181# the ONNX-backed transforms (fastembed embeddings, magika detection, theCOMMENT
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/ccr_backends.rs241COMMENT
LOWcrates/headroom-core/tests/kompress_parity.rs1//! Byte-parity integration test for the Kompress Rust port.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
856 more matches not shown…
Excessive Try-Catch Wrapping868 hits · 763 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
LOWtests/e2e_cortex_savings.py382 except Exception as e:CODE
LOWtests/test_prometheus_obs_counters.py170 except Exception as exc: # pragma: no cover - failure pathCODE
LOWtests/conftest.py170 except Exception:CODE
MEDIUMtests/conftest.py121def _reset_litellm_model_resolution_cache():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
LOWtests/test_tokenizer.py54 except Exception: # vocab unavailable → estimator fallback; monotonicity above still holdsCODE
MEDIUMtests/test_compression_cache.py587def reader() -> None:CODE
MEDIUMtests/test_compression_cache.py594def writer() -> None:CODE
LOWtests/test_compression_cache.py116 except Exception as exc: # pragma: no coverCODE
LOWtests/test_compression_cache.py591 except Exception as e: # pragma: no coverCODE
LOWtests/test_compression_cache.py599 except Exception as e: # pragma: no coverCODE
LOWtests/test_compression_cache.py700 except Exception as e: # pragma: no coverCODE
LOWtests/test_compression_cache.py740 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
LOWtests/test_upstream_guard.py213 except Exception: # noqa: BLE001 - route errors are not the subjectCODE
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
LOWtests/test_proxy_hardening.py258 except Exception: # noqa: BLE001 - the refusal shape is asserted aboveCODE
808 more matches not shown…
Cross-Language Confusion117 hits · 630 pts
SeverityFileLineSnippetContext
HIGHtests/test_ccr_tool_injection.py328 """A tool call with an explicit {"function": null} / {"functionCall": null}STRING
HIGHtests/test_proxy_savings_history.py1350 assert "if (this.historySelectedSeriesKey === 'history') return null;" in htmlCODE
HIGHtests/test_ccr_tool_calls.py62 # A partial/streamed OpenAI tool call with an explicit {"function": null}COMMENT
HIGHtests/test_output_steering.py39 # A malformed client block ({"type": "text", "text": null}) must not crashCOMMENT
HIGHtests/test_copilot_vscode_completions_routing.py205 ``token?.endpoints.proxy || DEFAULT_PROXY_BASE_URL`` whereSTRING
HIGHtests/test_stream_output_tokens.py105 'data: {"choices": [null]}\n\n',CODE
HIGHtests/test_stream_output_tokens.py106 'data: {"choices": [{"delta": null}]}\n\n',CODE
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_ccr_response_handler.py727 `choices: []` or `[null]` on content-filtered / usage-only responses)."""STRING
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_memory_handler_null_function.py5``{"function": null}`` (the default only applies to a missing key). BothSTRING
HIGHtests/test_proxy_handlers_batch.py676 # null), or a request whose `body` isn't a dict, must pass through insteadCOMMENT
HIGHtests/test_toin_feedback.py413 'data: {"type":"message_start","message":{"id":"msg_01","model":"claude-3-5-sonnet-20241022","role":"assistaCODE
HIGHtests/test_backend_nonstreaming_cache_metrics.py501 value null) rather than omitting them — the direct-Anthropic path alreadySTRING
HIGHtests/test_openai_codex_ws_timings.py294 with ``upstream_first_event`` absent (null)."""STRING
HIGHtests/test_anthropic_buffered_sse.py43 '"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":10,'CODE
HIGHtests/test_anthropic_buffered_sse.py56 '"stop_sequence":null},"usage":{"output_tokens":5}}\n\n'CODE
HIGHtests/test_tool_call_arguments_not_a_string.py75 """``{"function": null}`` / ``{"id": null}`` reach the same encode path."""STRING
HIGHtests/test_code_aware_brace_comment_regressions.py61 this.users.push(user);CODE
HIGHtests/test_proxy_streaming_request_logger.py291 b'"content":[],"stop_reason":null,"usage":{'CODE
HIGHtests/test_cache_prefix_overlay.py185 cmd = "cd /tmp/core && cat suma/apps/underwriting/followup/service.py"CODE
HIGHtests/test_cache_prefix_overlay.py211 _openai_asst("cd /tmp/core && rg -n foo ."),CODE
HIGHtests/test_cache_prefix_overlay.py213 _openai_asst("cd /tmp/core && cat foo.py"), # NEW delta (assistant)CODE
HIGHtests/test_proxy/test_gemini_savings_profile.py116 b'"usageMetadata":{"promptTokenCount":20,"candidatesTokenCount":null}}'CODE
HIGHtests/test_install/test_native_installers.py660 $InstallScript, [ref]$null, [ref]$null)STRING
HIGHtests/test_learn/test_subagent_scanning.py46 # A single line with an explicit {"message": null} must not crash the scanCOMMENT
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.py201 assert _bash_first_binary("source .venv/bin/activate && pytest -x") == "pytest"CODE
HIGHtests/test_memory/test_traffic_learner.py305 tool_input={"command": "source /project/.venv/bin/activate && pytest"},CODE
HIGHtests/test_memory/test_traffic_learner.py1845 assert _normalize_bash_for_hash("cd /tmp && ls") == "cd /tmp"CODE
HIGHtests/test_memory/test_traffic_learner.py271 tool_input={"command": "source .venv/bin/activate && ruff check ."},CODE
HIGHtests/parity/recorder.py1084 "type Maybe<T> = T | null;\n\n"CODE
HIGHtests/parity/recorder.py1091 " return null;\n"CODE
HIGHtests/parity/recorder.py1096 " this.items.push(item);\n"CODE
HIGHtests/parity/recorder.py695 "type Maybe<T> = T | null;\n"CODE
HIGHtests/parity/recorder.py1059 " results.push(clean);\n"CODE
HIGHtests/parity/recorder.py1147 " results.push(clean);\n"CODE
HIGHtests/parity/recorder.py1182 " if (item == null || item.isEmpty()) {\n"CODE
HIGHtests/parity/recorder.py1204 " if (items[i] == NULL || strlen(items[i]) == 0) {\n"CODE
57 more matches not shown…
Deep Nesting488 hits · 400 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/test_backend_anyllm.py483CODE
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_mixed_content_scan_cache.py23CODE
LOWtests/test_proxy_system_prompt_immutable.py371CODE
LOWtests/test_cache_control_ttl_order.py46CODE
LOWtests/test_memory_integration.py280CODE
LOWtests/test_openai_codex_ws_lifecycle.py1392CODE
LOWtests/test_critical_gaps.py163CODE
LOWtests/test_critical_gaps.py340CODE
LOWtests/test_critical_gaps.py355CODE
LOWtests/test_realignment_live_multi_turn.py559CODE
LOWtests/test_realignment_live_multi_turn.py864CODE
LOWtests/test_tag_protector_invariant.py121CODE
LOWtests/test_cross_turn_dedup.py141CODE
LOWtests/_mcp_stub.py58CODE
LOWtests/e2e_cortex_proxy_mcp.py148CODE
LOWtests/test_proxy_anthropic_cache_stability.py1661CODE
LOWtests/test_anthropic_pre_upstream_backpressure.py900CODE
LOWtests/test_anthropic_pre_upstream_backpressure.py905CODE
LOWtests/test_tool_result_interceptors.py28CODE
LOWtests/e2e_ws_responses_compression.py48CODE
LOWtests/test_claude_session_mode_benchmark.py442CODE
LOWtests/test_claude_session_mode_benchmark.py450CODE
LOWtests/test_upstream_guard.py185CODE
LOWtests/test_release_workflows.py543CODE
LOWtests/e2e_ws_codex_usage_headers.py65CODE
LOWtests/test_cache/test_prefix_tracker.py711CODE
LOWtests/test_cache/test_client_integration.py38CODE
LOWtests/test_integrations/langchain/test_chat_model.py1041CODE
LOWtests/test_integrations/agno/test_model.py1048CODE
LOWtests/test_cli/test_wrap_copilot.py56CODE
LOWtests/test_cli/test_wrap_copilot.py245CODE
LOWtests/test_cli/test_wrap_codex.py1550CODE
LOWtests/test_cli/test_wrap_codex.py1702CODE
LOWtests/test_cli/test_wrap_codex.py1758CODE
LOWtests/test_cli/test_wrap_grok.py25CODE
LOWtests/test_cli/test_mcp_reconcile.py204CODE
LOWtests/integrations/test_strands/test_hooks.py161CODE
LOWtests/test_transforms/test_code_compressor.py1336CODE
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/i18n_compression_eval.py171CODE
LOWbenchmarks/conftest.py52CODE
LOWbenchmarks/adversarial_ccr_tests.py1177CODE
LOWbenchmarks/adversarial_ccr_tests.py1582CODE
LOWbenchmarks/adversarial_ccr_tests.py1765CODE
428 more matches not shown…
Modern Structural Boilerplate290 hits · 290 pts
SeverityFileLineSnippetContext
LOWplugins/headroom-oauth2/src/headroom_oauth2/__init__.py16__all__ = ["OAuth2ClientCredentials", "OAuth2Error", "OAuth2Middleware", "install", "parse_headers"]CODE
LOWtests/test_providers_opencode_config.py22def _set_test_home(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_cli_learn.py435 def set_context_target(self, target: str | None) -> None:CODE
LOWtests/test_ssl_context.py87 def set_alpn_protocols(self, protocols: list[str]) -> None:CODE
LOW…ts/test_proxy/test_anthropic_ccr_deferred_injection.py107 def update_from_result(self, originals, compressed) -> None: # noqa: ARG002CODE
LOWtests/test_learn/test_opencode_scanner.py99def _set_mtime(path: Path, *, seconds: int) -> None:CODE
LOWtests/parity/recorder.py1388__all__ = [CODE
LOWtests/test_cli/test_wrap_codex.py31def _set_test_home(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_cli/test_wrap_opencode.py38def _set_test_home(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_cli/test_wrap_bridge.py25def _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_server_json(file_path: Path, version: str) -> None:CODE
LOWscripts/version-sync.py99def update_plugin_versions(root: Path, version: str) -> None:CODE
LOWscripts/version-sync.py112def update_openclaw_package_json(file_path: Path, version: str) -> None:CODE
LOWscripts/version-sync.py127def update_opencode_package_json(file_path: Path, version: str) -> None:CODE
LOWscripts/version-sync.py142def update_pyproject_version(root: Path, version: str) -> None:CODE
LOWe2e/_lib/harness.py327__all__ = [CODE
LOWe2e/_lib/__init__.py23__all__ = [CODE
LOWheadroom/onnx_runtime.py11logger = logging.getLogger(__name__)CODE
LOWheadroom/paths.py106def set_process_stateless(value: bool) -> None:CODE
LOWheadroom/paths.py408__all__ = [CODE
LOWheadroom/binaries.py43logger = logging.getLogger(__name__)CODE
LOWheadroom/binaries.py45__all__ = [CODE
LOWheadroom/update_check.py31logger = logging.getLogger(__name__)CODE
LOWheadroom/update_check.py297__all__ = [CODE
LOWheadroom/savings_ledger.py397__all__ = [CODE
LOWheadroom/settings_store.py30logger = logging.getLogger(__name__)CODE
LOWheadroom/client.py38logger = logging.getLogger(__name__)CODE
LOWheadroom/__init__.py91__all__ = [CODE
LOWheadroom/copilot_linux_secret.py14logger = logging.getLogger(__name__)CODE
LOWheadroom/rollout.py19logger = logging.getLogger(__name__)CODE
LOWheadroom/shared_context.py33logger = logging.getLogger(__name__)CODE
LOWheadroom/compress.py69logger = logging.getLogger(__name__)CODE
LOWheadroom/_ort.py46logger = logging.getLogger(__name__)CODE
LOWheadroom/copilot_auth.py30logger = logging.getLogger(__name__)CODE
LOWheadroom/copilot_auth.py987def _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/grok.py27logger = logging.getLogger(__name__)CODE
LOWheadroom/mcp_registry/__init__.py32__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
230 more matches not shown…
Cross-File Repetition56 hits · 280 pts
SeverityFileLineSnippetContext
HIGHtests/test_integrations/crewai/test_agents.py0tests for autogen agent tool integration. tests cover: 1. toolcompressionmetrics - dataclass for tool compression metricSTRING
HIGHtests/test_integrations/langchain/test_agents.py0tests for autogen agent tool integration. tests cover: 1. toolcompressionmetrics - dataclass for tool compression metricSTRING
HIGHtests/test_integrations/autogen/test_agents.py0tests for autogen agent tool integration. tests cover: 1. toolcompressionmetrics - dataclass for tool compression metricSTRING
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/crewai/agents.py0initialize headroomtoolwrapper. args: tool: the autogen functiontool to wrap. min_chars_to_compress: minimum character cSTRING
HIGHheadroom/integrations/langchain/agents.py0initialize headroomtoolwrapper. args: tool: the autogen functiontool to wrap. min_chars_to_compress: minimum character cSTRING
HIGHheadroom/integrations/autogen/agents.py0initialize headroomtoolwrapper. args: tool: the autogen functiontool to wrap. min_chars_to_compress: minimum character cSTRING
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.py98Download a file from HuggingFace Hub, preferring the local cache. Tries ``local_files_only=True`` first to avoid a STRING
HIGHheadroom/compress.py180Compress 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.py174Get tokenizer for a model. Args: model: Model name (e.g., 'gpt-4o', 'claude-3-sonnet'). STRING
HIGHheadroom/tokenizers/huggingface.py353Encode text to token IDs. Args: text: Text to encode. Returns: List of token ISTRING
HIGHheadroom/tokenizers/huggingface.py372Decode token IDs to text. Args: tokens: List of token IDs. Returns: Decoded teSTRING
HIGHheadroom/tokenizers/base.py427Encode text to token IDs. Optional method - not all backends support encoding. Default implementation rSTRING
HIGHheadroom/tokenizers/base.py444Decode 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.py494Strip optional markdown fences and parse JSON. Handles raw JSON and fenced code blocks (e.g. ``​`json ... ``​`), inSTRING
HIGHheadroom/learn/analyzer.py579Call 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.py536Supersede 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.py557Update 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.py636Supersede an existing memory with a new version. This creates a temporal chain: the old memory's valid_until isSTRING
HIGHheadroom/memory/adapters/hnsw.py577Search for similar memories using vector similarity. Args: filter: Vector search filter with query STRING
HIGHheadroom/proxy/server.py1395Run 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.py110Get a tree-sitter parser for the given language. Returns a **thread-local** ``tree_sitter.Parser`` instance. tSTRING
HIGHheadroom/transforms/compressor_registry.py168Register ``compressor`` under its ``descriptor.name``. Args: compressor: The compressor to registerSTRING
HIGHheadroom/transforms/kompress_compressor.py1812Compress 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/pricing/registry.py103Estimate the cost for a given token usage. Args: model: The model name/identifier. inpuSTRING
AI Slop Vocabulary76 hits · 219 pts
SeverityFileLineSnippetContext
MEDIUMrun-all-plugins.sh128# wait for readiness (no foreground sleep on this harness)COMMENT
MEDIUMcodecov.yml6 # Gate on the comprehensive unit suite (`python` flag from ci.yml's 4 testCOMMENT
MEDIUMpyproject.toml303# The EleutherAI lm-evaluation-harness is intentionally not exposed as aCOMMENT
MEDIUMpyproject.toml305# (`python -m lm_eval`), and the harness currently pulls sqlitedictCOMMENT
MEDIUMpyproject.toml323# ML weight a sandbox avoids; evals is a dev/test harness, not aCOMMENT
MEDIUMpyproject.toml500 # test-teardown thread; this is a test-harness artifact, not a production issueCOMMENT
MEDIUMcrates/headroom-parity/src/lib.rs54/// 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.py149# ── classify_client — the harness ID source ─────────────────────────COMMENT
MEDIUMtests/test_request_outcome.py172 # X-Client wins even when UA matches a different harnessCOMMENT
MEDIUMtests/test_request_outcome.py110 assert o.client is None # unidentified harnessCODE
MEDIUMtests/test_request_outcome.py217 # Bind the real method to this harness.COMMENT
MEDIUMtests/test_google_multimodal.py557# Parametrized tests for comprehensive coverageCOMMENT
MEDIUMtests/test_dashboard_cache_net_playwright.py58 # 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_proxy_handler_helpers.py294 # Issue #765: compression relocated the harness system block intoCOMMENT
MEDIUMtests/test_ccr_feedback.py304 """get_stats returns comprehensive overview."""STRING
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.py347# — role:tool, role:function, or a text-harness role:user string — keyed off theCOMMENT
MEDIUMtests/test_cross_turn_dedup.py364 # Text-harness shape: the read output arrives as a role:user STRING after anCOMMENT
MEDIUMtests/test_openai_tool_search_deferral.py206# --- client-harness exclusion (GH #2660) -------------------------------------COMMENT
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.py272 # identified harness -> recorded as that clientCOMMENT
MEDIUMtests/test_savings_ledger.py284 # unidentified harness -> falls back to "proxy"COMMENT
MEDIUMtests/test_dashboard_cache_ttl_playwright.py185 # 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/i18n_compression_eval.py48 # CJK has no spaces; drop all whitespace so substring match is robust.COMMENT
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
MEDIUM.github/workflows/rust.yml239 # harness fails only on a Diff — `parity-run` sets `any_diffs` inside theCOMMENT
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/memory_query_policy.py67 # Code's <system-reminder> harness blocks: they are appended toCOMMENT
MEDIUMheadroom/proxy/server.py4657 """Get comprehensive proxy statistics.STRING
MEDIUMheadroom/proxy/prometheus_metrics.py498 # that names the harness when an agent is pointed at a persistent proxyCOMMENT
MEDIUMheadroom/proxy/prometheus_metrics.py960 # client is the harness classified from the User-Agent / X-ClientCOMMENT
MEDIUMheadroom/proxy/prometheus_metrics.py962 # when the harness is unidentified.COMMENT
MEDIUMheadroom/proxy/outcome.py152 # client: identified harness driving the request (codex /COMMENT
MEDIUMheadroom/proxy/outcome.py155 # User-Agent matched a known harness. Populated by handlersCOMMENT
MEDIUMheadroom/proxy/outcome.py159 # can slice by harness without a separate column. This is theCOMMENT
MEDIUMheadroom/proxy/outcome.py161 # harness visibility appears across EVERY handler with zeroCOMMENT
MEDIUMheadroom/proxy/outcome.py556 # tag-based filtering surfaces per-harness slicing for free —COMMENT
MEDIUMheadroom/proxy/outcome.py597 # a harness was identified — keeps the unidentified-trafficCOMMENT
MEDIUMheadroom/proxy/handlers/openai.py6678 # Identify the WS harness before downstream auth/header rewrites.COMMENT
MEDIUMheadroom/proxy/handlers/anthropic.py1139 # Identify the harness (codex / claude-code / aider / etc.)COMMENT
MEDIUMheadroom/proxy/handlers/anthropic.py3192 # in ``messages`` (e.g. a harness system block relocated duringCOMMENT
16 more matches not shown…
Modern AI Meta-Vocabulary52 hits · 161 pts
SeverityFileLineSnippetContext
MEDIUMCHANGELOG.md19- **cache/prefix-freeze:** resolve `PrefixCacheTracker`s per conversation lineage within a session id, so concurrent conCODE
MEDIUMCHANGELOG.md19- **cache/prefix-freeze:** resolve `PrefixCacheTracker`s per conversation lineage within a session id, so concurrent conCODE
MEDIUMCHANGELOG.md152* **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
MEDIUM…adroom-proxy/src/cache_stabilization/drift_detector.rs67//! under a millisecond on a typical agentic request; the detectorCOMMENT
MEDIUM…adroom-proxy/src/cache_stabilization/drift_detector.rs559/// *measured* axes, and agentic clients legitimately mutate themCOMMENT
MEDIUM…/headroom-proxy/src/cache_stabilization/beta_sticky.rs63//! the `(model, system)` bucket conflating parallel agenticCOMMENT
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.py1167 # out is a cancel from the handler's orchestration.COMMENT
MEDIUMtests/test_memory_handler_native_ops.py860 # 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.py2279 # Malformed input — we'd rather drop than persist scaffolding.COMMENT
MEDIUMtests/test_cli/test_wrap_helpers.py784# _resolve_1m_model — 1M context window suffix logic (#1158).COMMENT
MEDIUMwiki/langchain.md414### 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.py612 # 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.py1203 # 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.py1019 # implementation matched scaffolding ("don't mention thisCOMMENT
MEDIUMheadroom/memory/traffic_learner.py65# Agent harnesses can encode orchestration metadata as user-role messages.COMMENT
MEDIUMheadroom/proxy/server.py927 # code/RAG context — see issue #454).COMMENT
MEDIUMheadroom/proxy/server.py3666 # remain the unauthenticated probes for orchestration health.COMMENT
MEDIUMheadroom/proxy/models.py270 # of input lives in user messages (pasted code/text, RAG context) and theCOMMENT
MEDIUMheadroom/proxy/helpers.py2951# local context window — tens of K tokens. That decision is made client-sideCOMMENT
MEDIUMheadroom/proxy/helpers.py3063# Anthropic then excludes deferred tools from the context window (they stopCOMMENT
MEDIUMheadroom/proxy/handlers/anthropic.py2932 # them from the context window — they stop counting as input tokens untilCOMMENT
MEDIUMheadroom/providers/openai.py75# OpenAI context window limitsCOMMENT
MEDIUMheadroom/providers/anthropic.py117 # 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.py32# 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.py182 # all into its context window — overflowing it (breaks sub-agent spawns,COMMENT
MEDIUMheadroom/cli/wrap.py306# inflates the local context window by tens of K tokens. Setting the env varCOMMENT
MEDIUMheadroom/cli/wrap.py317# 1M context window for `wrap claude` (#1158). Claude Code only sends theCOMMENT
MEDIUMheadroom/cli/wrap.py5431 # Issue #1158: opt-in 1M context window. Claude Code only sends theCOMMENT
MEDIUMheadroom/cli/wrap.py5152 headroom wrap claude --1m # Preserve the 1M context windowSTRING
MEDIUMheadroom/transforms/content_router.py1636 # embedding model is pre-warmed in the background (BM25 scores until it'sCOMMENT
Redundant / Tautological Comments114 hits · 155 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.py1038 # 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
54 more matches not shown…
Self-Referential Comments44 hits · 138 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_cli_memory_index_sync.py347 # Create a non-empty vector DB file so the code doesn't short-circuit.COMMENT
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.py332 # Create a fake .pyd fileCOMMENT
MEDIUMtests/test_proxy_streaming_resilience.py247 # Create a realistic HTTP 429 errorCOMMENT
MEDIUMtests/test_proxy_compress_endpoint.py216 # 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.py883 # Create a real OpenAIChat model (doesn't need API key for instantiation)COMMENT
MEDIUMtests/test_integrations/agno/test_model.py71 # 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.py382 # Create a document with specific facts embeddedCOMMENT
MEDIUMheadroom/memory/backends/direct_mem0.py594 # Create the background taskSTRING
MEDIUMheadroom/memory/adapters/fts5.py412 # Create a minimal Memory object from FTS dataCOMMENT
MEDIUMheadroom/cache/compression_store.py814 # Create a synthetic "success" event that we'll process laterCOMMENT
MEDIUMheadroom/backends/anyllm.py87 # 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.py1107 # Create a deterministic structure hash based on content typeCOMMENT
MEDIUMheadroom/transforms/content_router.py2131 # 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.md60### Step 1: Start the ProxyCOMMENT
LOWwiki/quickstart.md66### Step 2: Verify It's RunningCOMMENT
LOWwiki/quickstart.md73### Step 3: Point Your ClientCOMMENT
LOWwiki/quickstart.md90### Step 4: Check SavingsCOMMENT
LOWwiki/macos-deployment.md117### Step 1: Create Log DirectoryCOMMENT
LOWwiki/macos-deployment.md123### Step 2: Generate LaunchAgent PlistCOMMENT
LOWwiki/macos-deployment.md150### Step 3: Load the LaunchAgentCOMMENT
LOWwiki/macos-deployment.md156### 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.py910 # Step 3: Create compressed JSONL contentCOMMENT
LOWheadroom/proxy/handlers/batch.py913 # Step 4: Upload compressed file to OpenAICOMMENT
LOWheadroom/proxy/handlers/batch.py878 # Step 1: Download the input file from OpenAICOMMENT
LOWheadroom/proxy/handlers/batch.py894 # Step 2: Parse and compress each lineCOMMENT
LOWheadroom/proxy/handlers/batch.py931 # 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.py318 # Step 1: Classify query with trained modelCOMMENT
LOWheadroom/image/trained_router.py321 # Step 2: Analyze image with SigLIP (if enabled)COMMENT
LOWheadroom/image/trained_router.py327 # 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.py684 # Step 2: ML-based technique routingCOMMENT
LOWheadroom/image/compressor.py732 # Step 3: Apply compression techniqueCOMMENT
LOWheadroom/image/compressor.py669 # Step 1: Tile-boundary optimization (always safe, pure math)COMMENT
LOWheadroom/telemetry/toin.py1515 # Step 1: Serialize under lock (fast in-memory operation)COMMENT
LOWheadroom/telemetry/toin.py1519 # Step 2: Write outside lock (slow I/O operation)COMMENT
1 more matches not shown…
Hallucination Indicators10 hits · 105 pts
SeverityFileLineSnippetContext
CRITICALtests/test_proxy_savings_history.py1175 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_openai_chat_turn_hooks.py307 logs = client.app.state.proxy.logger.get_recent(5)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.py910 # Step 3: Create compressed JSONL contentCOMMENT
LOWheadroom/proxy/handlers/batch.py913 # Step 4: Upload compressed file to OpenAICOMMENT
LOWheadroom/proxy/handlers/batch.py878 # Step 1: Download the input file from OpenAICOMMENT
LOWheadroom/proxy/handlers/batch.py894 # Step 2: Parse and compress each lineCOMMENT
LOWheadroom/proxy/handlers/batch.py931 # 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.py318 # Step 1: Classify query with trained modelCOMMENT
LOWheadroom/image/trained_router.py321 # Step 2: Analyze image with SigLIP (if enabled)COMMENT
LOWheadroom/image/trained_router.py327 # 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.py684 # Step 2: ML-based technique routingCOMMENT
LOWheadroom/image/compressor.py732 # Step 3: Apply compression techniqueCOMMENT
LOWheadroom/image/compressor.py669 # Step 1: Tile-boundary optimization (always safe, pure math)COMMENT
LOWheadroom/telemetry/toin.py1515 # Step 1: Serialize under lock (fast in-memory operation)COMMENT
LOWheadroom/telemetry/toin.py1519 # Step 2: Write outside lock (slow I/O operation)COMMENT
LOWheadroom/telemetry/toin.py1523 # 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.md61 apiKey: 'your-api-key', // optional, for authenticated endpointsCODE
HIGHwiki/typescript-sdk.md94 apiKey: 'your-api-key',CODE
HIGHwiki/configuration.md453export HEADROOM_API_KEY=your-api-keyCODE
HIGHwiki/configuration.md465 apiKey: 'your-api-key',CODE
HIGHwiki/proxy.md365 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 Data41 hits · 36 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_cli_memory_index_sync.py349 vector_db.write_bytes(b"placeholder")CODE
LOWtests/test_cli_memory_index_sync.py383 vector_db.write_bytes(b"placeholder")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.py599 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",STRING
LOWtests/parity/recorder.py599 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",STRING
LOWtests/test_cli/test_mcp_reconcile.py23 "oauthAccount": {"email": "user@example.com"},CODE
LOWtests/test_cli/test_mcp_reconcile.py79 assert data["oauthAccount"] == {"email": "user@example.com"}CODE
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.md557 ("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.py1095 "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
LOWheadroom/dashboard/static/tailwind.min.js27`),v=y.length-1,v>0?(k=a+v,S=w-y[v].length):(k=a,S=s),T=D.comment,a=k,p=k,d=w-S):c===D.slash?(w=o,T=c,p=a,d=o-s,l=w+1):(CODE
AI Structural Patterns34 hits · 26 pts
SeverityFileLineSnippetContext
LOWplugins/headroom-oauth2/src/headroom_oauth2/provider.py42CODE
LOWtests/test_memory_system.py898CODE
LOWtests/test_proxy_compression_executor.py117CODE
LOWtests/test_router_external_dispatch.py110CODE
LOWheadroom/pipeline.py132CODE
LOWheadroom/evals/prompt_comparison.py537CODE
LOWheadroom/memory/core.py131CODE
LOWheadroom/memory/easy.py109CODE
LOWheadroom/memory/backends/direct_mem0.py538CODE
LOWheadroom/memory/backends/local.py231CODE
LOWheadroom/memory/adapters/embedders.py155CODE
LOWheadroom/memory/adapters/hnsw.py225CODE
LOWheadroom/proxy/savings_tracker.py749CODE
LOWheadroom/proxy/server.py2232CODE
LOWheadroom/proxy/prometheus_metrics.py733CODE
LOWheadroom/proxy/outcome.py244CODE
LOWheadroom/proxy/persistent_metrics.py303CODE
LOWheadroom/proxy/cost.py807CODE
LOWheadroom/proxy/helpers.py169CODE
LOWheadroom/proxy/handlers/streaming.py893CODE
LOWheadroom/proxy/handlers/streaming.py1085CODE
LOWheadroom/cache/semantic.py426CODE
LOWheadroom/cache/compression_store.py271CODE
LOWheadroom/cli/wrap.py628CODE
LOWheadroom/cli/wrap.py4041CODE
LOWheadroom/cli/wrap.py4682CODE
LOWheadroom/observability/metrics.py441CODE
LOWheadroom/testing/harness.py744CODE
LOWheadroom/testing/harness.py880CODE
LOWheadroom/testing/harness.py1020CODE
LOWheadroom/testing/harness.py1216CODE
LOWheadroom/transforms/smart_crusher.py255CODE
LOWheadroom/transforms/content_router.py5968CODE
LOWheadroom/telemetry/collector.py101CODE
Dead Code11 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_openai_responses_context_compaction.py356CODE
MEDIUMtests/test_openai_responses_context_compaction.py357CODE
MEDIUMtests/test_openai_responses_context_compaction.py368CODE
MEDIUMtests/test_openai_responses_context_compaction.py372CODE
MEDIUMtests/test_openai_responses_context_compaction.py377CODE
MEDIUMtests/test_openai_responses_context_compaction.py380CODE
MEDIUMtests/test_route_advice.py178CODE
MEDIUMtests/test_route_advice.py183CODE
MEDIUMtests/test_bedrock_region.py612CODE
MEDIUMtests/test_integrations/langchain/test_streaming.py609CODE
MEDIUMheadroom/backends/base.py165CODE
Overly Generic Function Names13 hits · 12 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/parity/recorder.py1052 "export function processData(items) {\n"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.py860 ... def process_data(items: List[str]) -> List[str]:STRING
LOWheadroom/transforms/code_compressor.py876 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.yml30# 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