AI Slop Code RIsk Monitor

internetarchive/openlibrary

One webpage for every book ever published!

13.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for internetarchive/openlibrary, a Python project with 6,743 GitHub stars. SynthScan examined 292,250 lines of code across 1720 source files, recording 2905 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 13.8 (Moderate 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.

13.8
Adjusted Signal
13.8
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
6.7K
Stars
Python
Language
292.2K
Lines of Code
1.7K
Files
2.9K
Pattern Hits
2026-10-12
Scan Date
0.06
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 34.7/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 12.0/100 · LOW

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

Agent Over-Engineering Ratio 39.5/100 · MEDIUM

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

PR Review Velocity Impact 48.2/100 · MEDIUM

Which changes need focused human review? 2905 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 6HIGH 102MEDIUM 190LOW 2607

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 2905 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 Identifiers2069 hits · 2121 pts
SeverityFileLineSnippetContext
LOWdocker/mockservices/main.py337def _deterministic_availability(item_id: str) -> dict[str, Any]:CODE
LOWdocker/mockservices/main.py518async def _loan_changes_ongoing_loop() -> None:CODE
LOW⚡docker/mockservices/tests/test_matomo_inprocess.py121 def test_every_cohort_label_survives_the_round_trip(self, client):CODE
LOW⚡docker/mockservices/tests/test_matomo_inprocess.py126 def test_action_details_carry_events_and_page_views(self, client):CODE
LOW⚡docker/mockservices/tests/test_matomo_inprocess.py131 def test_a_caller_cannot_strip_the_token(self, client, expected_visits):CODE
LOW⚡docker/mockservices/tests/test_matomo_inprocess.py136 def test_the_mock_rejects_an_unauthenticated_request(self, matomo_url):CODE
LOW⚡docker/mockservices/tests/test_matomo_inprocess.py143 def test_a_short_page_size_still_returns_the_whole_feed(self, client, expected_visits):CODE
LOW⚡docker/mockservices/tests/test_matomo_inprocess.py150 def test_no_visit_is_returned_twice_across_pages(self, client, expected_visits):CODE
LOW⚡docker/mockservices/tests/test_matomo_inprocess.py155 def test_a_page_size_over_the_feed_size_returns_everything(self, client, expected_visits):CODE
LOW⚡docker/mockservices/tests/test_matomo_inprocess.py159 def test_a_clean_fetch_is_not_flagged_truncated(self, client):CODE
LOWdocker/mockservices/tests/test_matomo_inprocess.py173 def test_a_window_after_the_whole_feed_returns_nothing(self, client):CODE
LOWdocker/mockservices/tests/test_matomo_inprocess.py178 def test_a_narrower_window_returns_fewer_visits(self, client, expected_visits):CODE
LOW⚡docker/mockservices/tests/test_e2e.py169 def test_unauthorized_missing_header(self):CODE
LOW⚡docker/mockservices/tests/test_e2e.py176 def test_loan_query_empty_by_default(self):CODE
LOW⚡docker/mockservices/tests/test_e2e.py181 def test_borrow_and_query_and_return_lifecycle(self):CODE
LOW⚡docker/mockservices/tests/test_e2e.py258 def test_availability_post_json(self):CODE
LOW⚡docker/mockservices/tests/test_e2e.py266 def test_availability_deterministic_results(self):CODE
LOW⚡docker/mockservices/tests/test_e2e.py271 def test_every_variant_is_reachable(self):CODE
LOW⚡docker/mockservices/tests/test_e2e.py349 def test_catchup_seeds_events_in_increasing_uid_order(self):CODE
LOW⚡docker/mockservices/tests/test_e2e.py357 def test_pagination_respects_after_uid(self):CODE
LOW⚡docker/mockservices/tests/test_e2e.py366 def test_row_shape_matches_get_loan_changes_contract(self):CODE
LOW⚡docker/mockservices/tests/test_e2e.py391 def test_rejects_unimplemented_methods(self):CODE
LOWdocker/mockservices/tests/test_e2e.py72 def test_authenticate_succeeds_with_password(self):CODE
LOWdocker/mockservices/tests/test_e2e.py86 def test_authenticate_fails_without_password(self):CODE
LOWdocker/mockservices/tests/test_e2e.py96 def test_authenticate_fails_with_sentinel_bad_password(self):CODE
LOWdocker/mockservices/tests/test_e2e.py116 def test_redeem_otp_correct_code(self):CODE
LOWdocker/mockservices/tests/test_e2e.py127 def test_redeem_otp_wrong_code(self):CODE
LOWdocker/mockservices/tests/test_e2e.py230 def test_browse_is_an_hour_and_borrow_is_two_weeks(self):CODE
LOWdocker/mockservices/tests/test_e2e.py291 def test_browse_and_borrow_ctas_are_both_reachable(self):CODE
LOWdocker/mockservices/tests/test_e2e.py315 def test_groundtruth_returns_lending_status(self):CODE
LOWdocker/mockservices/tests/test_e2e.py323 def test_groundtruth_agrees_with_availability_endpoint(self):CODE
LOWtests/test_docker_compose.py15 def test_all_root_services_must_be_in_prod(self):CODE
LOWtests/test_docker_compose.py30 def test_all_prod_services_need_profile(self):CODE
LOWtests/test_docker_compose.py41 def test_web_services_set_deployment_name(self):CODE
LOWtests/test_docker_compose.py51 def test_node_exporter_matches_across_environments(self):CODE
LOWtests/test_docker_compose.py68 def test_provision_node_exporter_matches_production(self):CODE
LOW⚡tests/test_docker_compose.py148 def test_production_serves_baked_translations(self):CODE
LOW⚡tests/test_docker_compose.py156 def test_checkout_mounted_files_serve_committed_translations(self, compose_file):CODE
LOW⚡tests/test_docker_compose.py164 def test_near_prod_serves_committed_translations(self):CODE
LOWtests/unit/js/search.test.js116function checkFacetMoreLessVisibility(totalFacet, minVisibleFacet, expectedVisibleFacet) {CODE
LOWtests/unit/js/setup.js10 process.on('unhandledRejection', function olRethrowUnhandledRejection(error) {CODE
LOWtests/unit/js/SelectionManager.test.js4function createTestElementsForProcessClick() {CODE
LOWtests/integration/test_coverstore_prod.py187 def test_thumbnail_is_smaller_than_medium(self, http):CODE
LOWtests/integration/test_coverstore_prod.py193 def test_large_and_original_redirect_to_the_cluster(self, http, suffix):CODE
LOWtests/integration/test_coverstore_prod.py210 def test_covers_in_other_id_ranges(self, http, cover_id):CODE
LOWtests/integration/test_coverstore_prod.py217 def test_an_archived_cover_redirect_stays_cacheable(self, http):CODE
LOW⚡tests/integration/test_coverstore_prod.py241 def test_keys_are_case_insensitive(self, http, key):CODE
LOW⚡tests/integration/test_coverstore_prod.py247 def test_hyphenated_isbn_without_a_size(self, http):CODE
LOW⚡tests/integration/test_coverstore_prod.py254 def test_hyphenated_isbn_with_a_size(self, http):CODE
LOW⚡tests/integration/test_coverstore_prod.py259 def test_unknown_size_suffix_is_part_of_the_value(self, http):CODE
LOW⚡tests/integration/test_coverstore_prod.py270 def test_missing_cover_serves_the_placeholder(self, http):CODE
LOW⚡tests/integration/test_coverstore_prod.py279 def test_default_url_redirects(self, http):CODE
LOW⚡tests/integration/test_coverstore_prod.py286 def test_by_id_sets_validators(self, http):CODE
LOWtests/integration/test_coverstore_prod.py303 def test_head_honours_conditional_requests(self, http):CODE
LOWtests/integration/test_coverstore_prod.py308 def test_stale_validators_still_serve_the_image(self, http):CODE
LOWtests/integration/test_coverstore_prod.py323 def test_details_for_a_missing_cover(self, http):CODE
LOWtests/integration/test_coverstore_prod.py351 def test_head_matches_get_status(self, http, path):CODE
LOWtests/integration/test_coverstore_prod.py367 def test_acao_without_an_origin(self, http, path):CODE
LOWtests/integration/test_coverstore_prod.py402 def test_preflight_that_should_fail(self, http, case, extra):CODE
LOWtests/integration/test_coverstore_prod.py414 def test_options_on_an_unrouted_path(self, http):CODE
2009 more matches not shown…
Cross-Language Confusion76 hits · 521 pts
SeverityFileLineSnippetContext
HIGHopenlibrary/plugins/admin/code.py170 "cd %s && git pull" % root,CODE
HIGHopenlibrary/plugins/upstream/jsdef.py78 self.push("Hello "); self.push(websafe(name)); self.push("!\n");CODE
HIGHopenlibrary/plugins/upstream/jsdef.py129 text = ["self.push(%s);" % self.jsemit(n, "") for n in node.nodes]STRING
HIGHopenlibrary/plugins/upstream/jsdef.py228 'x && y'CODE
HIGH⚡openlibrary/plugins/upstream/jsdef.py253 'self.push(websafe(x));\n'CODE
HIGH⚡openlibrary/plugins/upstream/jsdef.py255 'self.push(x);\n'CODE
HIGH⚡openlibrary/plugins/upstream/jsdef.py259 'var x = a && b;\n'CODE
HIGH⚡openlibrary/plugins/upstream/jsdef.py261 'if (a || ! b) {\n self.push(websafe(a));\n}\n'CODE
HIGH⚡openlibrary/plugins/upstream/jsdef.py263 'foreach(a && a.data || [], loop, function(loop, i) {\n self.push(websafe(i));\n});\n'CODE
HIGH⚡openlibrary/plugins/upstream/jsdef.py263 'foreach(a && a.data || [], loop, function(loop, i) {\n self.push(websafe(i));\n});\n'CODE
HIGH⚡…y/catalog/add_book/tests/test_add_book_acquisitions.py30 work_id integer not null,CODE
HIGH⚡…y/catalog/add_book/tests/test_add_book_acquisitions.py31 edition_id integer not null,CODE
HIGH⚡…y/catalog/add_book/tests/test_add_book_acquisitions.py32 provider_name text not null,CODE
HIGH⚡…y/catalog/add_book/tests/test_add_book_acquisitions.py33 local_id text not null,CODE
HIGH⚡…y/catalog/add_book/tests/test_add_book_acquisitions.py34 data json not null,CODE
HIGH⚡…y/catalog/add_book/tests/test_add_book_acquisitions.py44 provider_name text not null,CODE
HIGH⚡…y/catalog/add_book/tests/test_add_book_acquisitions.py46 url text not null,CODE
HIGHopenlibrary/tests/test_book_providers.py33 id integer primary key, work_id integer not null, edition_id integer not null,CODE
HIGHopenlibrary/tests/test_book_providers.py34 provider_name text not null, local_id text not null, data json not null,CODE
HIGHopenlibrary/tests/core/test_db.py16 edition_id integer default null,CODE
HIGH⚡openlibrary/tests/core/test_db.py36 edition_id integer default null,CODE
HIGH⚡openlibrary/tests/core/test_db.py43 work_id INTEGER not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py45 username text not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py46 observation_type INTEGER not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py47 observation_value INTEGER not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py55 submitter text not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py56 reviewer text default null,CODE
HIGH⚡openlibrary/tests/core/test_db.py57 url text not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py65 username text not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py66 work_id integer not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py67 edition_id integer not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py68 event_type integer not null,CODE
HIGH⚡openlibrary/tests/core/test_db.py69 event_date text not null,CODE
HIGH⚡openlibrary/tests/core/test_acquisitions_weave.py877 # value is a string or null, never whatever was in the blob.COMMENT
HIGHopenlibrary/tests/core/test_acquisitions_weave.py42 id integer primary key, work_id integer not null, edition_id integer not null,CODE
HIGHopenlibrary/tests/core/test_acquisitions_weave.py43 provider_name text not null, local_id text not null, data json not null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py62 username text not null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py63 provider_name text not null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py64 access_token text not null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py65 refresh_token text default null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py66 expires timestamp default null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py88 username text not null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py89 provider_name text not null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py90 access_token text not null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py91 refresh_token text default null,CODE
HIGH⚡openlibrary/tests/core/test_provider_tokens.py92 expires timestamp without time zone default null,CODE
HIGH⚡openlibrary/tests/core/test_acquisitions.py13 work_id integer not null,CODE
HIGH⚡openlibrary/tests/core/test_acquisitions.py14 edition_id integer not null,CODE
HIGH⚡openlibrary/tests/core/test_acquisitions.py15 provider_name text not null,CODE
HIGH⚡openlibrary/tests/core/test_acquisitions.py16 local_id text not null,CODE
HIGH⚡openlibrary/tests/core/test_acquisitions.py17 data json not null,CODE
HIGHopenlibrary/tests/core/test_jinja.py210 assert isinstance(env.undefined, type(jinja2.StrictUndefined))CODE
HIGHopenlibrary/utils/solr.py102 # Solr returns {doc: null} if the record isn't thereCOMMENT
HIGHopenlibrary/utils/schema.py382 slug character varying(255) unique not null,STRING
HIGHopenlibrary/utils/schema.py383 title character varying(255) not null,STRING
HIGHopenlibrary/utils/schema.py399 slug varchar(255) unique not null,STRING
HIGHopenlibrary/utils/schema.py400 title varchar(255) not null,STRING
HIGH⚡openlibrary/i18n/test_po_files.py162 "ru": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);",CODE
HIGH⚡openlibrary/i18n/test_po_files.py162 "ru": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);",CODE
HIGH⚡openlibrary/i18n/test_po_files.py163 "pl": "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);",CODE
16 more matches not shown…
Decorative Section Separators140 hits · 486 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml241# ── Rule Exclusions ──────────────────────────────────────────────────COMMENT
MEDIUM⚡docker/mockservices/main.py571# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡docker/mockservices/main.py574# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡docker/mockservices/main.py582# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡docker/mockservices/main.py585# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡docker/mockservices/main.py593# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡docker/mockservices/main.py596# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡docker/mockservices/main.py604# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡docker/mockservices/main.py607# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py63# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py78# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py192# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py197# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py217# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py226# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py433# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py443# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py540# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py543# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py626# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py640# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py731# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py733# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡docker/mockservices/tests/test_e2e.py381# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡docker/mockservices/tests/test_e2e.py387# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/js/searchFacets.test.js14// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js16// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js125// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js127// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js223// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js225// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/core/cache.py540# ── Fleet-wide single-flight cache ──────────────────────────────────────COMMENT
MEDIUMopenlibrary/core/fulltext.py22# ── Language resolution ────────────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/core/fulltext.py53# ── Response envelope → rows ───────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/core/fulltext.py171# ── Search ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/core/fulltext.py201# ── Query normalization ────────────────────────────────────────────────────COMMENT
MEDIUM⚡openlibrary/plugins/openlibrary/js/SearchFilterBar.js78// ── Facet field config ─────────────────────────────────────────────────────COMMENT
MEDIUM⚡openlibrary/plugins/openlibrary/js/SearchFilterBar.js85// ── sessionStorage helpers ─────────────────────────────────────────────────COMMENT
MEDIUM⚡openlibrary/plugins/openlibrary/js/SearchFilterBar.js95// ── URL / sticky-filter helpers ────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js1242 // ── Render ────────────────────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js1358 // ── Staleness ────────────────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js1925 // ── Shelf buttons ─────────────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js2044 // ── Event handlers ───────────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js2368 // ── Data layer ───────────────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js2538 // ── Static icons ─────────────────────────────────────────────────────COMMENT
MEDIUM⚡…ibrary/plugins/openlibrary/tests/test_patron_status.py18# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ibrary/plugins/openlibrary/tests/test_patron_status.py20# ---------------------------------------------------------------------------COMMENT
MEDIUM…ibrary/plugins/openlibrary/tests/test_patron_status.py44# ---------------------------------------------------------------------------COMMENT
MEDIUM…ibrary/plugins/openlibrary/tests/test_patron_status.py46# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡openlibrary/plugins/inside/tests/test_code.py18# ── filter_readable ────────────────────────────────────────────────────────COMMENT
MEDIUM⚡openlibrary/plugins/inside/tests/test_code.py41# ── The response envelope stops at fulltext_page ───────────────────────────COMMENT
MEDIUM⚡openlibrary/plugins/inside/tests/test_code.py113# ── resolve_language ───────────────────────────────────────────────────────COMMENT
MEDIUM⚡openlibrary/plugins/inside/tests/test_code.py140# ── empty_reason ───────────────────────────────────────────────────────────COMMENT
MEDIUM⚡openlibrary/plugins/inside/tests/test_code.py150# ── Outgoing search params ─────────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/tests/core/test_processors.py133# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/tests/core/test_processors.py135# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡openlibrary/tests/core/test_acquisitions_weave.py140# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡openlibrary/tests/core/test_acquisitions_weave.py142# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡openlibrary/tests/core/test_acquisitions_weave.py210# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡openlibrary/tests/core/test_acquisitions_weave.py212# ---------------------------------------------------------------------------COMMENT
80 more matches not shown…
Excessive Try-Catch Wrapping126 hits · 147 pts
SeverityFileLineSnippetContext
LOWdocs/lending/README.md226except Exception:CODE
LOWdocs/lending/README.md230except Exception:CODE
LOWopenlibrary/code.py44 except Exception as e:CODE
LOWopenlibrary/book_providers.py720 except Exception:CODE
LOWopenlibrary/book_providers.py776 except Exception:CODE
LOWopenlibrary/asgi_app.py207 except Exception:CODE
LOWopenlibrary/core/ia.py46 except Exception:CODE
LOWopenlibrary/core/vendors.py57 except Exception as e: # noqa: BLE001CODE
LOWopenlibrary/core/vendors.py246 except Exception:CODE
LOWopenlibrary/core/vendors.py440 except Exception as e:CODE
LOWopenlibrary/core/vendors.py502 except Exception:CODE
LOWopenlibrary/core/vendors.py823 except Exception:CODE
MEDIUMopenlibrary/core/vendors.py49def get_lexile(isbn):CODE
LOWopenlibrary/core/layout.py28 except Exception: # noqa: BLE001CODE
LOWopenlibrary/core/layout.py58 except Exception: # noqa: BLE001CODE
LOWopenlibrary/core/layout.py116 except Exception: # noqa: BLE001CODE
LOWopenlibrary/core/layout.py142 except Exception: # noqa: BLE001CODE
MEDIUMopenlibrary/core/layout.py104def _extract_flash_messages() -> list[dict[str, str]]:CODE
LOWopenlibrary/core/imports.py332 except Exception: # noqa: BLE001CODE
LOWopenlibrary/core/imports.py359 except Exception: # noqa: BLE001CODE
LOWopenlibrary/core/bookshelves.py661 except Exception: # we want to catch no entry existsCODE
LOWopenlibrary/core/bookshelves.py672 except Exception:CODE
LOWopenlibrary/core/provider_loans.py71 except Exception:CODE
LOWopenlibrary/core/provider_loans.py87 except Exception:CODE
LOWopenlibrary/core/provider_loans.py95 except Exception:CODE
LOWopenlibrary/core/provider_loans.py118 except Exception:CODE
LOWopenlibrary/core/provider_loans.py142 except Exception:CODE
LOWopenlibrary/core/provider_loans.py189 except Exception:CODE
LOWopenlibrary/core/stats.py34 except Exception as e:CODE
LOWopenlibrary/core/async_db.py178 except Exception:CODE
LOWopenlibrary/core/provider_tokens.py418 except Exception as exc: # noqa: BLE001 - every failure means the same thingSTRING
LOWopenlibrary/core/provider_tokens.py480 except Exception: # noqa: BLE001 - tampered, truncated, or key rotatedCODE
LOWopenlibrary/core/provider_tokens.py489 except Exception: # noqa: BLE001 - one bad entry is not all of themCODE
LOWopenlibrary/core/provider_tokens.py610 except Exception as exc:CODE
MEDIUMopenlibrary/core/provider_tokens.py465def _read_raw(self) -> str | None:CODE
LOWopenlibrary/core/helpers.py186 except Exception:CODE
LOWopenlibrary/core/helpers.py196 except Exception:CODE
LOWopenlibrary/core/lending.py304 except Exception: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py465 except Exception as e: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py610 except Exception: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py620 except Exception: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py804 except Exception: # TODO: Narrow exception scopeCODE
MEDIUMopenlibrary/core/lending.py745def find_loans(self, **kw):CODE
LOWopenlibrary/plugins/ol_infobase.py86 except Exception as e:CODE
LOWopenlibrary/plugins/ol_infobase.py111 except Exception:CODE
LOWopenlibrary/plugins/ol_infobase.py311 except Exception:CODE
LOWopenlibrary/plugins/ol_infobase.py369 except Exception:CODE
LOWopenlibrary/plugins/ol_infobase.py486 except Exception:CODE
MEDIUMopenlibrary/plugins/ol_infobase.py79def setup_logging():CODE
MEDIUMopenlibrary/plugins/ol_infobase.py130def get_thing_id(key):CODE
LOWopenlibrary/plugins/admin/services.py17 except Exception as m:CODE
MEDIUMopenlibrary/plugins/admin/services.py14def __init__(self, url):CODE
MEDIUMopenlibrary/plugins/books/readlinks.py307 print("Error in processing Read API", file=sys.stderr)CODE
MEDIUMopenlibrary/plugins/books/dynlinks.py598 print("Error in processing Books API", file=sys.stderr)CODE
LOWopenlibrary/plugins/openlibrary/home.py29 except Exception:CODE
MEDIUMopenlibrary/plugins/openlibrary/home.py26def get_homepage(devmode):CODE
LOWopenlibrary/plugins/openlibrary/partials.py310 except Exception: # noqa: BLE001 # per-card isolation: one bad card should not break whole carouselCODE
LOWopenlibrary/plugins/openlibrary/partials.py766 except Exception: # noqa: BLE001 # one bad list shouldn't break the whole sectionCODE
LOWopenlibrary/plugins/openlibrary/partials.py775 except Exception: # noqa: BLE001 # same fallback the old saferender gaveCODE
LOWopenlibrary/plugins/openlibrary/partials.py1056 except Exception: # noqa: BLE001 # one bad card does not stop the full carouselCODE
66 more matches not shown…
Unused Imports114 hits · 112 pts
SeverityFileLineSnippetContext
LOWopenlibrary/conftest.py12CODE
LOWopenlibrary/conftest.py13CODE
LOWopenlibrary/conftest.py16CODE
LOWopenlibrary/code.py23CODE
LOWopenlibrary/code.py24CODE
LOWopenlibrary/code.py25CODE
LOWopenlibrary/code.py26CODE
LOWopenlibrary/code.py27CODE
LOWopenlibrary/code.py28CODE
LOWopenlibrary/code.py33CODE
LOWopenlibrary/code.py51CODE
LOWopenlibrary/asgi_app.py1CODE
LOWopenlibrary/asgi_app.py55CODE
LOWopenlibrary/core/acquisitions.py14CODE
LOWopenlibrary/core/vendors.py1CODE
LOWopenlibrary/core/reading_state.py6CODE
LOWopenlibrary/core/layout.py9CODE
LOWopenlibrary/core/provider_loans.py26CODE
LOWopenlibrary/core/async_db.py31CODE
LOWopenlibrary/core/provider_tokens.py67CODE
LOWopenlibrary/core/helpers.py24CODE
LOWopenlibrary/core/helpers.py25CODE
LOWopenlibrary/core/lending.py3CODE
LOWopenlibrary/core/lists/model.py13CODE
LOWopenlibrary/core/lists/model.py14CODE
LOWopenlibrary/core/lists/model.py15CODE
LOWopenlibrary/core/processors/__init__.py1CODE
LOWopenlibrary/plugins/admin/code.py21CODE
LOWopenlibrary/plugins/admin/code.py543CODE
LOWopenlibrary/plugins/openlibrary/home.py8CODE
LOWopenlibrary/plugins/openlibrary/partials.py1CODE
LOWopenlibrary/plugins/openlibrary/code.py1185CODE
LOWopenlibrary/plugins/openlibrary/utils.py1CODE
LOWopenlibrary/plugins/openlibrary/tests/test_partials.py11CODE
LOWopenlibrary/plugins/worksearch/bulk_search.py1CODE
LOWopenlibrary/plugins/importapi/tests/test_code.py4CODE
LOWopenlibrary/plugins/upstream/addbook.py20CODE
LOWopenlibrary/plugins/upstream/code.py28CODE
LOWopenlibrary/plugins/upstream/code.py30CODE
LOWopenlibrary/plugins/upstream/code.py30CODE
LOWopenlibrary/plugins/upstream/code.py30CODE
LOWopenlibrary/plugins/upstream/code.py30CODE
LOWopenlibrary/plugins/upstream/jsdef.py60CODE
LOWopenlibrary/plugins/upstream/mybooks.py11CODE
LOWopenlibrary/plugins/upstream/borrow.py27CODE
LOWopenlibrary/plugins/upstream/data.py8CODE
LOWopenlibrary/plugins/upstream/account.py1CODE
LOWopenlibrary/plugins/upstream/account.py17CODE
LOWopenlibrary/plugins/upstream/tests/test_utils.py8CODE
LOWopenlibrary/plugins/upstream/tests/test_lenny.py9CODE
LOWopenlibrary/tests/core/conftest.py11CODE
LOWopenlibrary/tests/core/test_imports_refresh.py18CODE
LOWopenlibrary/tests/catalog/test_utils.py5CODE
LOWopenlibrary/tests/fastapi/conftest.py1CODE
LOWopenlibrary/tests/fastapi/test_unlink.py3CODE
LOWopenlibrary/tests/fastapi/test_link.py3CODE
LOWopenlibrary/tests/fastapi/test_search.py1CODE
LOWopenlibrary/tests/fastapi/test_auth.py3CODE
LOWopenlibrary/tests/fastapi/test_public_my_books.py7CODE
LOWopenlibrary/tests/fastapi/test_account.py3CODE
54 more matches not shown…
Over-Commented Block99 hits · 98 pts
SeverityFileLineSnippetContext
LOWpyproject.toml121 # "EM", # flake8-errmsgCOMMENT
LOWpyproject.toml241# ── Rule Exclusions ──────────────────────────────────────────────────COMMENT
LOWpyproject.toml261# Structure:COMMENT
LOWcompose.near-prod.yaml1##COMMENT
LOWdocker/ol-nginx-start.sh21# expect conflicts writing to fileCOMMENT
LOWdocker/ol-install-missing-deps.sh1#!/bin/bashCOMMENT
LOWdocker/mockservices/main.py61app = FastAPI(title="OL Mock Services", docs_url="/mock/docs", lifespan=_lifespan)COMMENT
LOWdocker/mockservices/main.py621 for asin in item_idsCOMMENT
LOWdocker/mockservices/start.sh1#!/bin/shCOMMENT
LOWtests/e2e/i18n-baked/run.sh1#!/bin/bashCOMMENT
LOWtests/e2e/i18n-baked/compose.yaml1##COMMENT
LOWdocs/search/README.md161# checkout's, and removing it from inside a worktree destroys an index that isCOMMENT
LOWopenlibrary/book_providers.py701 # Moved BEFORE the query, not after: this runs once per Lenny edition perCOMMENT
LOWopenlibrary/core/acquisitions.py141 # one provider can hold two rows for one edition (an ISBN-10 and anCOMMENT
LOWopenlibrary/core/jinja.py121COMMENT
LOWopenlibrary/core/lending.py501 "ocaid", # In editionsCOMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js41// 'books' searches the catalogue (with the Search Inside band as a teaser);COMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js61// printdisabled, borrowable, public). It rides along at both levels: theCOMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js961 // A failed fetch, not an empty result. Non-reactive: read at click time.COMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js981 // list instead of one already filtered by the previous query's counts.COMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js1781 return this._printDisabled && access === PRINT_DISABLED_ACCESS;COMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js1801 // wins "chambre des secrets". Showing the work title over an edition linkCOMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js1821 // "Readable" badge. When an edition is promoted, the badge reflectsCOMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js1841 // site language (readableLanguageMismatch) — a surprise-avoidance hint.COMMENT
LOWopenlibrary/plugins/worksearch/facets.py161 # Built per call (not at module level) so gettext resolves the currentCOMMENT
LOWopenlibrary/plugins/worksearch/schemes/works.py361 # query, but much more flexible. We wouldn't be able to do ourCOMMENT
LOWopenlibrary/plugins/worksearch/schemes/works.py661COMMENT
LOWopenlibrary/plugins/upstream/mybooks.py121 merged_books[work_key] = (book, float(loaned_at), True)COMMENT
LOWopenlibrary/plugins/upstream/borrow.py181 and provider.short_name != "ia"COMMENT
LOWopenlibrary/plugins/upstream/lenny.py821 # (``lenny/routes/oauth.py:110-117``, ``post_email``). Sending it isCOMMENT
LOWopenlibrary/catalog/add_book/__init__.py521 # obscure local-history pamphlet, exactly the material aCOMMENT
LOWopenlibrary/components/lit/OLButton.js701 // The label and spinner are both always in the DOM so we can crossfadeCOMMENT
LOWopenlibrary/accounts/model.py1081 # 2. There is an OL account, and it was linked to this IA account at some point,COMMENT
LOWopenlibrary/bookworm/opds.py221 # record is, rather than letting build_pool guess from the title. ThatCOMMENT
LOWscripts/i18n-pull-translations.sh1#!/bin/bashCOMMENT
LOWscripts/oldump.sh1#! /bin/bashCOMMENT
LOWscripts/oldump.sh21# The cron job takes 18+ hours to process 192,000,000+ records in 29GB of data!!COMMENT
LOWscripts/install_nginx.sh21COMMENT
LOWscripts/obfi.sh281COMMENT
LOWscripts/make-integration-branch-sample.txt1# This file stores the branches to be merged into `dev-merged` for easy dev.openlibrary.org deployCOMMENT
LOWscripts/fully_reset_environment.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/make-integration-branch.sh1#!/bin/bashCOMMENT
LOWscripts/providers/import_wikisource.py341 if self.page_count:COMMENT
LOWscripts/dev-instance/create-dev-db-pgdump.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/dev-instance/load-patron-data.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/deployment/provision_olserver.sh1#!/bin/bashCOMMENT
LOWscripts/deployment/patch_test_new_memcache_server.sh1#!/bin/bashCOMMENT
LOWscripts/deployment/deploy.sh521 fiCOMMENT
LOWscripts/deployment/deploy.sh721# hostname. Hosts absent from this list don't run nginx.COMMENT
LOWscripts/deployment/deploy.sh741# olsystem carries the ModSecurity ruleset and most of what nginx.conf includes,COMMENT
LOWscripts/deployment/deploy.sh761# parses the PREVIOUS ruleset, passes, and the crash still arrives at restart.COMMENT
LOWscripts/deployment/deploy.sh781# OLIMAGE is passed through for the same reason restart_servers.sh passes it: anCOMMENT
LOWscripts/deployment/deploy.sh801# broken deploy -- if olsystem stopped shipping a file compose mounts, the liveCOMMENT
LOWscripts/obfi/mktable.py1#!/usr/bin/env python3COMMENT
LOWscripts/monitoring/utils.sh1# Note: The code in here is tested by scripts/monitoring/tests/test_utils_sh.pyCOMMENT
LOWscripts/monitoring/utils.sh61 # request for /robots.txt becomes "robot", /works/OL1W/I-Robot becomesCOMMENT
LOWscripts/monitoring/monitor.py41#COMMENT
LOW.github/labeler.yml1# Configurations for the `labeler` GitHub action.COMMENT
LOW.github/workflows/code_review_action.yml1name: Code Review ActionCOMMENT
LOW.github/workflows/code_review_action.yml21# ("do NOT post publicly. Follow security.md"). REVIEW_GATE_JS below is the one definition ofCOMMENT
39 more matches not shown…
Deep Nesting94 hits · 93 pts
SeverityFileLineSnippetContext
LOWtests/test_docker_compose.py68CODE
LOWtests/e2e/i18n-baked/make_fixture.py68CODE
LOWopenlibrary/api.py235CODE
LOWopenlibrary/api.py255CODE
LOWopenlibrary/book_providers.py987CODE
LOWopenlibrary/book_providers.py47CODE
LOWopenlibrary/book_providers.py129CODE
LOWopenlibrary/core/ia.py289CODE
LOWopenlibrary/core/ia.py316CODE
LOWopenlibrary/core/observations.py563CODE
LOWopenlibrary/core/layout.py104CODE
LOWopenlibrary/core/olmarkdown.py38CODE
LOWopenlibrary/core/helpers.py338CODE
LOWopenlibrary/core/lending.py542CODE
LOWopenlibrary/core/lending.py813CODE
LOWopenlibrary/core/lists/model.py429CODE
LOWopenlibrary/core/lists/model.py512CODE
LOWopenlibrary/core/lists/model.py568CODE
LOWopenlibrary/plugins/admin/code.py309CODE
LOWopenlibrary/plugins/openlibrary/lists.py87CODE
LOWopenlibrary/plugins/openlibrary/lists.py336CODE
LOWopenlibrary/plugins/openlibrary/lists.py921CODE
LOWopenlibrary/plugins/openlibrary/design_tokens.py184CODE
LOWopenlibrary/plugins/openlibrary/design_tokens.py324CODE
LOWopenlibrary/plugins/openlibrary/code.py615CODE
LOWopenlibrary/plugins/openlibrary/connection.py31CODE
LOWopenlibrary/plugins/openlibrary/stats.py26CODE
LOW…ibrary/plugins/openlibrary/tests/test_design_tokens.py370CODE
LOWopenlibrary/plugins/worksearch/code.py263CODE
LOWopenlibrary/plugins/worksearch/code.py343CODE
LOWopenlibrary/plugins/worksearch/subjects.py556CODE
LOWopenlibrary/plugins/importapi/import_rdf.py74CODE
LOWopenlibrary/plugins/importapi/code.py66CODE
LOWopenlibrary/plugins/importapi/code.py398CODE
LOWopenlibrary/plugins/upstream/addbook.py361CODE
LOWopenlibrary/plugins/upstream/addbook.py552CODE
LOWopenlibrary/plugins/upstream/addbook.py925CODE
LOWopenlibrary/plugins/upstream/code.py461CODE
LOWopenlibrary/plugins/upstream/code.py499CODE
LOWopenlibrary/plugins/upstream/mybooks.py72CODE
LOWopenlibrary/plugins/upstream/edits.py147CODE
LOWopenlibrary/plugins/upstream/edits.py203CODE
LOWopenlibrary/plugins/upstream/edits.py247CODE
LOWopenlibrary/plugins/upstream/borrow.py153CODE
LOWopenlibrary/plugins/upstream/borrow.py448CODE
LOWopenlibrary/plugins/upstream/account.py98CODE
LOWopenlibrary/plugins/upstream/account.py779CODE
LOWopenlibrary/catalog/marc/get_subjects.py61CODE
LOWopenlibrary/catalog/marc/parse.py179CODE
LOWopenlibrary/catalog/marc/parse.py376CODE
LOWopenlibrary/catalog/marc/parse.py463CODE
LOWopenlibrary/catalog/marc/parse.py580CODE
LOWopenlibrary/catalog/marc/parse.py641CODE
LOWopenlibrary/catalog/marc/tests/test_marc_binary.py45CODE
LOWopenlibrary/catalog/add_book/__init__.py403CODE
LOWopenlibrary/catalog/add_book/__init__.py628CODE
LOWopenlibrary/catalog/add_book/__init__.py671CODE
LOWopenlibrary/catalog/add_book/load_book.py348CODE
LOWopenlibrary/tests/test_templates.py59CODE
LOWopenlibrary/tests/core/test_layout.py30CODE
34 more matches not shown…
Hallucination Indicators6 hits · 82 pts
SeverityFileLineSnippetContext
CRITICALtests/unit/js/formAssociatedMixin.test.js153 const data = el._internals.setFormValue.mock.calls.at(-1)[0];CODE
CRITICALopenlibrary/plugins/openlibrary/js/main.js383 if (!window.ILE.selectionManager.selectedItems.work.includes(workOlid)) {CODE
CRITICALopenlibrary/components/LibraryExplorer.vue175 book3d: this.settingsState.styles.book.selected.startsWith('3d'),CODE
CRITICAL⚡scripts/solr_builder/README.md57##### java.lang.NoSuchMethodError: 'boolean org.kohsuke.groovy.sandbox.SandboxTransformer.mightBePositionalArgumentConstCOMMENT
CRITICAL⚡scripts/solr_builder/README.md59java.lang.NoSuchMethodError: 'boolean org.kohsuke.groovy.sandbox.SandboxTransformer.mightBePositionalArgumentConstructorCODE
CRITICAL⚡scripts/solr_builder/README.md60 at com.cloudbees.groovy.cps.SandboxCpsTransformer.visitAssignmentOrCast(SandboxCpsTransformer.java:93)CODE
Self-Referential Comments27 hits · 80 pts
SeverityFileLineSnippetContext
MEDIUMcompose.selinux.yaml1# This file is meant to be applied as overrides when running podman/dockerCOMMENT
MEDIUMcompose.override.yaml1# This file is applied "on top" of compose.yaml when docker composeCOMMENT
MEDIUMopenlibrary/app.py35# Defining a class extending from _app.page auto-registers it inside infogami.COMMENT
MEDIUMopenlibrary/core/models.py419 # Create a list of ISBNs (or an ASIN) to match.COMMENT
MEDIUMopenlibrary/core/bookshelves.py391 # Create a mapping of work keys to ReadingLogItem from the reading log DB.COMMENT
MEDIUMopenlibrary/core/batch_imports.py133 # Create the batchCOMMENT
MEDIUMopenlibrary/core/lending.py309# Create a sync wrapper for backward compatibilityCOMMENT
MEDIUMopenlibrary/core/lists/model.py209 # Create the return dictionaryCOMMENT
MEDIUMopenlibrary/plugins/openlibrary/lists.py354 # Creating a new listCOMMENT
MEDIUMopenlibrary/plugins/openlibrary/events.py23 # Create a thing object to pass to event listeners.COMMENT
MEDIUMopenlibrary/plugins/worksearch/code.py250# Create a sync wrapper for backward compatibilityCOMMENT
MEDIUMopenlibrary/plugins/upstream/addbook.py602 # Create a new work if so desiredCOMMENT
MEDIUMopenlibrary/plugins/upstream/merge_authors.py24 # Create the actual redirect objectsCOMMENT
MEDIUM⚡openlibrary/tests/core/test_lists_model.py52 # Create a mock list with seedsCOMMENT
MEDIUMopenlibrary/tests/core/test_lists_model.py75 # Create a mock list with seedsCOMMENT
MEDIUMopenlibrary/utils/open_syllabus_project.py74 # Create an SQLite database and tableCOMMENT
MEDIUMopenlibrary/solr/solr_types.py1# This file is auto-generated by generate_solr_types.pyCOMMENT
MEDIUMopenlibrary/solr/generate_solr_types.py76 python = f"""# This file is auto-generated by generate_solr_types.pyCODE
MEDIUMopenlibrary/accounts/model.py154 # Create the data portionCOMMENT
MEDIUMopenlibrary/fastapi/auth.py45# Define the session cookie as a FastAPI security scheme so it appearsCOMMENT
MEDIUMopenlibrary/data/db.py89 # Create a new database to avoid this transaction interfere with the application codeCOMMENT
MEDIUMscripts/oldump.sh3# Create a dump of all Open Library records, and generate sitemapsCOMMENT
MEDIUMscripts/manage-imports.py79 """This method is mostly for testing. It allows you to import one moreSTRING
MEDIUMscripts/update_stale_ocaid_references.py72 # Create a session with configured retriesCOMMENT
MEDIUMscripts/bulk_load_ia_query.py167 # Create a session with configured retriesCOMMENT
MEDIUMscripts/gh_scripts/issue_comment_bot.py245 # Create the parent messageCOMMENT
MEDIUMconf/openlibrary.yml65# Create a personal access token at https://github.com/settings/tokensCOMMENT
Empty Error Handlers13 hits · 65 pts
SeverityFileLineSnippetContext
HIGHopenlibrary/core/layout.py142except Exception: # noqa: BLE001CODE
HIGHopenlibrary/core/lending.py204except httpx.HTTPError:CODE
HIGHopenlibrary/plugins/openlibrary/connection.py201except client.ClientException:CODE
HIGHopenlibrary/plugins/openlibrary/connection.py426except client.ClientException:CODE
HIGHopenlibrary/plugins/upstream/jsdef.py218except StopIteration:CODE
HIGHopenlibrary/catalog/marc/marc_binary.py166except IndexError:CODE
HIGHscripts/affiliate_server.py480except queue.Empty:CODE
HIGHscripts/affiliate_server.py205except queue.Empty:CODE
HIGHscripts/providers/import_wikisource.py459except ValueError:CODE
HIGHscripts/providers/import_wikisource.py418except ValueError:CODE
HIGHscripts/providers/import_wikisource.py430except ValueError:CODE
HIGHscripts/providers/import_wikisource.py441except ValueError:CODE
HIGHscripts/providers/import_wikisource.py452except ValueError:CODE
Cross-File Repetition11 hits · 55 pts
SeverityFileLineSnippetContext
HIGH…y/catalog/add_book/tests/test_add_book_acquisitions.py0create table acquisitions ( id integer primary key, work_id integer not null, edition_id integer not null, provider_nameSTRING
HIGHopenlibrary/tests/test_book_providers.py0create table acquisitions ( id integer primary key, work_id integer not null, edition_id integer not null, provider_nameSTRING
HIGHopenlibrary/tests/core/test_acquisitions_weave.py0create table acquisitions ( id integer primary key, work_id integer not null, edition_id integer not null, provider_nameSTRING
HIGHopenlibrary/tests/core/test_acquisitions.py0create table acquisitions ( id integer primary key, work_id integer not null, edition_id integer not null, provider_nameSTRING
HIGH…y/catalog/add_book/tests/test_add_book_acquisitions.py0create table feed_registry ( id integer primary key, provider_name text not null, feed_type text not null default 'opds'STRING
HIGHopenlibrary/bookworm/tests/test_registry.py0create table feed_registry ( id integer primary key, provider_name text not null, feed_type text not null default 'opds'STRING
HIGHopenlibrary/bookworm/tests/test_harvest.py0create table feed_registry ( id integer primary key, provider_name text not null, feed_type text not null default 'opds'STRING
HIGHopenlibrary/bookworm/tests/test_cli.py0create table feed_registry ( id integer primary key, provider_name text not null, feed_type text not null default 'opds'STRING
HIGHscripts/import_open_textbook_library.py0creates the itan batch import job. attempts to find an existing itan import batch. if nothing is found, a new batch is cSTRING
HIGHscripts/import_bookdash.py0creates the itan batch import job. attempts to find an existing itan import batch. if nothing is found, a new batch is cSTRING
HIGHscripts/import_itan.py0creates the itan batch import job. attempts to find an existing itan import batch. if nothing is found, a new batch is cSTRING
Modern Structural Boilerplate39 hits · 40 pts
SeverityFileLineSnippetContext
LOWdocker/mockservices/main.py50logger = logging.getLogger(__name__)CODE
LOWopenlibrary/asgi_app.py32def _setup_env() -> None:CODE
LOWopenlibrary/core/likes.py7logger = logging.getLogger(__name__)CODE
LOWopenlibrary/core/yearly_reading_goals.py76 async def update_target(cls, username: str, year: int, new_target: int) -> None:CODE
LOWopenlibrary/core/models.py490def update_list_seed_metadata(a: ListSeedMetadata, b: ListSeedMetadata) -> None:CODE
LOWopenlibrary/core/cache.py26__all__ = [CODE
LOWopenlibrary/core/cache.py130 def update_async(self, *args: P.args, **kw: P.kwargs) -> None:CODE
LOWopenlibrary/core/cache.py136 def _update_async_worker(self, *args: P.args, **kw: P.kwargs) -> None:CODE
LOWopenlibrary/core/follows.py9logger = logging.getLogger(__name__)CODE
LOWopenlibrary/core/bookshelves.py20logger = logging.getLogger(__name__)CODE
LOWopenlibrary/core/formats.py10__all__ = ["dump_yaml", "load_yaml"]CODE
LOWopenlibrary/core/helpers.py32__all__ = [CODE
LOWopenlibrary/core/lending.py40logger = logging.getLogger(__name__)CODE
LOWopenlibrary/core/processors/invalidation.py9__all__ = ["InvalidationProcessor"]CODE
LOWopenlibrary/plugins/openlibrary/api.py49logger = logging.getLogger(__name__)CODE
LOWopenlibrary/plugins/worksearch/subjects.py25__all__ = ["SubjectEngine", "get_subject"]CODE
LOW⚡openlibrary/plugins/upstream/spamcheck.py17def set_spam_words(words: Iterable[str]) -> None:CODE
LOW⚡openlibrary/plugins/upstream/spamcheck.py22def set_spam_domains(domains: Iterable[str]) -> None:CODE
LOW⚡openlibrary/plugins/upstream/spamcheck.py27def _update_spam_doc(**kwargs) -> None:CODE
LOWopenlibrary/plugins/upstream/edits.py56 def update_request() -> None:CODE
LOWopenlibrary/plugins/upstream/utils.py594def set_share_links(url: str = "#", title: str = "", view_context: InfogamiContext | None = None) -> None:CODE
LOWopenlibrary/catalog/marc/parse.py676def update_edition(rec: MarcBase, edition: dict[str, Any], func: Callable, field: str) -> None:CODE
LOWopenlibrary/admin/numbers.py21logger = logging.getLogger(__name__)CODE
LOWopenlibrary/admin/stats.py16logger = logging.getLogger(__name__)CODE
LOWopenlibrary/utils/request_context.py180def set_context_from_legacy_web_py() -> None:CODE
LOWopenlibrary/utils/request_context.py241def set_context_from_fastapi(request: Request) -> None:CODE
LOWopenlibrary/utils/processors.py8__all__ = ["RateLimitProcessor"]CODE
LOWopenlibrary/utils/schema.py8__all__ = [CODE
LOWopenlibrary/accounts/__init__.py42 def _set_conn_auth_token(self, token: str | None) -> None:CODE
LOWopenlibrary/accounts/model.py328 def update_password(self, new_password) -> None:CODE
LOWopenlibrary/accounts/model.py331 def update_email(self, email) -> None:CODE
LOWopenlibrary/accounts/model.py451 def set_bot_flag(self, flag) -> None:CODE
LOWopenlibrary/fastapi/auth.py22logger = logging.getLogger(__name__)CODE
LOWopenlibrary/fastapi/shared/utils.py16def set_flash_cookie(response: Response, flash_type: FlashType, message: str) -> None:CODE
LOWopenlibrary/data/db.py33__all__ = [CODE
LOWopenlibrary/coverstore/coverlib.py20__all__ = ["read_file", "read_image", "save_image"]CODE
LOWopenlibrary/coverstore/oldb.py11__all__ = ["get", "query"]CODE
LOWscripts/providers/isbndb.py178def update_state(logfile: str, fname: str, line_num: int = 0) -> None:CODE
LOWscripts/obfi/mktable.py45 def set_db(self) -> None:CODE
Redundant / Tautological Comments21 hits · 30 pts
SeverityFileLineSnippetContext
LOWcompose.production.yaml318 # Set it to something so that it never starts by default ; we have toCOMMENT
LOWopenlibrary/conftest.py62 # Set infobase_parameters to use local connection instead of OLConnectionSTRING
LOWopenlibrary/catalog/utils/__init__.py515 # Check if it's a 2-letter code, eg enCOMMENT
LOWopenlibrary/catalog/utils/__init__.py517 # Check if it's a full name, eg English, Anglais, etcCOMMENT
LOWopenlibrary/tests/fastapi/test_account.py110 # Check if the set-cookie header deletes "pending_action"COMMENT
LOWopenlibrary/solr/updater/edition.py184 # Check if plain string firstCOMMENT
LOWopenlibrary/accounts/model.py1093 # Check if it is linked already, i.e. has an itemname set. We alreadyCOMMENT
LOWopenlibrary/coverstore/archive.py455 # Set compression to ZIP_STORED to avoid compressionCOMMENT
LOWscripts/obfi.sh252 # Check if in the futureCOMMENT
LOWscripts/obfi.sh264 # Check if the TS is after the start of the log file, which is all that's neededCOMMENT
LOWscripts/obfi.sh275 # Check if in the range of the current log fileCOMMENT
LOWscripts/obfi.sh592 # Check if already running using psCOMMENT
LOWscripts/obfi.sh612 # Check if already running using psCOMMENT
LOWscripts/build_pwa.sh4# Check if git is installedCOMMENT
LOWscripts/providers/import_wikisource.py213 # Check if book description contains a page range. These are generally articlesCOMMENT
LOWscripts/solr_builder/utils.sh24 # Check if '.' in hostCOMMENT
LOWscripts/solr_builder/dump-solr.sh61# Check if enough disk spaceCOMMENT
LOWscripts/deployment/patchdeploy.sh5# Check if PR number is providedCOMMENT
LOWscripts/deployment/deploy.sh52# Check if jq is installedCOMMENT
LOWscripts/deployment/deploy.sh80 # Check if any critical cron jobs are running:COMMENT
LOWscripts/deployment/deploy.sh333 # Check if MacCOMMENT
Fake / Example Data25 hits · 29 pts
SeverityFileLineSnippetContext
LOWopenlibrary/plugins/openlibrary/js/autocomplete.js160 * <input class="ac-input__visible" type="text" name="fake_name--0" value="Author 1" />COMMENT
LOWopenlibrary/plugins/worksearch/tests/test_subjects.py220 cached = [{"key": "/authors/OL2A", "name": "Jane Doe", "representative_work": None}]CODE
LOW⚡openlibrary/plugins/upstream/tests/test_code.py348 fake_user = Mock(name="context.user")CODE
LOW⚡openlibrary/plugins/upstream/tests/test_code.py350 monkeypatch.setattr(code.context, "user", fake_user, raising=False)CODE
LOW⚡openlibrary/plugins/upstream/tests/test_code.py360 assert mock_prepare.call_args[0][2] is fake_userCODE
LOW⚡openlibrary/plugins/upstream/tests/test_lenny.py372 assert self._params("patron@example.org")["login_hint"] == "patron@example.org"CODE
LOW⚡openlibrary/plugins/upstream/tests/test_lenny.py448 assert params["login_hint"] == "patron@example.org"CODE
LOWopenlibrary/plugins/upstream/tests/test_lenny.py410 return "patron@example.org"CODE
LOWopenlibrary/plugins/upstream/tests/test_lenny.py1359 return "patron@example.org"CODE
LOW⚡openlibrary/plugins/upstream/tests/test_account.py576 assert account._mask_email("alice@example.org") == "al***@example.org"CODE
LOWopenlibrary/tests/core/test_lists_engine.py18 "subject_people": ["Jane Doe", {"name": "ignored"}],CODE
LOW⚡openlibrary/tests/fastapi/conftest.py42 fake_user = AuthenticatedUser(CODE
LOW⚡openlibrary/tests/fastapi/conftest.py47 fastapi_client.app.dependency_overrides[require_authenticated_user] = lambda: fake_userCODE
LOW⚡openlibrary/tests/fastapi/conftest.py48 yield fake_userCODE
LOW⚡openlibrary/tests/fastapi/conftest.py61 fake_user = AuthenticatedUser(CODE
LOW⚡openlibrary/tests/fastapi/conftest.py66 fastapi_client.app.dependency_overrides[get_authenticated_user] = lambda: fake_userCODE
LOW⚡openlibrary/tests/fastapi/conftest.py67 yield fake_userCODE
LOWscripts/import_bookdash.py71 """Strips a trailing role annotation, e.g. "Jane Doe(Illustrator)" -> "Jane Doe"."""STRING
LOWscripts/import_itan.py51 """Strips a trailing role annotation, e.g. "Jane Doe (Illustrator)" -> "Jane Doe"."""STRING
LOWscripts/dev-instance/patron_data.sql122INSERT INTO public.data (thing_id, revision, data) VALUES ((SELECT id FROM public.thing WHERE key = '/people/openlibraryCODE
LOWscripts/dev-instance/patron_data.sql122INSERT INTO public.data (thing_id, revision, data) VALUES ((SELECT id FROM public.thing WHERE key = '/people/openlibraryCODE
LOW⚡scripts/tests/test_detect_missing_i18n.py27 assert check_html("<p>Lorem ipsum dolor sit amet</p>") == []CODE
LOW⚡scripts/tests/test_detect_missing_i18n.py27 assert check_html("<p>Lorem ipsum dolor sit amet</p>") == []CODE
LOW⚡scripts/tests/test_import_itan.py30 assert strip_author_role("Jane Doe") == "Jane Doe"CODE
LOWscripts/tests/test_import_bookdash.py71 assert strip_author_role("Jane Doe") == "Jane Doe"STRING
Structural Annotation Overuse18 hits · 27 pts
SeverityFileLineSnippetContext
LOWscripts/fully_reset_environment.sh12# WARNING: This is destructive. All local volumes and databases will be wiped.COMMENT
LOW.github/workflows/issue_enrichment.md33## Step 1: Fetch issue dataCOMMENT
LOW.github/workflows/issue_enrichment.md44## Step 2: Skip checksCOMMENT
LOW.github/workflows/issue_enrichment.md51## Step 3: Read the entire threadCOMMENT
LOW.github/workflows/issue_enrichment.md69## Step 4: Assess the issue templateCOMMENT
LOW.github/workflows/issue_enrichment.md83## Step 5: Research the codebaseCOMMENT
LOW.github/workflows/issue_enrichment.md161## Step 6: Assess and apply labelsCOMMENT
LOW.github/workflows/issue_enrichment.md209## Step 7: Write and post the commentCOMMENT
LOW.github/workflows/pr_autoresponder.md31## Step 1: Fetch PR dataCOMMENT
LOW.github/workflows/pr_autoresponder.md44## Step 2: Skip checksCOMMENT
LOW.github/workflows/pr_autoresponder.md50## Step 3: Gather queue-position signalsCOMMENT
LOW.github/workflows/pr_autoresponder.md63## Step 4: Assign an initial reviewerCOMMENT
LOW.github/workflows/pr_autoresponder.md82## Step 5: Write and post the commentCOMMENT
LOW.github/workflows/code_review.md17## Step 1: Establish the review rangeCOMMENT
LOW.github/workflows/code_review.md34## Step 2: Read beyond the diffCOMMENT
LOW.github/workflows/code_review.md49## Step 3: Review every dimensionCOMMENT
LOW.github/workflows/code_review.md137## Step 4: Write `review.json`COMMENT
LOW.github/workflows/code_review.md193## Step 5: Ignore our own botCOMMENT
AI Structural Patterns19 hits · 19 pts
SeverityFileLineSnippetContext
LOWopenlibrary/asgi_app.py117CODE
LOWopenlibrary/asgi_app.py259CODE
LOWopenlibrary/plugins/books/readlinks.py247CODE
LOWopenlibrary/plugins/openlibrary/partials.py995CODE
LOWopenlibrary/plugins/worksearch/code.py343CODE
LOWopenlibrary/plugins/worksearch/code.py499CODE
LOWopenlibrary/plugins/worksearch/code.py1251CODE
LOWopenlibrary/plugins/worksearch/code.py1094CODE
LOWopenlibrary/plugins/upstream/account.py622CODE
LOWopenlibrary/tests/fastapi/test_account.py16CODE
LOWopenlibrary/utils/solr.py142CODE
LOWopenlibrary/solr/update.py161CODE
LOWopenlibrary/fastapi/internal/api.py501CODE
LOWscripts/copydocs.py303CODE
LOWscripts/utils/scheduler.py28CODE
LOWscripts/solr_builder/solr_builder/solr_builder.py37CODE
LOWscripts/solr_builder/solr_builder/solr_builder.py385CODE
LOWscripts/solr_builder/solr_builder/solr_builder.py463CODE
LOWscripts/solr_updater/solr_updater.py236CODE
AI Slop Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMopenlibrary/core/imports.py536 # so this stays robust even if a future caller forwards user input as theSTRING
MEDIUMopenlibrary/components/HelloWorld.vue55 // Essentially gettersCOMMENT
LOWscripts/affiliate_server.py620 # TODO: Any point in having option not to stage and just return metadata?COMMENT
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHopenlibrary/core/auth.py32 Verify an HMAC digest against a message with timestamp validation. This method validates that the provSTRING
AI Response Leakage1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHopenlibrary/plugins/README.md54The following example from [plugins/openlibrary/api.py](https://github.com/internetarchive/openlibrary/blob/master/openlCODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWopenlibrary/tests/core/test_vendors.py91 # TODO: implement and test edition numberCOMMENT
LOWopenlibrary/tests/core/test_vendors.py142 # TODO: implement and test edition numberCOMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWscripts/make-integration-branch.sh6# Usage:COMMENT