SPB Git

spb/wp44_uqo

Public
20.1 KB · 69 lines csv
1file,line,severity,type,description,suggested_fix2systematic_review/define_corpus.py,"52,55,65-66",blocking,null-handling,"NULL `type` (e2_type) or NULL `source_name` for a non-DBLP, non-arXiv record (e7_generic_deposit) makes the flag NULL and therefore `eligible` NULL: the work is silently dropped by every downstream `WHERE eligible` AND from every PRISMA exclusion bucket; sequential counts no longer sum to the identified total (verified on synthetic DuckDB data: 2 of 6 records vanish).","Use coalesce(c.type,'') and coalesce(c.source_name,'') in the flag expressions; assert count(*) WHERE eligible IS NULL = 0; add a PRISMA identity test identified = sum(sequential exclusions) + after_exclusions."3econometrics/run_structural_change.py,23-28,blocking,logic,"`series_categories` indexes each category by `first_month` without aggregating; category_counts_monthly.csv has one row per (first_month, period, category) and the boundary month 2022-11 carries both baseline and post rows -> duplicate index -> `reindex` raises ValueError (verified with pandas 3.0). All category-level ITS/Bai-Perron runs (H3) fail.",Use g.groupby('first_month')[col].sum() before reindexing.4bibliometrics/03_citation_impact.py,26-29,major,null-handling,"`JOIN ... USING (year, type, sf)` is an inner equality join: every work with NULL primary_subfield_id (no OpenAlex topic, typical of pass-2 DBLP-linked works) is dropped from work_citation_windows (verified: 1 of 3 synthetic rows kept).","LEFT JOIN with `IS NOT DISTINCT FROM` or coalesce(sf,-1) on both sides; assert row count unchanged."5bibliometrics/03_citation_impact.py,"4-5,20-22,35",major,definition / protocol mismatch,"c12 = citations in calendar years y and y+1 (13-24 months depending on publication month), c36 = y..y+2 (25-36 months); names suggest 12/36 months. Protocol H5 specifies the Gini of 24-month citations; the script computes the Gini on c36.","Rename to c_y1/c_y2 (calendar-year windows), use the y..y+1 window for H5, state the publication-month dependence (December papers get ~13 months), and add a month-precision sensitivity (restrict to works published Jan-Jun)."6bibliometrics/03_citation_impact.py,"19,32-37",major,right-truncation,"Window statistics (mean, median, Gini, uncited share) are produced for every year although c36 needs y+2 <= last complete year and c12 needs y+1; 2024-2026 (c36) and 2025-2026 (c12) are truncated and not flagged.",Add `window_complete` per year/window and NULL the truncated statistics; derive the last complete citation year from the snapshot date and the indexing-lag profile.7bibliometrics/03_citation_impact.py,19,major,protocol mismatch,Impact tables include retracted works (`eligible` does not exclude e6_retracted); protocol P2 E6 says retracted works are excluded from impact analyses.,Add `AND NOT e6_retracted` to the E CTE (and to top_cited_by_year).8bibliometrics/03_citation_impact.py,20-23,major,dedup / undercount,"Citations received by the merged preprint version (record flagged e5_duplicate) are ignored: only the published record's counts_by_year is summed, so merged works (plan S2 'one node per work') undercount early citations - CS preprints are the version most often cited.",Aggregate counts_by_year over the published id and its preprint_work_id (deduplicating citing works through oa_references where both versions are cited).9knowledge_graph/01_citation_graph.py,19-26,major,dedup / undercount,"Internal edges require both ends eligible; references to the merged preprint (e5_duplicate, not eligible) become external edges, so the merged node loses inbound citations; category flows (02) and the emerging-detection citation inflow inherit the undercount.",Remap r.ref_id through corpus_works.duplicate_of before the joins; report the number of remapped edges.10systematic_review/define_corpus.py,38-39,major,null-handling / dedup,"`pub` CTE uses `NOT is_arxiv_doi`, which is NULL when doi is NULL: published records without a DOI (many NeurIPS/ICLR/ACL-type venue records in OpenAlex) can never be matched to their preprint, so the most AI-central population stays double counted.","Use coalesce(is_arxiv_doi, FALSE); report the number of published records without DOI."11systematic_review/define_corpus.py,"58,63-66",major,dedup / data loss,"A preprint is flagged e5_duplicate whenever a same-title published record exists, even when that published record is itself excluded (e1 window, e2 type, e7 deposit, NULL eligible): both versions are then excluded and the work disappears.",Compute dup_pairs only against published records that pass e1-e4 and e7 (or transfer eligibility to the preprint when the published record fails); count the affected works.12systematic_review/define_corpus.py,36-43,major,dedup / protocol mismatch,"Preprint-published merge relies on exact normalised title + |year|<=2 only; the arXiv-id relation (link_arxiv_oa: two OA records sharing one arXiv id) and DOI relations are not used, retitled VoRs stay duplicated, preprint->preprint pairs (SSRN->arXiv) are ignored, and the `version_relationship` field announced in plan S2 is not produced.","Add arXiv-id-based pairs, a fuzzy title fallback (token Jaccard >= 0.9 + first author), produce version_relationship, and report the duplicate rate by year (P5)."13systematic_review/define_corpus.py,"50,56",major,date edge case,"first_date = least(publication_date, preprint_date, arxiv_created): a year-precision publication_date (YYYY-01-01) wins over a precise later arXiv date, biasing first_date to January and mis-assigning `period`/`first_month`; moreover date_precision is defined on publication_date, not on first_date, which the monthly series actually use.",Treat year-precision publication dates as NULL inside least() when a precise date exists; define date_precision on the date actually chosen for first_date.14systematic_review/define_corpus.py,"16,51",major,provenance / protocol mismatch,"WINDOW_END = 2026-11-02 while the works tables come from the 2026-10-14 snapshot; the API increment (openalex_api_increment.py) writes raw pages that no script converts into the tables (build_corpus reads only cs/*.jsonl.zst, compact_tables only tables/tables_p2). The effective end of the corpus is 2026-10-14 minus indexing lag, not 2026-11-02 as stated in prisma_counts.json and PROTOCOL P3.",Either add an increment ingestion path (pages -> tables_inc -> compact) or log an amendment stating the effective data cut-off (2026-10-14) and set WINDOW_END accordingly.15systematic_review/define_corpus.py,"51,84",minor,PRISMA reporting,NULL publication_date is counted as E1 'outside window'.,Add a separate reason code (missing date).16systematic_review/define_corpus.py,33,minor,nondeterminism,"any_value(arxiv_id), any_value(primary_category) when one OA work links to several arXiv ids.","Use arg_min(arxiv_id, created) / deterministic ordering."17systematic_review/define_corpus.py,65-69,minor,consistency,Eligible works with period='pre' (preprint before 2018) are counted in yearly tables (publication_year) but excluded from monthly series (first_month < 2018-01): yearly and monthly totals differ.,Decide (exclude period='pre' or use the year of first_date) and document.18systematic_review/define_corpus.py,67-68,minor,boundary,Baseline/post boundary 2022-11-30 (day level) vs econometrics event 2022-12-01 (month level): the 2022-11 month is pre-event in ITS.,State the one-day difference in the methods section.19econometrics/structural_change.py,43-49,major,protocol mismatch,"Placebo candidate months run over the whole sample (min_pre .. n-min_post): 30 of 66 placebos are post-event in the default window, each absorbing part of the true break, and pre-event placebos are estimated on a sample containing the true break. Protocol P6 / plan 6 say 'placebo breaks at every month of the baseline' (verified: placebo p 0.015 vs 0.0 on the synthetic test series).",Restrict candidates to the baseline and fit placebo ITS on pre-event data only (or include the true-event dummies as controls); report both.20econometrics/structural_change.py,61-101,major,inference gap,"Bai-Perron = global SSR minimiser with BIC/LWZ (DP verified against brute force) but no supF / UDmax / F(l+1|l) tests, no critical values, no seasonal regressors: H3 ('no break at the 5 % level') cannot be evaluated as pre-registered.","Add supF(k) and sequential F tests with Bai-Perron (2003) critical values at trimming 0.15, or a parametric bootstrap p-value for the BIC-selected break; add month dummies as fixed regressors."21econometrics/structural_change.py,32-36,minor,documentation,"Fixed Newey-West maxlags=6 (automatic rule gives 4 for n~100); design matrix (const, t, post, t_post, 11 month dummies) verified correct.","State the bandwidth and add a lag sensitivity (4, 6, 12)."22econometrics/structural_change.py,"64,92-100",minor,convention,"Breaks reported as the first index of the new regime (BP convention: last index of the old regime); h = max(8, 0.15 n).",Document the convention to avoid a one-month misreading.23econometrics/structural_change.py,104-109,minor,method,"PELT penalty 2 log(n) var(y) uses the full-sample variance (inflated by the break), making PELT conservative.",Use a robust scale (MAD of first differences) for the penalty.24econometrics/structural_change.py,112-135,minor,documentation,BOCPD prior mu0/beta0 taken from the first 6 observations (data-dependent); hazard 1/60 fixed; update equations verified.,Document; add a hazard sensitivity.25econometrics/run_structural_change.py,"36,44",minor,method,log(n+1) transformation and Bai-Perron on the unadjusted log series (no seasonal adjustment) for category series with small counts.,Add a Poisson/NB ITS robustness and deseasonalise before Bai-Perron/PELT.26econometrics/run_structural_change.py,53,minor,provenance,Default --first 2018-02 drops January 2018 without stated reason.,Document or start at 2018-01.27econometrics/run_structural_change.py,63,minor,logic / hygiene,`out + '/sens_tmp' if os.makedirs(...) is None else out` always evaluates to sens_tmp; sensitivity runs overwrite each other's placebo_total.csv/fit_total.csv.,Write sensitivity outputs with the cut-off in the file name.28econometrics/run_structural_change.py,56-67,minor,provenance,"its_results.json carries no input hashes, git commit or environment stamp.","Add a provenance block (input file sha256, commit, package versions)."29bibliometrics/01_volume_series.py,22-27,major,plan mismatch / right-truncation,Indexing-lag table is produced but no last-complete-month estimate or completeness correction is derived from it (plan 6: 'right-truncation corrected by indexing-delay profiles'); the econometrics driver uses a hard-coded --last-complete 2026-06.,"Estimate per-month completeness from the previous year's lag profile, write last_complete_month + correction factors to a JSON consumed by run_structural_change.py and emerging_detection.py."30bibliometrics/01_volume_series.py,22-27,minor,data quality,Indexing lag computed on all eligible records including year-precision dates (Jan-1 default) -> biased lag distribution.,Restrict to date_precision = 'month'.31bibliometrics/01_volume_series.py,13,minor,consistency,"Monthly counts keyed on first_month (preprint date) while date_precision refers to publication_date (see define_corpus 50,56).",Fix upstream; document.32bibliometrics/02_collaboration.py,19-20,minor,definition,"Fractional country counting = 1/#distinct countries per work (work-level set), not author-fractional.",State the counting rule; optionally add author-fractional counts from oa_authorships.33bibliometrics/02_collaboration.py,"21,24-25",minor,coverage,"share_intl and share_company denominators are works with affiliation data; affiliation coverage varies by year and source, which can drive H6 trends.",Add coverage columns (share of works with >= 1 country / institution) per year.34bibliometrics/02_collaboration.py,14,minor,documentation,Includes retracted and period='pre' works.,Document.35knowledge_graph/02_category_flows.py,28-30,major,coverage,"INNER JOIN on work_primary drops unclassified works from flows; row_share and cross-area shares are conditional on classification, and the unclassified share may vary by year/area.",Add an 'unclassified' pseudo-category and report its share per year.36knowledge_graph/02_category_flows.py,"13-17,52",minor,verified / inference,Directed weighted modularity formula verified against networkx (identical); no bootstrap CI for Q or cross-area shares although protocol P6 requires uncertainty on all estimates.,Add edge-resampling bootstrap CIs.37knowledge_graph/02_category_flows.py,40-41,minor,consistency,n_month_precision uses date_precision (publication_date) while the month is first_month.,Fix upstream (define_corpus).38knowledge_graph/01_citation_graph.py,23-26,minor,coverage,References whose target is absent from the slim table (merged/deleted OpenAlex ids) are silently dropped; the OpenAlex merged_ids list is not used to remap them.,"Download merged_ids/works, remap, and report n_dangling per year."39knowledge_graph/01_citation_graph.py,31-32,minor,date edge case,Negative citation ages (cited_year > citing_year) are kept.,Flag/clip and report their share.40ingestion/link_sources.py,"36,50-53",major,dead code path,"DBLP arXiv linkage yields 0 links (linkage_report.json: dblp_with_arxiv = 0) because DBLP CoRR `ee` now holds https://doi.org/10.48550/arXiv.<id>, not arxiv.org/abs/; the method is dead and the DBLP-arXiv version relation is unavailable to the merge step.",Derive arxiv_id from the DBLP DOI (10.48550/arxiv.<id>) as well; re-run and report the method counts.41ingestion/link_sources.py,"54-60,67-72,81-83",major,protocol mismatch / precision,"title+year linkage without the first-author surname check specified in plan S1; generic titles >= 25 chars can be mislinked (180k DBLP, 2.1k arXiv, 14.9k ACL links).",Add the first-author surname (DBLP authors[0] vs OpenAlex first authorship) and report precision by method in the H-1 sample.42ingestion/link_sources.py,"52-53,66,72,80,83",minor,fragility,NOT IN (SELECT ...) predicates become NULL (no rows) if any key is NULL; currently safe but fragile.,Use NOT EXISTS.43ingestion/link_sources.py,85-118,minor,provenance,linkage_report.json does not record which pass (1 or 2) produced it; the committed file is the pass-1 state.,Add a `pass` field and the input file hashes.44ingestion/build_corpus.py,69-76,minor,dead code / inconsistency,ids['arxiv'] does not exist in the OpenAlex schema (dead branch); DOI branch keeps the version suffix while the URL branch strips it (normalised later in link_sources).,Remove the dead branch; strip v\d+ in all branches.45ingestion/build_corpus.py,144,minor,logic,is_primary location inferred by URL equality -> zero or several primaries when URLs are NULL.,"Compare on source id + landing/pdf URL, or store the primary location separately."46ingestion/build_corpus.py,173-176,minor,provenance,"Parquet outputs carry no metadata (snapshot release, code commit).",Write key/value metadata into the Parquet schema.47ingestion/openalex_snapshot.py,148-157,minor,robustness,"If a partial download is larger than expected, `curl -C -` keeps resuming it and the part fails forever (status error on every run).",Delete raw_path on size mismatch before retrying.48ingestion/openalex_snapshot.py,160-164,minor,provenance,SHA-256 is recorded but never compared to an upstream value (manifest has no hash).,Record the S3 ETag from the HTTP headers and compare; state that the hash is provenance only.49ingestion/openalex_snapshot.py,188-189,minor,PRISMA reporting,Works with NULL publication_year are excluded from the CS subset without being counted.,Count n_null_year in the ledger for stage S0.50ingestion/openalex_snapshot.py,236-239,minor,provenance,runs table stores argv/host but not the code commit or environment.,Add git commit and environment file hash.51taxonomy/classify.py,108,minor,nondeterminism,row_number() OVER () without ORDER BY: chunk composition varies across runs (per-chunk files not byte-reproducible; aggregates unaffected).,ORDER BY id.52taxonomy/classify.py,"120-129,142-143",minor,provenance,Shard mode writes no classification_report.json; outputs are not version-stamped although the docstring says so.,Write ontology version + sha256(ontology.yaml) into Parquet metadata or a sidecar in both modes.53taxonomy/classify.py,146-157,minor,robustness,input_named symlinks persist across --prepare re-runs; stale links short-circuit os.path.exists.,Clear input_named in prepare().54taxonomy/classify.py,"28,55-57",minor,robustness,Keyword regexes compiled without flags; 273 of 277 ontology patterns carry (?i) - any pattern without it is case-sensitive.,Compile with re.I or add a lint test that every pattern starts with (?i).55experiments/emerging_detection.py,"27-28,22-23",major,protocol gap,KNOWN_SET is empty and the lead-time evaluation on the preregistered known-emergence set (H8; known_set_lead_times.csv in the docstring) is not implemented.,Fill experiments/known_set.csv (topic ids per preregistered item) and implement lead time = first cutoff where score rank <= k minus peak-growth month.56experiments/emerging_detection.py,"78,83-86,66-74",major,right-truncation / separation,Panel ends --last-month 2026-10 (incomplete months) while econometrics uses 2026-06: for h=24 the last test labels use volumes up to 2026-10 (truncated) and the last train label window (cutoff 2021-10 + 24 = 2023-10) overlaps the test feature period starting 2023-01.,Require T + h <= last_complete_month for labels and last_train_cutoff + h <= first_test_cutoff; read the last complete month from the volume-series JSON.57experiments/emerging_detection.py,31-38,major,look-ahead (unit definition),"Units are OpenAlex topics, a taxonomy built in 2024 that already knows which topics emerged (e.g. an LLM topic exists as a unit at 2020 cutoffs); the plan's cutoff-specific semantic clusters (experiments/emerging_clusters.py) do not exist. Features themselves are look-ahead-safe (verified: invariant to perturbation of columns > T).","Implement cutoff-specific clustering on embeddings (or keyword n-grams) as the primary unit, keep topics as a sensitivity, and declare the unit-definition look-ahead in the manuscript."58experiments/emerging_detection.py,40-41,minor,look-ahead (mild),Topic universe (>= 50 works over 2018-2026) selected with full-period data.,"Select units per cutoff (>= 20 works in (T-12, T]) or document."59experiments/emerging_detection.py,56-57,minor,documentation,Trailing window for zvol is 25 months (T-27..T-3); docstring says 24.,"Use n[:, T-26:T-2] or fix the docstring."60experiments/emerging_detection.py,85,minor,documentation,Train cutoffs are 2020-01 ... 2021-10 (quarterly on index % 3); docstring says cutoffs <= 2021-12.,Align docstring/protocol or define cutoffs explicitly.61experiments/emerging_detection.py,"98,108-113",minor,method,"Logistic regression on unscaled features (share, age); pooled AUC mixes cutoffs with different base rates; no bootstrap CI (P6).",Add StandardScaler in a pipeline; report per-cutoff metrics with bootstrap CIs.62embeddings/semantic_atlas.py,"4,66",minor,documentation,Docstring says stratified sample; code draws a simple random sample.,"Stratify by (period, primary_category) or correct the docstring."63embeddings/semantic_atlas.py,81-87,minor,method,"Stability = split-half ARI with kNN transfer inside one UMAP fitted on the full sample (not a bootstrap, and UMAP not refitted) -> overstated stability.",Refit UMAP+HDBSCAN per half (or per bootstrap resample) and report both.64embeddings/semantic_atlas.py,49-61,minor,data quality,Novelty centroids use first_month including year-precision records (January centroids polluted).,Restrict to date_precision = 'month'.65embeddings/semantic_atlas.py,30,minor,robustness,Duplicate work ids across shards resolved silently by last occurrence.,Assert uniqueness of ids.66embeddings/semantic_atlas.py,"37,58",minor,verified,"Cosine via dot product is valid only because embed_corpus.py normalises (normalize_embeddings=True, verified); float16 storage.",Assert unit norms after loading.67embeddings/semantic_atlas.py,41,minor,boundary,Baseline/post defined by calendar year (2018-2022 vs 2023-2026) instead of the period column (Dec 2022 is post).,Use c.period.68embeddings/semantic_atlas.py,"67-69,88",minor,provenance,UMAP/HDBSCAN results depend on umap-learn/numba/pynndescent versions; stability.json has no version stamp.,Record package versions and the embedding model tag in outputs.69
Files · dfc47778191e66c8b99f14f83caf20b8409a826a
Menu

Theme