AI Slop Code Risk Monitor

NandhaKishorM/laya

SlopCodeMonitor badge for NandhaKishorM/laya Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

4.1 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for NandhaKishorM/laya, a Python project with 34,786 GitHub stars. SynthScan examined 1,156,066 lines of code across 2161 source files, recording 2992 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 4.1 (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.

4.1
Adjusted Signal
4.1
Raw Pattern Score
100%
Time Factor
2026-11-01
Last Push
34.8K
Stars
Python
Language
1.2M
Lines of Code
2.2K
Files
3.0K
Pattern Hits
2026-10-31
Scan Date
0.16
HC Hit Rate

Risk Review · Payload v1

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.

Cognitive Ownership Risk 7.7/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 1924 finding(s).

Hallucinated Dependency & Supply Chain Risk 5.4/100 · LOW

Are imports declared and package/API names verified? 399 finding(s).

Agent Over-Engineering Ratio 10.9/100 · LOW

Are wrappers, guards, and repeated structures necessary? 1936 finding(s).

PR Review Velocity Impact 20.9/100 · LOW

Which changes need focused human review? 2992 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 16HIGH 319MEDIUM 344LOW 2313

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 2992 distinct pattern matches across 21 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.

Hyper-Verbose Identifiers1218 hits · 1083 pts
SeverityFileLineSnippetContext
LOWresearch/benchmarks/feishu_zh/tests/test_audit.py13 def test_archived_source_bytes(self):CODE
LOWresearch/benchmarks/feishu_zh/tests/test_audit.py35 def test_reject_corrupted_records(self):CODE
LOWresearch/benchmarks/feishu_zh/tests/test_audit.py49 def test_failed_request_stays_in_denominator(self):CODE
LOWresearch/benchmarks/feishu_zh/tests/test_audit.py60 def test_balanced_frozen_cases(self):CODE
LOWresearch/benchmarks/feishu_zh/tests/test_audit.py65 def test_perfect_and_failed_classification(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py29 def test_answering_keep_talking_by_mistake_is_not_a_wrong_action(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py34 def test_acting_when_it_should_not_is_a_wrong_action(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py39 def test_the_gate_only_lets_actions_through(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py49 def test_borderline_cases_stay_out_of_the_headline(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py59 def test_every_rung_asks_the_same_question_with_the_same_options(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py66 def test_every_case_has_a_label_of_its_menu(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py75 def test_no_training_destination_is_a_test_destination(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py83 def test_a_test_sentence_with_one_word_changed_is_refused(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py91 def test_a_case_always_offers_its_own_answer(self):CODE
LOW…benchmarks/es_phone_turns/tests/test_es_phone_turns.py107 def test_the_committed_training_set_holds_no_test_sentence(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py144 def test_the_untouched_archive_passes(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py147 def test_a_better_accuracy_than_the_records_give_is_caught(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py152 def test_a_flipped_decision_is_caught(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py158 def test_a_rewritten_gold_is_caught(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py166 def test_a_dropped_case_is_caught(self):CODE
LOW⚡…benchmarks/es_phone_turns/tests/test_es_phone_turns.py171 def test_a_hidden_wrong_action_is_caught(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py46 def test_cases_parse_and_are_unique(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py51 def test_every_case_has_a_known_gold_label(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py57 def test_every_label_is_covered(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py63 def test_choice_options_are_the_label_policy(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py66 def test_four_noul_dimensions(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py71 def test_noul_criteria_use_the_two_documented_keys(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py140 def test_json_state_is_the_only_wrapped_state(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py149 def test_noul_rungs_ask_the_four_dimensions_in_order(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py156 def test_choice_rungs_ask_one_six_option_question(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py164 def test_unknown_config_is_rejected(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py236 def test_accuracy_re_derives_from_the_cases(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py244 def test_noul_accuracy_re_derives_per_dimension(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py253 def test_hashes_of_the_frozen_inputs_are_recorded(self):CODE
LOW⚡…h/benchmarks/zh_short_commands/tests/test_benchmark.py259 def test_stub_run_records_no_checkpoint(self):CODE
LOW…h/benchmarks/zh_short_commands/tests/test_benchmark.py96 def test_only_the_none_label_is_not_a_command(self):CODE
LOW…h/benchmarks/zh_short_commands/tests/test_benchmark.py107 def test_every_config_builds_one_pair_per_text(self):CODE
LOW…h/benchmarks/zh_short_commands/tests/test_benchmark.py119 def test_noul_plain_omits_criteria_and_the_higher_rungs_add_them(self):CODE
LOW…h/benchmarks/zh_short_commands/tests/test_benchmark.py127 def test_scenario_rungs_prepend_the_scenario(self):CODE
LOW…h/benchmarks/zh_short_commands/tests/test_benchmark.py204 def test_every_case_is_recorded_once_per_role(self):CODE
LOW…h/benchmarks/zh_short_commands/tests/test_benchmark.py208 def test_probabilities_are_finite_and_normalised(self):CODE
LOW…h/benchmarks/zh_short_commands/tests/test_benchmark.py220 def test_every_record_carries_the_request_it_was_asked(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py36 def test_manifest_hashes_pin_the_current_files(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py43 def test_manifest_counts_match_the_cases(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py52 def test_manifest_freezes_the_ladder_this_file_builds(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py58 def test_archive_audits_clean(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py64 def test_archive_pins_the_weights(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py70 def test_stub_archive_has_no_weight_to_pin(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py136 def test_probability_out_of_range(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py141 def test_prediction_that_does_not_follow_from_the_probability(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py147 def test_noul_confidence_that_is_not_the_maximum(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py152 def test_protocol_from_a_different_prompt_revision(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py172 def test_relabelled_dimension(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py177 def test_summary_that_disagrees_with_its_report(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py182 def test_unexplained_report_field(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py187 def test_a_ladder_other_than_the_frozen_one(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py192 def test_missing_weights_for_a_real_run(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py232 def test_a_confidence_of_exactly_one_lands_in_the_last_bin(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py236 def test_a_confidence_of_exactly_zero_is_counted(self):CODE
LOW⚡…earch/benchmarks/zh_short_commands/tests/test_audit.py240 def test_summarise_rounding_matches(self):CODE
1158 more matches not shown…
Cross-Language Confusion243 hits · 988 pts
SeverityFileLineSnippetContext
HIGHresearch/evals/test_act_head_eval.py76# One class absent: ROC-AUC is undefined, and must not be faked as 0.5 or 0.0.COMMENT
HIGHlaya/_agreement.py297 ``abstention`` equal to ``laya.confidence.GATE_ABSTAINED`` becomes a null, which is whatSTRING
HIGHlaya/evals.py103 ``float(tolerances.get(metric, 0.0))``. A string, null, list or dict there raised ``TypeError``STRING
HIGHlaya/serve.py1100 # `{"<i>": null}`, which a Jev client's schema refuses to parse (#302). Reject it as aCOMMENT
HIGHlaya/agent.py1092 "question %r: choice label %d is null; a label is rendered as option text "CODE
HIGHlaya/agent.py1129 raise ValueError("question %r: score level %d is null; give every level a description, "CODE
HIGHlaya/mcp/server.py131 "flagged 'low_confidence' (and, on laya_decide, its value comes back null), so a caller that "CODE
HIGHlaya/mcp/server.py268 "normal. explain=true adds the final routing decision's language diagnostic, or null; "CODE
HIGHlaya/mcp/server.py397 "model_counts. explain=true adds each final decision's language diagnostic, or null; "CODE
HIGHtests/test_packaging.py1013 check_true("nix/%s is opt-in (nullOr, default null)" % opt,CODE
HIGHtests/test_packaging.py1014 _t.count("nullOr") == 1 and re.search(r"^\s*default = null;", _t, re.M) is not None,CODE
HIGHtests/test_packaging.py1120_PER_COMMIT = "github.event_name == 'pull_request' && github.ref || github.sha"CODE
HIGHtests/test_evals_api.py294check_true("a local-path checkpoint is recorded as null, not dropped",CODE
HIGHtests/test_evals_api.py337check_true("that paragraph says a local directory is recorded as null, not dropped",CODE
HIGHtests/test_evals.py2231 '{"overall": null}', '{"overall": {"choice_accuracy": "0.9"}}',CODE
HIGH⚡tests/test_serve.py3076 """`{"hooks": null}` means "no per-call hooks", which is what core reads as inherit.STRING
HIGHtests/test_serve.py1655 """A null score level would come back as `legend: {"<i>": null}`, which Jev clients refuse toSTRING
HIGHtests/test_serve.py3250 """``{"lang_guess": null}`` means "no hint" -- same shape the single endpoint honours.STRING
HIGHlaya-dotnet/tools/dump_differential_golden.py422 '{"a": 1, "b": [true, false, null], "c": {"d": "e"}}',CODE
HIGHlaya-dotnet/tools/golden_cases.py573# ("sv-SE" is replaced by "SV"). An entry that is null, or has a null `temperature`, inherits theCOMMENT
HIGH⚡examples/server.py971 var r = document.documentElement, t = null;CODE
HIGH⚡examples/server.py973 var pick = function (k) { return k && Object.prototype.hasOwnProperty.call(names, k) ? names[k] : null; };CODE
HIGH⚡examples/server.py973 var pick = function (k) { return k && Object.prototype.hasOwnProperty.call(names, k) ? names[k] : null; };CODE
HIGH⚡examples/server.py977 if (q || t) r.dataset.theme = q || t; /* runs in <head>, before first paint */CODE
HIGH⚡examples/server.py1012 while (box && box !== document.body && getComputedStyle(box).overflow === "visible") box = box.parentElement;CODE
HIGH⚡examples/server.py1013 const r = w.getBoundingClientRect(), g = box && box !== document.body ? box.getBoundingClientRect() : null;CODE
HIGH⚡examples/server.py1013 const r = w.getBoundingClientRect(), g = box && box !== document.body ? box.getBoundingClientRect() : null;CODE
HIGH⚡examples/server.py1729const $ = (sel, root) => (root || document).querySelector(sel);CODE
HIGH⚡examples/server.py1735 if (v == null || v === false) continue;CODE
HIGH⚡examples/server.py1742 for (const c of kids.flat(Infinity)) if (c != null && c !== false) el.append(c);CODE
HIGH⚡examples/server.py1758 try { const v = localStorage.getItem(k); return v == null ? null : JSON.parse(v); } catch (e) { return null; }CODE
HIGH⚡examples/server.py1763const isMap = (x) => !!x && typeof x === "object" && !Array.isArray(x);CODE
HIGH⚡examples/server.py1770const plainEnter = (e) => e.key === "Enter" && !e.isComposing && e.keyCode !== 229 && !e.shiftKey && !e.ctrlKeyCODE
HIGH⚡examples/server.py1875 if (!node || node.t !== "obj") return null;CODE
HIGH⚡examples/server.py1875 if (!node || node.t !== "obj") return null;CODE
HIGH⚡examples/server.py1877 return null;CODE
HIGH⚡examples/server.py1881 ind = ind || 0;CODE
HIGH⚡examples/server.py1889const pretty = (v) => JSON.stringify(v, null, 2);CODE
HIGH⚡examples/server.py1913 const errAt = marks && marks.errAt != null ? marks.errAt : -1;CODE
HIGH⚡examples/server.py1914 const warn = (marks && marks.warn) || new Set();CODE
HIGH⚡examples/server.py1918 const end = off + line.length, errHere = errAt >= off && errAt <= end;CODE
HIGH⚡examples/server.py1924 if (errHere && errAt >= at && errAt < at + t.length) {CODE
HIGH⚡examples/server.py1931 if (errHere && errAt === end) div.append(span("", "eol"));CODE
HIGH⚡examples/server.py2009 const pane = sc && getComputedStyle(sc).overflowY !== "visible" ? sc : null;CODE
HIGH⚡examples/server.py2009 const pane = sc && getComputedStyle(sc).overflowY !== "visible" ? sc : null;CODE
HIGH⚡examples/server.py2017 if (dir > 0) while (li < rows.length - 1 && off(li + 1) <= off(li)) li++;CODE
HIGH⚡examples/server.py2018 else while (li > 0 && off(li - 1) <= off(li)) li--;CODE
HIGH⚡examples/server.py2024 (pane || window).scrollBy(0, dy);CODE
HIGH⚡examples/server.py2056 else if (e.altKey && e.shiftKey && e.code === "KeyF") { e.preventDefault(); ed.format(); }CODE
HIGH⚡examples/server.py2062 if (!out && s === e) { insertText(ta, " "); return; }CODE
HIGH⚡examples/server.py2064 let le = v.indexOf("\n", e > s && v[e - 1] === "\n" ? e - 1 : e);CODE
HIGH⚡examples/server.py2096const MOD = /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? "\u2318" : "Ctrl";CODE
HIGH⚡examples/server.py2099const SOURCES = Object.create(null); /* no inherited keys, so ?preset=constructor is just unknown */CODE
HIGH⚡examples/server.py2105 stateMode: "fields", qMode: "form", fields: [], qs: [], base: null, last: null, running: false,CODE
HIGH⚡examples/server.py2106 problems: [], body: null, qValue: null, view: "answers", notes: {state: null, questions: null},CODE
HIGH⚡examples/server.py2165 if (!t || t.v.t !== "str" || !FORM_TYPES.includes(t.v.v))CODE
HIGH⚡examples/server.py2167 if (ins && ins.v.t !== "str") return "The instructions of " + name + " are not text.";CODE
HIGH⚡examples/server.py2168 if (!c || (c.v.t === "lit" && c.v.v === null)) continue;CODE
HIGH⚡examples/server.py2169 const textOrNull = (x) => x.t === "str" || (x.t === "lit" && x.v === null);CODE
HIGH⚡examples/server.py2176 if (t.v.v === "noul" && !(tf.length && tf.every((k) => k === "true" || k === "false") &&CODE
183 more matches not shown…
Decorative Section Separators263 hits · 816 pts
SeverityFileLineSnippetContext
MEDIUMlaya/integrations/agno.py42# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py47# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py80# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py85# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py103# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py105# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py116# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py118# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py143# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py145# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py254# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py257# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py350# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py352# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py368# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py370# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py413# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py415# ---------------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py500 # ------------------------------------------------------------------COMMENT
MEDIUMlaya/integrations/agno.py502 # ------------------------------------------------------------------COMMENT
MEDIUMtests/test_predict_long.py1298# ---------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡laya-dotnet/tools/confidence_cases.py22# ---------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡laya-dotnet/tools/confidence_cases.py24# ---------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡laya-dotnet/tools/confidence_cases.py31# ---------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡laya-dotnet/tools/confidence_cases.py33# ---------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡laya-dotnet/tools/confidence_cases.py93# ---------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡laya-dotnet/tools/confidence_cases.py95# ---------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡laya-dotnet/tools/confidence_cases.py103# ---------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡laya-dotnet/tools/confidence_cases.py105# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tools/confidence_cases.py116# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tools/confidence_cases.py119# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tools/confidence_cases.py161# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tools/confidence_cases.py163# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tools/bench_python.py184 # ── cold latency ─────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/bench_python.py196 # ── warm latency ──────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/bench_python.py223 # ── peak memory ───────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/bench_python.py232 # ── answer snapshot ───────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/golden_cases.py559# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tools/golden_cases.py570# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tools/golden_cases.py722# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tools/golden_cases.py735# ---------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡laya-dotnet/tools/export_onnx.py652# ─── ONNX graph signature check ─────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/export_onnx.py63# ─── model catalogue ────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/export_onnx.py169# ─── fixture cases ──────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/export_onnx.py308# ─── ONNX export ────────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/export_onnx.py435# ─── tokenizer copy ─────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/export_onnx.py461# ─── ONNX parity verification ────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/export_onnx.py723# ─── main per-model export ───────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/export_onnx.py823# ─── graph signature check against reference ────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/export_onnx.py839# ─── CLI ────────────────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tools/lang_temperature_cases.py141# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tools/lang_temperature_cases.py148# ---------------------------------------------------------------------------------------------COMMENT
MEDIUMlaya-dotnet/tests/Laya.Tests/LayaEmailTests.cs39 // ── a pure footer is still removed ───────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tests/Laya.Tests/LayaEmailTests.cs56 // ── unrelated cleaning is unchanged ──────────────────────────────────────COMMENT
MEDIUM⚡laya-dotnet/tests/Laya.Tests/LayaEmailTests.cs96 // ── email_state ───────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tests/Laya.Tests/LayaEmailTests.cs128 // ── every recorded probe entry ────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tests/Laya.Tests/PredictParityTests.cs23 // ── cross-checkpoint theory data ──────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tests/Laya.Tests/PredictParityTests.cs60 // ── theory tests ──────────────────────────────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tests/Laya.Tests/PredictParityTests.cs202 // ── fact tests (multilingual checkpoint) ─────────────────────────────────COMMENT
MEDIUMlaya-dotnet/tests/Laya.Tests/PredictParityTests.cs243 // ── helpers ───────────────────────────────────────────────────────────────COMMENT
203 more matches not shown…
Over-Commented Block411 hits · 401 pts
SeverityFileLineSnippetContext
LOWcompose.http.yaml1# Serve Laya over HTTP from the same image, so a Jev client can point its `baseUrl` at it:COMMENT
LOWcompose.http.yaml61 # third checkpoint routing can choose on demand, and a cap below it reloads one per switch.COMMENT
LOWcompose.modelscope.yaml1# Bake the checkpoint from ModelScope (https://modelscope.cn) into the image, so neither the buildCOMMENT
LOWcompose.modelscope.yaml21# For NVIDIA, append -f compose.cuda.yaml; it repeats the build args and the device reservation forCOMMENT
LOWcompose.example.yml21 # Optional token: enable this setting and its read-only mount below.COMMENT
LOWsetup_laya_linux.sh1#!/usr/bin/env bashCOMMENT
LOWlaya/lang.py161_STOP = {COMMENT
LOWlaya/lang.py321 # letters -- `ả`, `ạ`, `ề`, `ơ`, `ư` and friends -- are precomposed codepointsCOMMENT
LOWlaya/lang.py341 "hej", "ja", "nej", "jo", "tack", "mig", "min", "om", "kommer", "får", "skulle", "vi",COMMENT
LOWlaya/lang.py361# A token whose dot or @ joins word characters is an identifier, not prose: `github.com`,COMMENT
LOWlaya/lang.py501COMMENT
LOWlaya/lang.py661 return latin_profile(text)["language"]COMMENT
LOWlaya/lang.py681# ...but a line of nothing but acronyms has no lowercase either, so it skips the blanking aboveCOMMENT
LOWlaya/lang.py701# word >= 5 only 10,854 99.03% 431 141 <- addresses standCOMMENT
LOWlaya/lang.py721_SHOUTED_MIN_STOPWORD = 4COMMENT
LOWlaya/lang.py861 prof_lat = _latin_profile(text, diagnostic)COMMENT
LOWlaya/lang.py881 if not _shouted_evidence(_WORD.findall(text), lang,COMMENT
LOWlaya/lang.py941 for line_number, line in enumerate(leaf.split("\n"), 1):COMMENT
LOWlaya/lang.py961 # non-English letters and that no stopword list can name. `WIE SPÄT IST ES IN KÖLN`COMMENT
LOWlaya/__init__.py1"""Laya: Fast, non-autoregressive System 1 decision engine with calibrated probabilities."""COMMENT
LOWlaya/evals.py201 """An ordered collection of labelled examples."""COMMENT
LOWlaya/evals.py241COMMENT
LOWlaya/evals.py401COMMENT
LOWlaya/evals.py1161 # on a runner that does not accept it is refused. The gate does not change which answers scoreCOMMENT
LOWlaya/evals.py1221 # different key order is a different signature, so rows that would share one forward passCOMMENT
LOWlaya/serve.py101# means a client that sends a request head and one partial body chunk and then goes quiet holds oneCOMMENT
LOWlaya/serve.py121#COMMENT
LOWlaya/serve.py141# HTTP-only amplification guard; the library keeps its head_max_len-aware budget.COMMENT
LOWlaya/serve.py161# open; the rest of the payload names checkpoints, revision SHAs and host device state, so itCOMMENT
LOWlaya/serve.py181# apply to the whole batch (chunking, padding, the abstention threshold) and per-request keys thatCOMMENT
LOWlaya/serve.py1041 # Already past the cap on a lower bound, so serializing the rest cannot change the verdict.COMMENT
LOWlaya/serve.py1321 from .mcp.device import agent_device, resolve_device, router_agentCOMMENT
LOWlaya/serve.py1441 return hmac.compare_digest(supplied, expected_auth)COMMENT
LOWlaya/serve.py1601 # `MAX_STATE_CHARS`/`MAX_QUESTIONS` bound what the walk can reach. A `\udXXX` escape withCOMMENT
LOWlaya/serve.py1701 else MAX_CHOICE_OPTIONS)COMMENT
LOWlaya/cli.py161 """COMMENT
LOWlaya/email.py21 # "Em resposta ao que você escreveu:" is body text; a client's attribution always carries a dateCOMMENT
LOWlaya/email.py41]COMMENT
LOWlaya/structured.py201 # top-level type/enum/const, the same nullable shape the list form `type: ["string", "null"]`COMMENT
LOWlaya/agent.py1081 # The score path rejects a null level with the same argument one question typeCOMMENT
LOWlaya/agent.py1781 # (max_len=512, head_max_len=192, config budget 312): a 2-option question leaves room forCOMMENT
LOWlaya/agent.py1801COMMENT
LOWlaya/agent.py1921 ans = dict(original)COMMENT
LOWlaya/router.py341 if _takes_lang(scan):COMMENT
LOWlaya/router.py361 "laya: Router.predict_long: %s.predict_long has no `lang` parameter, so the %s "COMMENT
LOWlaya/router.py761 # unverified.COMMENT
LOWlaya/router.py1741 return []COMMENT
LOWlaya/router.py1761 if sort_by_length and diagnostics is not None else None)COMMENT
LOWlaya/evidence.py81 "types": types,COMMENT
LOWlaya/onnx_agent.py521 max_len = self.cfg.get("max_len", 512)COMMENT
LOWlaya/evals_cli.py281COMMENT
LOWlaya/evals_cli.py421 if revisions:COMMENT
LOWlaya/evals_cli.py541 result = evidence.inspect_checkpoint(args.checkpoint, args.report)COMMENT
LOWlaya/mcp/server.py361 # batch_size=0 means "unset": MCP clients send defaults eagerly, andCOMMENT
LOWlaya/integrations/_controls.py21from typing import Any, Dict, OptionalCOMMENT
LOWlaya/integrations/agno.py321 body = e.read().decode("utf-8", errors="replace")COMMENT
LOWlaya/integrations/llamaindex.py201 raise RuntimeError(f"Laya server error {e.code}: {body}") from eCOMMENT
LOWtests/test_compose_env.py221for name in names:COMMENT
LOWtests/test_compose_env.py241# A file may still deviate, and the test for that is *where the deviation is said*: the entryCOMMENT
LOWtests/test_compose_env.py401 "the omission has to be explained where a reader meets it")COMMENT
351 more matches not shown…
Excessive Try-Catch Wrapping325 hits · 349 pts
SeverityFileLineSnippetContext
LOWresearch/evals/shouted_bar_corpora.py187 except Exception: # offline: the same revision, already in the local cacheCODE
LOWresearch/benchmarks/idle_unload/benchmark.py120 except Exception as exc:CODE
LOWresearch/benchmarks/feishu_zh/run.py126 except Exception as e:CODE
LOWresearch/benchmarks/feishu_zh/run.py141 except Exception as e:CODE
LOWresearch/benchmarks/zh_short_commands/run.py180 except Exception: # pragma: no cover - provenance onlyCODE
LOWresearch/benchmarks/zh_short_commands/run.py200 except Exception as exc: # pragma: no cover - provenance onlyCODE
LOWresearch/scripts/build_benchmark_nb.py136 except Exception as e:CODE
LOWresearch/scripts/build_benchmark_nb.py176 except Exception:CODE
LOWresearch/scripts/build_benchmark_nb.py336 except Exception:CODE
LOWresearch/scripts/build_benchmark_nb.py359except Exception as e:CODE
LOWresearch/scripts/build_benchmark_nb.py384 except Exception as e:CODE
LOWresearch/scripts/build_benchmark_nb.py401 except Exception as e:CODE
LOWresearch/scripts/build_benchmark_nb.py425except Exception as e: print(" FAIL sst5:", str(e)[:90])CODE
LOWresearch/scripts/build_benchmark_nb.py439except Exception as e: print(" FAIL emotion:", str(e)[:90])CODE
LOWresearch/scripts/build_benchmark_nb.py451except Exception as e: print(" FAIL prompt_injections:", str(e)[:90])CODE
LOWresearch/scripts/build_benchmark_nb.py465except Exception as e: print(" FAIL banking77:", str(e)[:90])CODE
LOWresearch/scripts/build_benchmark_nb.py479except Exception as e: print(" FAIL ag_news:", str(e)[:90])CODE
LOWresearch/scripts/build_benchmark_nb.py490except Exception as e: print(" FAIL boolq:", str(e)[:90])CODE
LOWresearch/scripts/build_benchmark_nb.py566 except Exception as e:CODE
LOWresearch/scripts/build_benchmark_nb.py817except Exception as e:CODE
LOWresearch/scripts/bench_local.py67 except Exception:CODE
LOWresearch/scripts/bench_local.py184 except Exception as e:CODE
LOWresearch/scripts/bench_local.py235 except Exception:CODE
LOWresearch/scripts/bench_local.py327 except Exception:CODE
LOWresearch/scripts/bench_nvidia_capacity.py179 except Exception as e:CODE
LOWresearch/scripts/bench_nvidia_capacity.py216 except Exception:CODE
LOWresearch/scripts/bench_nvidia_capacity.py274 except Exception:CODE
LOWresearch/scripts/bench_apps.py95 except Exception as e:CODE
LOWresearch/scripts/bench_apps.py111 except Exception as e:CODE
LOWresearch/scripts/bench_apps.py127 except Exception as e:CODE
LOWresearch/scripts/bench_apps.py156 except Exception as e:CODE
LOWresearch/scripts/bench_apps.py169 except Exception as e:CODE
LOWresearch/scripts/bench_apps.py186 except Exception as e:CODE
LOWresearch/scripts/bench_apps.py218 except Exception as e:CODE
LOWresearch/scripts/bench_apps.py240 except Exception as e:CODE
LOWresearch/scripts/bench_apps.py269 except Exception as e:CODE
LOWresearch/scripts/bench_apps.py298 except Exception as e:CODE
LOWresearch/scripts/step4_benchmark/kaggle/step4_gate_r.py54 except Exception:CODE
LOWresearch/scripts/step4_benchmark/kaggle/step4_gate_r.py120 except Exception as _e: # noqa: BLE001 - a missing optional row must not kill the runCODE
LOWresearch/scripts/step4_benchmark/kaggle/build_gate_d.py79 except Exception:CODE
LOWresearch/scripts/step4_benchmark/kaggle/build_kernel.py78 except Exception:STRING
LOWresearch/scripts/step4_benchmark/kaggle/build_kernel.py144 except Exception as _e: # noqa: BLE001 - a missing optional row must not kill the runSTRING
LOW…/scripts/step4_benchmark/kaggle/gate_d/step4_gate_d.py57 except Exception:CODE
LOWresearch/eval/metamorphic.py464 except Exception as exc:CODE
LOWresearch/eval/metamorphic.py689 except Exception as exc:CODE
LOWresearch/eval/laya_eval.py105 except Exception as exc: # pragma: no cover - network pathCODE
LOWresearch/eval/laya_eval.py317 except Exception as exc:CODE
LOWresearch/eval/laya_eval.py357 except Exception as exc:CODE
LOWlaya/train_cli.py233 except Exception as err:CODE
LOWlaya/hooks.py566 except Exception as exc: # noqa: BLE001 -- policy depends on raise_errorsCODE
MEDIUMlaya/hooks.py522def runner():CODE
LOWlaya/evals.py397 except Exception: # pragma: no cover - identity onlyCODE
LOWlaya/evals.py1301 except Exception as exc: # noqa: BLE001 -- honoured by on_errorCODE
MEDIUMlaya/serve.py1357def _run_inference(fn):CODE
LOWlaya/serve.py1382 except Exception: # noqa: BLE001 -- a failed unload must not stop future attemptsCODE
LOWlaya/serve.py1578 except Exception: # noqa: BLE001 -- never expose internal paths or hook errorsCODE
LOWlaya/serve.py1671 except Exception: # noqa: BLE001 -- never leak paths/weights/OOM text to clientsCODE
LOWlaya/serve.py1828 except Exception: # noqa: BLE001CODE
LOWlaya/agent.py107 except Exception as e:CODE
LOWlaya/agent.py467 except Exception:CODE
265 more matches not shown…
Empty Error Handlers49 hits · 245 pts
SeverityFileLineSnippetContext
HIGHresearch/benchmarks/zh_short_commands/run.py180except Exception: # pragma: no cover - provenance onlyCODE
HIGHresearch/scripts/bench_local.py235except Exception:CODE
HIGHresearch/scripts/bench_local.py327except Exception:CODE
HIGHlaya/serve.py1250except ValueError:CODE
HIGHlaya/serve.py1404except asyncio.CancelledError:CODE
HIGHlaya/serve.py1849except OSError:CODE
HIGHlaya/agent.py742except Exception:CODE
HIGHlaya/agent.py2023except Exception:CODE
HIGHlaya/agent.py2108except FileNotFoundError:CODE
HIGHlaya/agent.py98except OSError:CODE
HIGHlaya/agent.py2116except OSError:CODE
HIGHlaya/agent.py104except OSError:CODE
HIGHlaya/router.py1059except Exception:CODE
HIGHlaya/router.py1139except Exception:CODE
HIGHlaya/router.py1170except Exception:CODE
HIGHlaya/backends/compile.py62except Exception:CODE
HIGHlaya/mcp/device.py146except Exception:CODE
HIGHlaya/mcp/device.py164except Exception:CODE
HIGHlaya/mcp/tools.py696except (AttributeError, TypeError):CODE
HIGHlaya/mcp/tools.py1179except Exception:CODE
HIGHlaya/integrations/crewai.py464except Exception:CODE
HIGHlaya/integrations/crewai.py486except Exception:CODE
HIGHdocker/check_torch.py64except PackageNotFoundError:CODE
HIGHtests/test_state_budget.py806except _Skip:CODE
HIGHtests/test_mcp_local_e2e.py89except Exception:CODE
HIGHtests/test_router.py1956except TypeError:CODE
HIGHtests/test_router.py2032except Exception: # noqa: BLE001CODE
HIGHtests/test_router.py2014except ValueError: # unregistered at that instantCODE
HIGHtests/test_langchain.py1559except ValueError:CODE
HIGHtests/test_calibrate.py529except OSError:CODE
HIGHtests/test_compile.py140except RuntimeError:CODE
HIGHtests/test_compile.py367except RuntimeError:CODE
HIGHtests/test_agent_gate.py193except RuntimeError:CODE
HIGHtests/test_agent_gate.py201except RuntimeError:CODE
HIGHtests/test_crewai.py853except ValueError:CODE
HIGHtests/test_cli.py213except SystemExit:CODE
HIGHtests/test_onnx_export_batch.py269except _Skip:CODE
HIGHtests/test_onnx_export_batch.py339except _Skip:CODE
HIGHlaya-dotnet/tools/export_onnx.py631except Exception:CODE
HIGHlaya-dotnet/tools/export_onnx.py780except Exception:CODE
HIGHlaya-dotnet/tools/export_onnx.py790except Exception:CODE
HIGHlaya-dotnet/tools/export_onnx.py368except (AttributeError, io.UnsupportedOperation):CODE
HIGHlaya-dotnet/tools/export_onnx.py642except Exception:CODE
HIGHsdk/python/tests/_support.py54except (BrokenPipeError, ConnectionResetError, OSError):CODE
HIGHlaya-rust/tools/export_onnx.py567except Exception:CODE
HIGHlaya-rust/tools/export_onnx.py716except Exception:CODE
HIGHlaya-rust/tools/export_onnx.py726except Exception:CODE
HIGHlaya-rust/tools/export_onnx.py301except (AttributeError, io.UnsupportedOperation):CODE
HIGHlaya-rust/tools/export_onnx.py578except Exception:CODE
Hallucination Indicators16 hits · 160 pts
SeverityFileLineSnippetContext
CRITICAL…/com/convaiinnovations/laya/QuestionRenderingTest.java56 org.junit.jupiter.api.Assertions.assertTrue(rendered.contains("a: {\"d\": 1}"), rendered.toString());CODE
CRITICAL…/com/convaiinnovations/laya/QuestionRenderingTest.java57 org.junit.jupiter.api.Assertions.assertTrue(rendered.contains("b: [1, 2]"), rendered.toString());CODE
CRITICAL…/com/convaiinnovations/laya/QuestionRenderingTest.java156 org.junit.jupiter.api.Assertions.assertTrue(refused.getMessage().contains("level 1"),CODE
CRITICAL…/com/convaiinnovations/laya/QuestionRenderingTest.java180 org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class,CODE
CRITICAL…/com/convaiinnovations/laya/QuestionRenderingTest.java201 org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class,CODE
CRITICAL…java/com/convaiinnovations/laya/AgentBatchingTest.java140 org.junit.jupiter.api.Assertions.assertNotNull(collapsed,CODE
CRITICAL…st/java/com/convaiinnovations/laya/AgentHooksTest.java83 com.convaiinnovations.laya.tokenizer.Tokenizer.fromModelDirectory(root),CODE
CRITICAL…st/java/com/convaiinnovations/laya/AgentHooksTest.java84 com.convaiinnovations.laya.config.AgentConfig.fromModelDirectory(root),CODE
CRITICAL…com/convaiinnovations/laya/config/AgentConfigTest.java73 org.junit.jupiter.api.Assertions.assertThrows(CODE
CRITICAL…com/convaiinnovations/laya/config/AgentConfigTest.java78 org.junit.jupiter.api.Assertions.assertThrows(CODE
CRITICAL…va/com/convaiinnovations/laya/json/PythonJsonTest.java42 org.junit.jupiter.api.Assertions.assertTrue(checked > 400,CODE
CRITICAL…va/com/convaiinnovations/laya/json/PythonJsonTest.java47 org.junit.jupiter.api.Assertions.assertTrue(covered.contains(discriminating)CODE
CRITICAL…va/com/convaiinnovations/laya/json/PythonJsonTest.java82 org.junit.jupiter.api.Assertions.assertThrows(Json.JsonException.class,CODE
CRITICAL…va/com/convaiinnovations/laya/json/PythonJsonTest.java106 org.junit.jupiter.api.Assertions.assertThrows(Json.JsonException.class,CODE
CRITICAL…va/com/convaiinnovations/laya/json/PythonJsonTest.java119 Json.JsonException cyclic = org.junit.jupiter.api.Assertions.assertThrows(CODE
CRITICAL…va/com/convaiinnovations/laya/json/PythonJsonTest.java125 org.junit.jupiter.api.Assertions.assertThrows(Json.JsonException.class,CODE
Deep Nesting181 hits · 155 pts
SeverityFileLineSnippetContext
LOWresearch/evals/shouted_bar_corpora.py218CODE
LOWresearch/benchmarks/tournament/benchmark.py89CODE
LOWresearch/benchmarks/feishu_zh/run.py26CODE
LOWresearch/benchmarks/feishu_zh/render_cards.py38CODE
LOWresearch/benchmarks/feishu_zh/tests/test_audit.py35CODE
LOWresearch/benchmarks/es_phone_turns/train/build_train.py175CODE
LOWresearch/benchmarks/zh_short_commands/audit.py121CODE
LOWresearch/benchmarks/zh_short_commands/audit.py202CODE
LOWresearch/scripts/bench_position_sensitivity.py83CODE
LOWresearch/scripts/bench_local.py225CODE
LOWresearch/scripts/bench_long_context.py53CODE
LOWresearch/scripts/bench_question_token_reuse.py72CODE
LOWresearch/scripts/bench_length_batching.py60CODE
LOWresearch/scripts/bench_nvidia_capacity.py149CODE
LOWresearch/scripts/bench_nvidia_capacity.py297CODE
LOWresearch/scripts/bench_nvidia_capacity.py163CODE
LOWresearch/scripts/finetune_single_device.py32CODE
LOWresearch/scripts/step4_benchmark/analyze_gate_d.py61CODE
LOWresearch/scripts/step4_benchmark/evaluate.py52CODE
LOWlaya/lang.py598CODE
LOWlaya/lang.py802CODE
LOWlaya/lang.py835CODE
LOWlaya/lang.py929CODE
LOWlaya/hooks.py538CODE
LOWlaya/hooks.py439CODE
LOWlaya/hooks.py758CODE
LOWlaya/hooks.py853CODE
LOWlaya/_agreement.py216CODE
LOWlaya/confidence.py278CODE
LOWlaya/evals.py1113CODE
LOWlaya/evals.py246CODE
LOWlaya/serve.py229CODE
LOWlaya/serve.py952CODE
LOWlaya/serve.py1059CODE
LOWlaya/serve.py1166CODE
LOWlaya/serve.py1312CODE
LOWlaya/serve.py1689CODE
LOWlaya/cli.py225CODE
LOWlaya/cli.py392CODE
LOWlaya/structured.py279CODE
LOWlaya/agent.py61CODE
LOWlaya/agent.py536CODE
LOWlaya/agent.py1029CODE
LOWlaya/agent.py1268CODE
LOWlaya/agent.py1470CODE
LOWlaya/agent.py1664CODE
LOWlaya/train.py196CODE
LOWlaya/train.py317CODE
LOWlaya/train.py649CODE
LOWlaya/train.py754CODE
LOWlaya/train.py807CODE
LOWlaya/train.py989CODE
LOWlaya/calibrate.py732CODE
LOWlaya/router.py807CODE
LOWlaya/router.py942CODE
LOWlaya/router.py1035CODE
LOWlaya/router.py1118CODE
LOWlaya/router.py1145CODE
LOWlaya/router.py1239CODE
LOWlaya/router.py1340CODE
121 more matches not shown…
Cross-File Repetition24 hits · 120 pts
SeverityFileLineSnippetContext
HIGHlaya/integrations/crewai.py0do not forward bearer credentials across an origin or https downgrade.STRING
HIGHlaya/integrations/agno.py0do not forward bearer credentials across an origin or https downgrade.STRING
HIGHlaya/integrations/llamaindex.py0do not forward bearer credentials across an origin or https downgrade.STRING
HIGHlaya/integrations/langchain.py0do not forward bearer credentials across an origin or https downgrade.STRING
HIGHlaya/integrations/crewai.py0send decision request to a remote laya-serve http instance using standard library urllib. `max_len` / `head_max_len` traSTRING
HIGHlaya/integrations/llamaindex.py0send decision request to a remote laya-serve http instance using standard library urllib. `max_len` / `head_max_len` traSTRING
HIGHlaya/integrations/langchain.py0send decision request to a remote laya-serve http instance using standard library urllib. `max_len` / `head_max_len` traSTRING
HIGHtests/test_agno.py0mock agent returning deterministic responses for testing.STRING
HIGHtests/test_langchain.py0mock agent returning deterministic responses for testing.STRING
HIGHtests/test_llamaindex.py0mock agent returning deterministic responses for testing.STRING
HIGHtests/test_crewai.py0mock agent returning deterministic responses for testing.STRING
HIGHtests/test_tools.py0mock agent returning deterministic responses for testing.STRING
HIGHtests/test_agno.py0a harm_severity answer shaped the way agent._decode_answers returns one.STRING
HIGHtests/test_langchain.py0a harm_severity answer shaped the way agent._decode_answers returns one.STRING
HIGHtests/test_crewai.py0a harm_severity answer shaped the way agent._decode_answers returns one.STRING
HIGHtests/test_agno.py0answers whose two confidence fields disagree, on purpose.STRING
HIGHtests/test_llamaindex.py0answers whose two confidence fields disagree, on purpose.STRING
HIGHtests/test_crewai.py0answers whose two confidence fields disagree, on purpose.STRING
HIGHtests/test_langchain.py0an agent-shaped runner: the budgets yes, either routing hint never.STRING
HIGHtests/test_llamaindex.py0an agent-shaped runner: the budgets yes, either routing hint never.STRING
HIGHtests/test_crewai.py0an agent-shaped runner: the budgets yes, either routing hint never.STRING
HIGHlaya-dotnet/tools/regen_golden.py0refuses a snapshot that is missing files, or whose files arrived empty or unparseable. `snapshot_download` reports succeSTRING
HIGHlaya-dotnet/tools/export_onnx.py0refuses a snapshot that is missing files, or whose files arrived empty or unparseable. `snapshot_download` reports succeSTRING
HIGHlaya-java/scripts/prepare_checkpoint.py0refuses a snapshot that is missing files, or whose files arrived empty or unparseable. `snapshot_download` reports succeSTRING
Unused Imports119 hits · 113 pts
SeverityFileLineSnippetContext
LOWresearch/evals/act_head_eval.py69CODE
LOWresearch/evals/massive_route_comparison.py16CODE
LOWresearch/evals/check_regression.py9CODE
LOWresearch/evals/shouted_bar_corpora.py30CODE
LOWresearch/benchmarks/zh_short_commands/run.py28CODE
LOWresearch/benchmarks/zh_short_commands/run.py28CODE
LOWresearch/scripts/bench_apps.py25CODE
LOWresearch/scripts/bench_apps.py35CODE
LOWresearch/scripts/bench_apps.py36CODE
LOWresearch/scripts/step4_benchmark/smoke_test.py13CODE
LOWresearch/scripts/step4_benchmark/run_benchmark.py24CODE
LOWresearch/scripts/step4_benchmark/metrics.py19CODE
LOWresearch/scripts/step4_benchmark/analyze_gate_d.py19CODE
LOWresearch/scripts/step4_benchmark/prepare_data.py19CODE
LOWresearch/scripts/step4_benchmark/order_flip.py24CODE
LOWresearch/scripts/step4_benchmark/evaluate.py28CODE
LOWresearch/scripts/step4_benchmark/kaggle/build_gate_d.py14CODE
LOWresearch/scripts/step4_benchmark/kaggle/build_kernel.py17CODE
LOWresearch/scripts/step4_benchmark/kaggle/build_kernel.py21CODE
LOWresearch/eval/metamorphic.py6CODE
LOWresearch/eval/presentation_checks.py58CODE
LOWresearch/eval/laya_eval.py36CODE
LOWlaya/train_cli.py11CODE
LOWlaya/hooks.py9CODE
LOWlaya/evals_shortlist.py7CODE
LOWlaya/__init__.py24CODE
LOWlaya/__init__.py24CODE
LOWlaya/__init__.py25CODE
LOWlaya/__init__.py25CODE
LOWlaya/__init__.py25CODE
LOWlaya/__init__.py25CODE
LOWlaya/__init__.py25CODE
LOWlaya/__init__.py25CODE
LOWlaya/__init__.py26CODE
LOWlaya/__init__.py27CODE
LOWlaya/__init__.py27CODE
LOWlaya/__init__.py28CODE
LOWlaya/__init__.py28CODE
LOWlaya/__init__.py28CODE
LOWlaya/__init__.py28CODE
LOWlaya/__init__.py28CODE
LOWlaya/__init__.py35CODE
LOWlaya/__init__.py35CODE
LOWlaya/__init__.py35CODE
LOWlaya/__init__.py36CODE
LOWlaya/__init__.py36CODE
LOWlaya/__init__.py36CODE
LOWlaya/evals.py22CODE
LOWlaya/evals_tournament.py2CODE
LOWlaya/email.py17CODE
LOWlaya/structured.py17CODE
LOWlaya/structured.py84CODE
LOWlaya/evidence.py17CODE
LOWlaya/evals_cli.py12CODE
LOWlaya/backends/__init__.py21CODE
LOWlaya/backends/__init__.py21CODE
LOWlaya/backends/__init__.py39CODE
LOWlaya/mcp/server.py38CODE
LOWlaya/mcp/remote.py22CODE
LOWlaya/mcp/device.py29CODE
59 more matches not shown…
AI Slop Vocabulary26 hits · 76 pts
SeverityFileLineSnippetContext
MEDIUMresearch/evals/test_act_head_eval.py185# malformed report can carry them into the harness. They are not measurements: rankingCOMMENT
MEDIUMresearch/eval/test_laya_eval.py107# harness tested `conf > lo` for every bin until the divergence was found, which made itCOMMENT
MEDIUMlaya/evals.py1025 # Not introspectable (a C-level or hand-rolled ``__call__``): keep the call this harnessCOMMENT
MEDIUMlaya/evals.py1107 # Same fallback as `_batch_form` (its comment records why): keep the call this harnessCOMMENT
MEDIUMlaya/evals.py1228 # ones. This is a harness-side grouping relaxation and it is looser than core, which neverCOMMENT
MEDIUMlaya/evals.py1230 # unconditionally. On the per-request path two key orderings that share one harness chunkCOMMENT
MEDIUMlaya/evals.py1262 # did the harness issue", which is settled the moment the chunk is grouped, while theCOMMENT
MEDIUMlaya/evals.py1372 # run with no batch form asked for something this harness cannot do.COMMENT
MEDIUMtests/test_doc_tables.py207 # figures with an independently written harness and landed within 0.0003, which is theCOMMENT
MEDIUMtests/test_doc_tables.py311 # divergence interesting rather than a harness change), and the `laya-multilingual` columnCOMMENT
MEDIUMtests/test_evals_onnx.py187 # apart from "the harness forgot to record it".COMMENT
MEDIUMtests/test_evals_onnx.py222 # batching reaches the runner's predict_batch through the harnessCOMMENT
MEDIUMtests/test_evals_onnx.py229 # report is the witness: `sort_by_length_sent` is what the harness put on the wire, not whatCOMMENT
MEDIUMtests/test_evals_api.py64# `evaluate` is the harness entry point callers extend from their own scripts, so its parameterCOMMENT
MEDIUMtests/test_predict_long.py954_q_onnx = {"a": q_many(12)} # 100 options fills this tiny harness entirelyCODE
MEDIUMtests/test_structured.py345# and the eval harness use.COMMENT
LOWtests/test_system_one_lang.py16 # Mock predict_batch to just return the lang it was given so we can test the pass-throughCOMMENT
MEDIUMtests/test_evidence.py364# ... and on the artifact the research harness actually writes: identity at the document's topCOMMENT
MEDIUMtests/test_crewai.py262# --------------------------------------------------------------- 3b. Guard probabilities are robust to a malformed answCOMMENT
MEDIUMtests/test_tools.py445# A well-formed object response must still route normally through the same harness.COMMENT
MEDIUMtests/test_evals.py1367# changing. `laya-evals run --batch-size` could bound a pass but not group one, so the harness thatCOMMENT
MEDIUMtests/test_evals.py1473# reads the same numbers at every threshold. What the harness forwards is the *claim* theCOMMENT
MEDIUMtests/test_evals.py1477# thing this harness exists to be.COMMENT
MEDIUMtests/test_evals.py1980 # Why the runner records it itself: the counters under test are the harness's own account, soCOMMENT
MEDIUM.github/workflows/ci.yml153 # The eval harness needs numpy and laya only, so it stays a separate, weight-free job: metricCOMMENT
MEDIUM.github/workflows/ci.yml190 # `test_presentation_checks.py` and `test_act_head_eval.py` guard the eval harness's ownCOMMENT
Modern AI Meta-Vocabulary21 hits · 64 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml88# `pip install laya[crewai]` adds the CrewAI multi-agent delegation router (laya.integrations).COMMENT
MEDIUMpyproject.toml93# `pip install laya[agno]` adds the Agno multi-agent team routing and guardrail integration (laya.integrations).COMMENT
MEDIUMREADME.md1217# 2. Inline prompt guardrailsCOMMENT
MEDIUMresearch/scripts/bench_apps.py189 # ------------------------------------- 3 & 5. guardrails + moderation (toxic-chat, HELD OUT)COMMENT
MEDIUMresearch/scripts/bench_apps.py221 # ---------------------------------------------------------- 4. RAG passage filterCOMMENT
MEDIUMlaya/mcp/server.py95# Shared usage guardrails for the decision tools. laya_status reports insteadCOMMENT
MEDIUMtests/test_llamaindex.py517# arguments since #530 / #532; this surface forwarded only `model`, so a RAG pipeline choosingCOMMENT
MEDIUMtests/test_question_token_reuse.py78 # The real undecorated method is the same orchestration without reuse.COMMENT
MEDIUMtests/test_batch.py67# --------------------------------------------------------------- orchestration (weight-free fake)COMMENT
MEDIUMtests/test_batch.py440# Fake CUDA device and autocast so this orchestration test also runs in CPU-only CI.COMMENT
MEDIUMtests/test_mcp.py3232 # The guardrails constant is on the decision tools only;COMMENT
MEDIUMlaya-dotnet/README.md618// Prompt guardrailsCOMMENT
MEDIUMlaya-dotnet/README.md654## Hosting: lifetime, threading and dependency injectionCOMMENT
MEDIUMlaya-dotnet/src/Laya/LayaPresets.cs87 /// <summary>Preset questions for real-time LLM input guardrails.</summary>COMMENT
MEDIUMdocs/use-cases.md227## 4. Air-Gapped Edge RAG RouterCOMMENT
MEDIUMdocs/hooks/patterns.md11 - [Guardrails](#guardrails)CODE
MEDIUM⚡examples/llamaindex_quickstart.py62# 1. Sub-35ms Single-Choice RAG Selector (Replaces LLMSingleSelector)COMMENT
MEDIUMlaya-go/presets/presets.go99// Guard is real-time guardrails on text going into a language model:COMMENT
MEDIUMlaya-rust/README.md279// Prompt guardrails.COMMENT
MEDIUMlaya-rust/src/laya_presets.rs160 /// Preset questions for real-time LLM input guardrails. Ports `guard_questions()`.COMMENT
MEDIUMlaya-java/README.md397## A state longer than the context windowCOMMENT
AI Structural Patterns49 hits · 43 pts
SeverityFileLineSnippetContext
LOWlaya/common.py157CODE
LOWlaya/agent.py2167CODE
LOWlaya/agent.py536CODE
LOWlaya/agent.py1470CODE
LOWlaya/agent.py1664CODE
LOWlaya/agent.py1961CODE
LOWlaya/router.py696CODE
LOWlaya/router.py1203CODE
LOWlaya/router.py1340CODE
LOWlaya/router.py1469CODE
LOWlaya/router.py1672CODE
LOWlaya/onnx_agent.py87CODE
LOWlaya/onnx_agent.py298CODE
LOWlaya/onnx_agent.py342CODE
LOWlaya/onnx_agent.py450CODE
LOWlaya/tl_kernels.py41CODE
LOWlaya/mcp/server.py444CODE
LOWlaya/mcp/server.py498CODE
LOWlaya/mcp/remote.py178CODE
LOWlaya/mcp/remote.py211CODE
LOWlaya/mcp/tools.py409CODE
LOWlaya/mcp/tools.py703CODE
LOWlaya/mcp/tools.py888CODE
LOWlaya/mcp/tools.py1122CODE
LOWlaya/integrations/crewai.py149CODE
LOWlaya/integrations/crewai.py246CODE
LOWlaya/integrations/crewai.py293CODE
LOWlaya/integrations/crewai.py498CODE
LOWlaya/integrations/tools.py204CODE
LOWlaya/integrations/tools.py247CODE
LOWlaya/integrations/agno.py372CODE
LOWlaya/integrations/agno.py455CODE
LOWlaya/integrations/agno.py747CODE
LOWlaya/integrations/llamaindex.py145CODE
LOWlaya/integrations/llamaindex.py242CODE
LOWlaya/integrations/llamaindex.py290CODE
LOWlaya/integrations/llamaindex.py459CODE
LOWlaya/integrations/llamaindex.py621CODE
LOWlaya/integrations/langchain.py158CODE
LOWlaya/integrations/langchain.py256CODE
LOWlaya/integrations/langchain.py308CODE
LOWlaya/integrations/langchain.py475CODE
LOWlaya/integrations/langchain.py643CODE
LOWlaya/integrations/langchain.py850CODE
LOWlaya/integrations/langchain.py1000CODE
LOWlaya/integrations/langchain.py1179CODE
LOWtests/test_mcp.py1929CODE
LOWsdk/python/src/laya_client/client.py53CODE
LOWsdk/python/src/laya_client/client.py66CODE
Fake / Example Data21 hits · 22 pts
SeverityFileLineSnippetContext
LOWlaya-dotnet/tools/dump_differential_golden.py66IDENTIFIERS = ["os.path", "user@example.com", "https://example.com/a/b?c=d", "foo_bar", "my-var.name",CODE
LOWlaya-dotnet/tools/dump_differential_golden.py514 sender = pick([None, "", "user@example.com"])CODE
LOWlaya-dotnet/tools/routing_cases.py1025 ("with_sender", "Refund request", "Please refund invoice 4411.", "user@example.com", True, {}),CODE
LOWlaya-dotnet/tools/routing_cases.py1027 ("extra_fields_kept_when_not_none", "Ticket", "Body text.", "user@example.com", True, {"priority": "high", "ticket_iCODE
LOW⚡laya-dotnet/tests/Laya.Tests/LayaEmailTests.cs101 var state = LayaEmail.State("Refund request", "Please refund invoice 4411.", sender: "user@example.com");CODE
LOW⚡laya-dotnet/tests/Laya.Tests/LayaEmailTests.cs102 Assert.Equal("user@example.com", state["from"]);CODE
LOW…otnet/tests/Laya.Tests/golden/routing/email_probe.json1551 "sender": "user@example.com",CODE
LOW…otnet/tests/Laya.Tests/golden/routing/email_probe.json1557 "from": "user@example.com"CODE
LOW…otnet/tests/Laya.Tests/golden/routing/email_probe.json1576 "sender": "user@example.com",CODE
LOW…otnet/tests/Laya.Tests/golden/routing/email_probe.json1585 "from": "user@example.com",CODE
LOWlaya-go/shortlist/shortlist_test.go137 q := choiceOf(t, "placeholder", c.Must("criteria"))CODE
LOWlaya-rust/tools/dump_differential_golden.py79IDENTIFIERS = ["os.path", "user@example.com", "https://example.com/a/b?c=d", "foo_bar", "my-var.name",CODE
LOWlaya-rust/tools/dump_differential_golden.py550 sender = pick([None, "", "user@example.com"])CODE
LOWlaya-rust/tools/routing_cases.py1055 ("with_sender", "Refund request", "Please refund invoice 4411.", "user@example.com", True, {}),CODE
LOWlaya-rust/tools/routing_cases.py1057 ("extra_fields_kept_when_not_none", "Ticket", "Body text.", "user@example.com", True, {"priority": "high", "ticket_iCODE
LOWlaya-rust/tests/golden/routing/email_probe.json1551 "sender": "user@example.com",CODE
LOWlaya-rust/tests/golden/routing/email_probe.json1557 "from": "user@example.com"CODE
LOWlaya-rust/tests/golden/routing/email_probe.json1576 "sender": "user@example.com",CODE
LOWlaya-rust/tests/golden/routing/email_probe.json1585 "from": "user@example.com",CODE
LOW…est/java/com/convaiinnovations/laya/ShortlistTest.java195 assertEquals(expectedOptions, Question.choice("placeholder", criteria).renderOptions(),CODE
LOW…rc/main/java/com/convaiinnovations/laya/Shortlist.java189 List<String> optionTexts = Question.choice("placeholder", options).renderOptions();CODE
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHlaya/router.py1477Route, then scan every window of the state instead of only its first one. `predict` scores a state from a singlSTRING
HIGHlaya/integrations/agno.py509Route *message* to the best-matching agent in ~33 ms. Args: message: A plain string, an Agno ``RunRSTRING
HIGHlaya/integrations/agno.py797Screen *message* against safety policies in ~33 ms. Args: message: A plain string, Agno ``RunResponSTRING
Structural Annotation Overuse8 hits · 12 pts
SeverityFileLineSnippetContext
LOWlaya-dotnet/MODELS.md27### Step 1: Create a virtual environment and installCOMMENT
LOWlaya-dotnet/MODELS.md98### Step 4: ExportCOMMENT
LOWlaya-dotnet/MODELS.md136### Step 5: Point the SDK at the exportCOMMENT
LOWlaya-dotnet/MODELS.md176### Step 6: Check it worksCOMMENT
LOWlaya-rust/MODELS.md27### Step 1: Create a virtual environment and installCOMMENT
LOWlaya-rust/MODELS.md98### Step 4: ExportCOMMENT
LOWlaya-rust/MODELS.md136### Step 5: Point the SDK at the exportCOMMENT
LOWlaya-rust/MODELS.md176### Step 6: Check it worksCOMMENT
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMcompose.http.yaml12# This file is additive. `laya` in compose.yaml still runs the one-shot SDK quickstart andCOMMENT
MEDIUMtests/test_onnx_export_batch.py113 # This file is the only place in the repository that puts torch, onnxruntime and onnxruntime'sCOMMENT
MEDIUMtests/test_onnx_export_batch.py902# This file is the one place in the suite that puts torch, onnxruntime and onnxruntime's quantizerCOMMENT
Modern Structural Boilerplate8 hits · 8 pts
SeverityFileLineSnippetContext
LOWlaya/hooks.py217def set_default_hooks(hooks=None, on_predict_start=None, on_predict_end=None) -> None:CODE
LOWlaya/__init__.py100__all__ = [CODE
LOWlaya/structured.py473__all__ = [CODE
LOWlaya/backends/__init__.py113__all__ = ["Backend", "BackendUnavailable", "NAMES", "auto_policy", "bucket_shape",CODE
LOWlaya/mcp/__init__.py16__all__ = ["device", "remote", "server", "tools"]CODE
LOWlaya/integrations/tools.py55__all__ = [CODE
LOWlaya/integrations/__init__.py33__all__ = [CODE
LOWsdk/python/src/laya_client/__init__.py8__all__ = [CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWlaya-dotnet/tools/export_onnx.py613 # Check if there is a safetensors file alongside the onnx output (for local-path exports).COMMENT
LOWlaya-rust/tools/export_onnx.py549 # Check if there is a safetensors file alongside the onnx output (for local-path exports).COMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMlaya-ts/tests/state-script-fields.test.ts8const NOTE = "Please read the attached invoice carefully and let me know if you need anything else. ".repeat(20);CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsdk/python/tests/_support.py38 def handle_request(self):CODE