Repository navigation
Make EvidenceItem.reference_title required - #18374
Conversation
linkml-reference-validator 0.5.2rc1 reads a whole-book PubMed record's title from its BookTitle (linkml/linkml-reference-validator#167). Before that, these three records cached with no title: PMID:23304742 (AHRQ CER 86, restless legs syndrome treatment), PMID:25695122 (IOM ME/CFS report) and PMID:31909928 (NICE cannabis-based medicinal products guideline). Re-fetched with `just fetch-reference --force`; the abstract text is unchanged (186/186 snippets in the citing entries still verify). The two evidence items citing PMID:23304742 get their reference_title from the cache via backfill_reference_titles.py, which takes the presence gate to zero, report-only items included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UDqeWsdcTfKeW7LriK6a9f
Second stage of a two-stage narrowing. #15612 backfilled the missing titles and made scripts/find_missing_reference_titles.py a whole-repo CI gate; kb/ has held at zero since. The previous commit filled the last two evidence items, whose cache files lacked a title until linkml-reference-validator#167 (in the pinned >=0.8.0) read whole-book PubMed titles. Also filled from references_cache/ by backfill_reference_titles.py, additions only: five top-level references: titles in TOP2B-Related_Immunodeficiency_and_Congenital_Anomalies_Spectrum, and 97 evidence titles in the tests/data/valid fixture that linkml-run-examples validates against the schema. The generated src/dismech/datamodel/ models are not regenerated: they already differ from a fresh regeneration by unrelated drift, and nothing imports them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UDqeWsdcTfKeW7LriK6a9f
Re-fetching it wrote the current body format, which drops NICE's "National Institute for Health and Care Excellence: Guidelines." line. That line is what exempts this authorless, journal-less PubMed monograph from check-reference-cache-frontmatter's fabrication-fingerprint rule (#1737, #6607), so the re-fetched file failed the gate. The only entry citing it, Dravet_syndrome, already carries its reference_title, so the cache title is not needed for the required-slot change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UDqeWsdcTfKeW7LriK6a9f
The gate's docstring still called the slot recommended and said a whole-book PubMed record could not be titled; both stopped being true in this branch. The PR-review skill said the same about the schema flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UDqeWsdcTfKeW7LriK6a9f
|
Claude finished @cmungall's task in 1m 20s —— View job Review: approvedThis PR makes
Findings
🔵 Suggestions
The PR body asks @cmungall to sign off on the schema change, per the extend-schema skill. |
There was a problem hiding this comment.
Review: approve
This PR makes EvidenceItem.reference_title required in the schema, and the KB is ready for it. Every added title is copied from its references_cache/ frontmatter, the two re-fetched caches keep the abstract text the existing snippets quote, and nothing outside the stated scope changed. I found no blocking issues.
- Schema validation would pass (the PR reports
linkml-validateclean across the KB;check-reference-titles-presentis at 0) - All PMIDs verified as real (no new citations; titles are on existing references)
- Evidence snippets are exact quotes (no snippets changed; the PMID:23304742 cache body is unchanged apart from a header block)
- Ontology terms correct and specific (N/A, no term changes)
- evidence_source classifications correct (N/A, unchanged)
- No pathophysiology bundling (N/A)
What I checked
- Schema (
src/dismech/schema/dismech.yaml):recommended: truebecomesrequired: true. The new comment points curators to the cache andscripts/backfill_reference_titles.pyrather than typing a title. Good. - Titles against caches: both PMID:23304742 citers (
Restless_Legs_Syndrome,dopamine_receptor_agonism) now read "Treatment for Restless Legs Syndrome", which matches the new frontmatter. That title is the AHRQ review, which is on-topic for the dopamine-agonist claims it supports. The five TOP2Breferences[].titlevalues are all TOP2B/B-cell papers, consistent with the entry. - PMID:25695122 re-fetch: no file in
kb/cites this reference, so the body reformat (book front matter dropped, abstract joined onto one line) cannot break a snippet. - Scope: all 10 files serve the narrowing. The test fixture titles are needed for
just test-examples. Thescope-overridelabel covers the skill and doc edits. - Rebase or reversion risk: none seen. The PMID:31909928 cache was deliberately left at
main's copy, as the PR body explains.
🔵 Suggestions (non-blocking)
scripts/find_missing_reference_titles.pydocstring says whole-book titles arrived in "linkml-reference-validator 0.5.2". The history record andpyproject.tomlsay the pin is>=0.8.0. If 0.5.2 is the release that first contained linkml/linkml-reference-validator#167, both are true, but it reads like a contradiction. Consider wording it "since the release containing linkml-reference-validator#167".- The PR body says the two whole-book titles were "copied into
Restless_Legs_Syndromeand thedopamine_receptor_agonismmodule". Both of those cite PMID:23304742. PMID:25695122 has no citer inkb/; its cache was only refreshed. The history record already states this correctly. - The PMID:31909928 NICE-guideline exemption regex in
check-reference-cache-frontmatterwill break on the next forced re-fetch, as you note. A follow-up issue would keep that from surprising someone.
Schema narrowing: @cmungall's sign-off is requested in the PR body, per the extend-schema skill.
|
On the review's optional suggestions:
Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UDqeWsdcTfKeW7LriK6a9f
|
Claude finished @cmungall's task in 1m 31s —— View job Re-review: approvedI re-reviewed the PR on head
What changed since the last approval: What I checked on this head
🔵 Suggestion (does not block)
Per the extend-schema skill, this schema narrowing still needs sign-off from @cmungall. |
There was a problem hiding this comment.
- Schema validation would pass
- All PMIDs verified as real
- Evidence snippets are exact quotes
- Ontology terms correct and specific
- evidence_source classifications correct
- No pathophysiology bundling (atomic entries only)
Re-review: approved
Since my last approval the branch has had two changes: main was merged in, and one docstring commit (d64d677) landed. That commit names linkml/linkml-reference-validator#167 where the docstring used to name version 0.5.2. It takes my earlier suggestion and changes nothing else.
Checked on the current head
just check-reference-titles-presentacross 4,791 files: 0 gated, 0 report-only. Nothing merged in frommainhas added an evidence item without a title, so making the slotrequiredturns nothing red.EvidenceItemis used only indismech.yaml. No other schema has a slot whose range isEvidenceItem. That meanskb/, which the gate scans, holds every instance the narrowing affects.- The added titles match the
references_cache/frontmatter (PMID:23304742 is "Treatment for Restless Legs Syndrome"). Nothing inkb/cites PMID:25695122, so the reformat of its cache cannot break a snippet.
🔵 Suggestion
- The
slot_usagecomment onPublicationReference.title(aroundsrc/dismech/schema/dismech.yaml:8544) still says the title isrecommended, "matching therecommended: truealready carried by the EvidenceItemreference_titletwin". That is no longer true. The comment could say the twin is nowrequiredand that this slot staysrecommendedon purpose. It is comment text only, so it does not block. Fold it into the next push if there is one.
Per the extend-schema skill, this schema narrowing still needs sign-off from @cmungall.
|
The Generated by Claude Code |
test_reference_range_on_biochemical_validates built an evidence item without reference_title and asserted it validates; the required slot now rejects that. Also update the PublicationReference.title description, which still called its EvidenceItem twin recommended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UDqeWsdcTfKeW7LriK6a9f
|
Claude finished @cmungall's task in 1m 13s —— View job Re-review: approvedI re-reviewed the PR on head
What changed since the last review: one new commit, 305d050.
What I checked: I ran every test that validates or rejects an inline record against the schema in Per the extend-schema skill, this schema narrowing still needs sign-off from @cmungall. |
There was a problem hiding this comment.
Re-review on head 305d050: approve
- Schema validation would pass
- All PMIDs verified as real (no new citations)
- Evidence snippets are exact quotes (no snippets changed)
- Ontology terms correct and specific (no term changes)
- evidence_source classifications correct (unchanged)
- No pathophysiology bundling (N/A)
What changed since the last review: the new commit is 305d050, and the rest is the same as before.
tests/test_data.py:test_reference_range_on_biochemical_validatesbuilds an evidence item inline, and it now has areference_title. Without one the required slot would make that test fail, so this was a real fix. I ran it locally and it passes.src/dismech/schema/dismech.yaml: thePublicationReference.titledescription no longer calls itsreference_titletwin recommended. This is the suggestion from my last review, and the new wording is accurate.
Checked: I ran every test in test_data.py, test_conformance.py, test_gene_namespaces.py, test_gene_validity.py, test_genetic_schema.py and test_genomic_regions.py that validates or rejects an inline record against the schema: 66 passed. Inline fixtures like this are the place a newly required slot can still fail, and none does.
No blocking issues. As the PR body says, this schema narrowing needs sign-off from @cmungall under the extend-schema skill.
|
🐑 PR Shepherd (deterministic sweep) — Added to the merge queue: approved, no human assignee, no conflicts, all checks green, and open longer than 3 days. GitHub will test this PR against current |
Every evidence item in
kb/now has areference_title, and this PR makes the slotrequiredin the schema. It is the second stage of the change #15612 started. That PR backfilled the KB to zero and addedjust check-reference-titles-present, which has held it at zero since, so open curation PRs that pass that gate will not go red when this merges.What changed
EvidenceItem.reference_titlegoes fromrecommended: truetorequired: true. A new comment says where the title must come from: copied from thereferences_cache/frontmatter (scripts/backfill_reference_titles.py), never typed by hand. ThePublicationReference.titledescription now says its twin is required and that it staysrecommended.PMID:23304742(AHRQ review on restless legs treatment), a whole-book PubMed record, which the fetcher used to cache with an empty title. Take a whole-book PubMed record's title from its BookTitle linkml/linkml-reference-validator#167 fixed that, andmainalready pins a version containing it. I re-fetched the cache with--forceand copied its title intoRestless_Legs_Syndromeand thedopamine_receptor_agonismmodule.PMID:25695122(the IOM ME/CFS report) is the same kind of record. It has no citer inkb/, so its cache was only refreshed.PMID:31909928is unchanged. Re-fetching this NICE guideline drops the "Guidelines." line thatcheck-reference-cache-frontmatteruses to exempt it from needing authors or a journal, so the gate fails. Its only citer, Dravet syndrome, already has the title, so I keptmain's copy. The next forced re-fetch of that reference will hit the same failure. The exemption regex will need to match the new body format.references[].titleadded inTOP2B-Related_Immunodeficiency_and_Congenital_Anomalies_Spectrum. That slot staysrecommended; these five were simply missing.tests/data/valid/Disease-Antiphospholipid_Syndrome.yamlgains 97 titles, becausejust test-examplesvalidates it against the schema.test_reference_range_on_biochemical_validatesbuilds an evidence item inline and now gives it a placeholder title.history/schema/reference_title/record.Not changed
src/dismech/datamodel/dismech.pyanddismech_pydantic.py. They already differ from a freshjust gen-pythonby about 290 lines onmain, and nothing imports them. Regenerating them here would bury this change in unrelated diff.examples/gene_term_example.yaml(placeholder PMID) and the dated YAML underdocs/reports/senescent-cell-representation/. These are not validated as KB content.Validation
test (3.13)) passes on the current head, aftermainwas merged in.linkml-validateagainst the new schema: no issues across all disorders, plus modules, comorbidities, groupings and module collections.just check-reference-titles-present: 0 gated and 0 report-only across 4,791 files after the merge.pytest -m "not kb_data and not oak_db") passes, after the one inline fixture above was fixed.just test-examples,just test-schemaandjust lint-pythonpass.just validate-terms-schemaonline reports the obsoleteModifierEnumPATO terms (PATO:0002300/0002301), unrelated to this diff. Offline, it gives the same result onmainand this branch.Per the extend-schema skill, this is a schema narrowing and needs sign-off from @cmungall.
🤖 Generated with Claude Code
https://claude.ai/code/session_01UDqeWsdcTfKeW7LriK6a9f