🛰️ Track token usage across AI coding agents from your terminal. 🏅 Global leaderboard with trillions of tokens tracked.
This report summarizes scanner evidence for junhoyeo/tokscale, a Rust project with 5,776 GitHub stars. SynthScan examined 378,835 lines of code across 635 source files, recording 877 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 2.7 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 792 finding(s).
Are imports declared and package/API names verified? 6 finding(s).
Are wrappers, guards, and repeated structures necessary? 211 finding(s).
Which changes need focused human review? 877 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 877 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Cargo.toml | 41 | # Named IANA timezones for the pinned bucketing zone (`scanner.bucketTimezone`). | COMMENT |
| LOW | Cargo.toml | 61 | # HTTP client (async) | COMMENT |
| LOW | clippy.toml | 1 | # Only the Cursor client may pick a TLS backend of its own (#1250). reqwest's | COMMENT |
| LOW | crates/tokscale-core/tests/gjc.rs | 61 | .join("agent") | COMMENT |
| LOW | crates/tokscale-core/tests/aside_integration.rs | 481 | /// Passing `ai-gateway` through also denies the row `ResolutionKind::ProviderScoped`: | COMMENT |
| LOW | crates/tokscale-core/tests/anthropic_catalog.rs | 1 | //! Catalog invariant tests against the real cached pricing datasets. | COMMENT |
| LOW | crates/tokscale-core/tests/graph_api_compatibility.rs | 1 | //! Compile and wire-contract coverage for callers of the original graph API. | COMMENT |
| LOW | crates/tokscale-core/src/aggregator.rs | 221 | COMMENT | |
| LOW | crates/tokscale-core/src/provider_identity.rs | 21 | "fireworks" | "fireworks_ai" => "fireworks_ai", | COMMENT |
| LOW | crates/tokscale-core/src/provider_identity.rs | 41 | "deepseek" | "deepseek_ai" => "deepseek", | COMMENT |
| LOW | crates/tokscale-core/src/provider_identity.rs | 141 | for dotted in segment.split('.') { | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 1 | //! Cross-platform resolution for tokscale's user config and cache dirs. | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 21 | /// it. The asymmetry is invisible until something actually runs on Windows: | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 61 | /// `$HOME` on Windows, but only when it names a path Win32 can actually use. | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 81 | /// Absolute paths are recommended; relative paths are accepted and | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 121 | get_config_dir().join("cache") | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 141 | /// or `~/.cache/tokscale/`. | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 161 | /// resolved. | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 221 | } | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 261 | } | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 301 | /// Every home-rooted test in the workspace redirects `HOME` and assumes | COMMENT |
| LOW | crates/tokscale-core/src/paths.rs | 321 | #[test] | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 1 | //! The timezone a scan buckets usage into. | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 21 | //! | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 161 | /// The machine's current IANA zone name, if one can be determined **and** it | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 201 | COMMENT | |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 221 | /// POSIX allows a leading colon (`TZ=:Asia/Seoul`). Values that are not zone | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 241 | /// rejects it. It produced no pin at all, on every run, for as long as the | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 261 | /// Every day key in tokscale is derived from a `timestamp` field holding Unix | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 281 | "the rebucket passes skip non-positive timestamps, so the window must start \ | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 301 | /// support that claim: two zones can match across recent rules and still differ | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 321 | /// That is the safe direction to be wrong in. Declining leaves the device | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 561 | ); | COMMENT |
| LOW | crates/tokscale-core/src/bucket_tz.rs | 601 | .strip_prefix(':') | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 21 | path = %path.display(), | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 41 | /// Absolute paths to additional OpenCode SQLite databases to scan. | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 61 | /// IANA name of the timezone this device buckets usage days into, e.g. | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 81 | pub bucket_timezone: Option<String>, | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 141 | pub cherrystudio_db: Option<PathBuf>, | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 461 | /// Discover `<account>/sessions/<session>/messages.jsonl` under `~/.aside/u`. | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 721 | // default `session`) and is the agent name for a subagent, so | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 921 | ClientId::Amp, | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 1001 | /// The three cases are deliberately distinct. OmO's merge replaces the whole | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 1081 | COMMENT | |
| LOW | crates/tokscale-core/src/scanner.rs | 1121 | }) | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 1141 | /// precisely so that no project is missed. The cost is one `open` plus one | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 1201 | } | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 1241 | state_db.is_file().then_some(state_db) | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 1301 | COMMENT | |
| LOW | crates/tokscale-core/src/scanner.rs | 1341 | /// Matches: | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 1921 | /// | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 2161 | // Desktop ACP filenames need Devin CLI database titles to recover their | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 2421 | // channel: `latest`/`beta` use `opencode.db`, other channels use | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 2461 | // undercounts). Scan both so the totals are the union; the cross-file dedup | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 3001 | home_dir | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 3121 | // (4) ~/.gjc/agent/sessions home fallback (always available). | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 5761 | // bypassed the existing `enabled.contains(&ClientId::OpenCode)` | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 7041 | } | COMMENT |
| LOW | crates/tokscale-core/src/scanner.rs | 7521 | /// Only *blank* values are reinterpreted. A non-blank value is used | COMMENT |
| LOW | crates/tokscale-core/src/sessionize.rs | 41 | } | COMMENT |
| 578 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/tokscale-core/tests/gjc.rs | 53 | // ── Build a temporary home directory with the gjc session file ────────── | COMMENT |
| MEDIUM | crates/tokscale-core/tests/gjc.rs | 97 | // ── Build PricingService ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-core/tests/gjc.rs | 100 | // ── Call parse_local_unified_messages_with_pricing_uncached ─────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-core/tests/gjc.rs | 116 | // ── Assertions ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-core/tests/hermes.rs | 1381 | // ── cross-day attribution via the agent log (junhoyeo/tokscale#993) ────────── | COMMENT |
| MEDIUM | crates/tokscale-core/tests/hermes.rs | 1381 | // ── cross-day attribution via the agent log (junhoyeo/tokscale#993) ────────── | COMMENT |
| MEDIUM | crates/tokscale-core/src/sessions/gjc.rs | 381 | // ── Adversarial / red-team tests ──────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 9 | // ── Fixture helpers ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 1713 | // ── Existing tests ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 2376 | // ── Date filtering tests ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 2723 | // ── Client filtering tests ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 3871 | // ── JSON output validation tests ─────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 4648 | // ── Group-by strategy tests ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 5476 | // ── Pricing command tests ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 5686 | // ── Clients command tests ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 6193 | // ── Light mode tests ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 6256 | // ── Benchmark flag tests ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 6292 | // ── Empty fixture tests ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 6328 | // ── No-spinner flag tests ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 6348 | // ── Graph with client filter tests ───────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 6372 | // ── Graph output file test ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 6390 | // ── Root command tests (no subcommand) ───────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/tests/cli_tests.rs | 7005 | // ── gjc client filter tests ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 60 | // ── API endpoints (constants, not secrets) ───────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 72 | // ── Storage ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 123 | // ── Cache paths ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 219 | // ── Credential resolution (full priority chain) ──────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 315 | // ── storage.json decryption ──────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 388 | // ── HTTP operations ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 466 | // ── Public utility ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 981 | // ── Manifest ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 1036 | // ── HTTP client ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 1101 | // ── Sync lock ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/trae.rs | 1244 | // ── Main sync logic ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/cache.rs | 1193 | // ── check_client_match ────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/remote.rs | 65 | // ── Cache metadata (not sent by the server) ──────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 3446 | // ── Helper ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 3988 | // ── handle_key_event: quit ────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 4024 | // ── handle_key_event: tab switching ───────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 4557 | // ── handle_key_event: sort ────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 4666 | // ── handle_key_event: navigation ──────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 4702 | // ── wrap-around navigation ────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 4779 | // ── handle_key_event: theme ───────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5062 | // ── handle_key_event: subagent roll-up ───────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5124 | // ── handle_key_event: export ──────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5139 | // ── handle_key_event: refresh ─────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5392 | // ── handle_key_event: misc keys ───────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5457 | // ── handle_mouse_event ────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5707 | // ── handle_resize ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5757 | // ── on_tick ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5907 | // ── click area management ─────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5920 | // ── narrow detection ──────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5942 | // ── HourlyViewMode tests ───────────────────────────────────────── | COMMENT |
| MEDIUM | crates/tokscale-cli/src/tui/app.rs | 5980 | // ── build_model_shade_map ─────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 95 | # ── safe_int / string & negative token scalars ────────────────────────────── | COMMENT |
| MEDIUM⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 161 | # ── malformed / NULL `data` JSON rows are skipped ─────────────────────────── | COMMENT |
| MEDIUM⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 179 | # ── non-dict `tokens` field is skipped ────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 228 | # ── missing/unparseable timestamps are skipped, never default to now() ───── | COMMENT |
| MEDIUM⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 267 | # ── model fallback: null data.model falls through to row["model"] ────────── | COMMENT |
| MEDIUM⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 420 | # ── atomic write cleans up its .tmp file on failure ───────────────────────── | COMMENT |
| 15 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 98 | def test_safe_int_coerces_numeric_string(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 102 | def test_safe_int_non_numeric_string_becomes_zero(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 106 | def test_safe_int_none_becomes_zero(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 110 | def test_safe_int_clamps_negative_to_zero(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 114 | def test_compute_token_buckets_coerces_string_prompt_tokens(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 164 | def test_convert_request_details_row_skips_null_data(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 169 | def test_convert_request_details_row_skips_malformed_json_data(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 174 | def test_convert_request_details_row_skips_non_dict_data(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 182 | def test_convert_request_details_row_skips_non_dict_tokens(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 187 | def test_convert_request_details_row_skips_string_tokens(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 192 | def test_convert_request_details_row_skips_zero_prompt_and_completion(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 231 | def test_convert_request_details_row_skips_missing_timestamp(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 236 | def test_convert_request_details_row_skips_empty_timestamp(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 241 | def test_convert_request_details_row_skips_unparseable_timestamp(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 246 | def test_convert_request_details_row_counts_missing_timestamp_in_stats(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 260 | def test_convert_request_details_row_never_defaults_timestamp_to_now(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 270 | def test_convert_request_details_row_falls_back_to_row_model_when_data_model_is_null(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 411 | def test_is_free_model_suffix_rules(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 423 | def test_run_cleans_up_tmp_file_when_write_fails(tmp_path, monkeypatch): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 616 | def test_convert_usage_history_row_positive_cost(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 624 | def test_convert_usage_history_row_zero_cost_free_model(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 632 | def test_convert_usage_history_row_zero_cost_paid_model(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 639 | def test_convert_usage_history_row_missing_cost_free_model(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 647 | def test_convert_usage_history_row_missing_cost_paid_model(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 654 | def test_convert_usage_history_row_malformed_cost(): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 909 | def test_open_readonly_db_missing_file_returns_none_and_creates_nothing(tmp_path): | CODE |
| LOW⚡ | scripts/test_9router_tokscale_bridge_gjc.py | 916 | def test_open_readonly_db_does_not_write_to_db(tmp_path): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 59 | def test_compute_token_buckets_splits_prompt_and_cached(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 73 | def test_compute_token_buckets_no_cache(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 83 | def test_compute_token_buckets_cached_greater_than_prompt_clamps_to_zero(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 126 | def test_compute_token_buckets_non_numeric_string_treated_as_zero(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 135 | def test_compute_token_buckets_negative_cached_clamped_at_ingestion(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 150 | def test_convert_request_details_row_computes_non_overlapping_usage(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 204 | def test_convert_request_details_row_handles_string_token_scalars_end_to_end(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 287 | def test_convert_request_details_row_unknown_when_both_model_sources_missing(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 305 | def test_convert_request_details_row_buckets_by_local_date(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 326 | def test_convert_request_details_row_groups_same_utc_day_rows_into_one_bucket(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 374 | def test_convert_request_details_row_free_model_embeds_zero_cost(model): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 399 | def test_convert_request_details_row_paid_model_omits_cost(model): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 503 | def test_run_uses_backup_row_when_current_db_row_is_invalid(tmp_path, monkeypatch): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 572 | def test_convert_usage_history_row_parses_tokens_and_buckets(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 584 | def test_convert_usage_history_row_malformed_tokens(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 595 | def test_convert_usage_history_row_skips_zero_tokens(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 602 | def test_convert_usage_history_row_handles_string_token_scalars(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 670 | def test_convert_usage_history_row_non_finite_cost(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 696 | def test_convert_usage_history_row_skips_missing_timestamp(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 702 | def test_convert_usage_history_row_counts_missing_timestamp_in_stats(): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 718 | def _insert_usage_history_row(db_path, **row): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 742 | def test_run_survives_missing_request_details_table(tmp_path, monkeypatch): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 768 | def test_run_reads_from_both_tables(tmp_path, monkeypatch): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 833 | def test_run_cross_table_dedup_same_raw_id(tmp_path, monkeypatch): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 888 | def test_run_survives_both_tables_missing(tmp_path, monkeypatch): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 938 | def test_run_raises_on_corrupt_database(tmp_path, monkeypatch): | CODE |
| LOW | scripts/test_9router_tokscale_bridge_gjc.py | 957 | def test_run_raises_on_nonexistent_table_column(tmp_path, monkeypatch): | CODE |
| LOW | scripts/9router_tokscale_bridge_gjc.py | 165 | def convert_request_details_row(row, stats: dict | None = None) -> dict | None: | CODE |
| LOW | scripts/9router_tokscale_bridge_gjc.py | 245 | def convert_usage_history_row(row, stats: dict | None = None) -> dict | None: | CODE |
| LOW | scripts/check-release-workflow-safety.py | 81 | def decode_yaml_double_quoted(value: str) -> str: | CODE |
| LOW | scripts/check-release-workflow-safety.py | 283 | def cli_platform_package_dirs() -> set[str]: | CODE |
| LOW⚡ | packages/frontend/__tests__/api/submitAuth.test.ts | 180 | function isDailyBreakdownReportedSql(node: unknown): boolean { | CODE |
| LOW⚡ | packages/frontend/__tests__/api/submitAuth.test.ts | 187 | function dailyBreakdownExecuteArgs(tx: { | CODE |
| 72 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | crates/tokscale-cli/tests/helpers/tui_startup_probe.py | 216 | except ProcessLookupError: | CODE |
| HIGH | scripts/test_9router_tokscale_bridge_gjc.py | 471 | except RuntimeError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/tokscale-cli/src/hindsight.rs | 373 | // Step 1: Discover banks | COMMENT |
| LOW | crates/tokscale-cli/src/hindsight.rs | 436 | // Step 2: For each bank, page LLM requests | COMMENT |
| LOW | crates/tokscale-cli/src/hindsight.rs | 502 | // Step 3: Write out ledgers per month bucket | COMMENT |
| LOW | packages/frontend/src/lib/validation/submission.ts | 384 | // Step 1: Schema validation | COMMENT |
| LOW | packages/frontend/src/lib/validation/submission.ts | 398 | // Step 2: No future dates | COMMENT |
| LOW | packages/frontend/src/lib/validation/submission.ts | 422 | // Step 3: Mathematical consistency and sanity checks | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/tokscale-cli/src/hindsight.rs | 373 | // Step 1: Discover banks | COMMENT |
| LOW | crates/tokscale-cli/src/hindsight.rs | 436 | // Step 2: For each bank, page LLM requests | COMMENT |
| LOW | crates/tokscale-cli/src/hindsight.rs | 502 | // Step 3: Write out ledgers per month bucket | COMMENT |
| LOW | packages/frontend/src/lib/validation/submission.ts | 384 | // Step 1: Schema validation | COMMENT |
| LOW | packages/frontend/src/lib/validation/submission.ts | 398 | // Step 2: No future dates | COMMENT |
| LOW | packages/frontend/src/lib/validation/submission.ts | 422 | // Step 3: Mathematical consistency and sanity checks | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | clippy.toml | 9 | # both impls just call `new()` -- but they cannot be listed here. `default` is | COMMENT |
| MEDIUM | .github/workflows/test_coverage.yml | 116 | # Most of the 33 were the harness lying, not the product: fixtures built | COMMENT |
| MEDIUM | .github/workflows/test_coverage.yml | 143 | # prices - a harness defect making a product defect visible. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | scripts/9router_tokscale_bridge_gjc.py | 202 | # apply `default` when the key is present with an explicit null, so | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/test-prepare-release-provenance.sh | 54 | # This file is automatically @generated by Cargo. | COMMENT |
| MEDIUM | scripts/test-check-version-coherence.sh | 38 | # This file is automatically @generated by Cargo. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/tokscale-cli/tests/helpers/tui_startup_probe.py | 135 | CODE | |
| LOW | scripts/9router_tokscale_bridge_gjc.py | 376 | CODE | |
| LOW | scripts/check-release-workflow-safety.py | 46 | CODE | |
| LOW | scripts/check-release-workflow-safety.py | 167 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/tokscale-cli/src/cursor.rs | 3523 | sanitize_account_id_for_filename("user@example.com"), | CODE |
| LOW | crates/tokscale-cli/src/tui/ui/usage.rs | 3202 | email: Some("user@example.com".to_string()), | CODE |
| LOW | crates/tokscale-cli/src/commands/usage/amp.rs | 396 | assert_eq!(output.email.as_deref(), Some("user@example.com")); | CODE |
| LOW | crates/tokscale-cli/src/commands/usage/mod.rs | 1112 | email: Some("user@example.com".to_string()), | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/tokscale-core/src/sessions/claudecode.rs | 3726 | // #815 CRITICAL: journal.jsonl is workflow orchestration metadata, not a | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/9router_tokscale_bridge_gjc.py | 105 | except Exception: | CODE |
| LOW | scripts/9router_tokscale_bridge_gjc.py | 431 | except Exception: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/tokscale-cli/tests/helpers/tui_startup_probe.py | 3 | CODE |