Skip to content

Backfill three cross-category canonical examples - #552

Merged
realmarcin merged 1 commit into
mainfrom
codex/issue-444-canonical-examples-three
Aug 26, 2026
Merged

realmarcin merged 1 commit into
mainfrom
codex/issue-444-canonical-examples-three

Conversation

@realmarcin

Copy link
Copy Markdown
Contributor

Summary

  • add direct canonical examples for pigmentation, white pigmentation, and nutrient adaptation
  • preserve wild-type versus mutant phenotype context for Serratia marcescens
  • verify current NCBI Taxonomy identifiers and labels and regenerate derived pages/reports

Scope

Validation

  • just validate-strict on the three records
  • just validate-history
  • just audit-canonical-examples --ncbi-api: 429/429 resolved, 0 errors, 24 pre-existing label-drift warnings
  • just qc

Refs #444

Add direct, source-backed canonical examples for pigmentation, white pigmentation, and nutrient adaptation. Preserve mutant context and verify current NCBI taxonomy labels.\n\nRefs #444
@realmarcin
realmarcin merged commit 3316e80 into main Aug 26, 2026
6 checks passed
@realmarcin
realmarcin deleted the codex/issue-444-canonical-examples-three branch August 26, 2026 11:14
realmarcin added a commit that referenced this pull request Aug 26, 2026
…us round-trip invariant (#556)

* Backfill canonical examples for three upper morphology and motility classes

flagellar_arrangement, intracellular_inclusion, and motility have
NONMECHANISTIC graphs because each spans alternative mechanisms, which is
why earlier tranches left them without canonical_examples. A single "the"
exemplar is wrong for such a class, so each example here is scoped by its
note to the one flagellation pattern, inclusion type, or locomotion
mechanism its cited source establishes:

- flagellar_arrangement: Shewanella putrefaciens CN-32 (monotrichous,
  92% monopolar) and Helicobacter pylori (lophotrichous, ~4 per cell)
- intracellular_inclusion: Halobacterium salinarum NRC-1 (gas vesicle),
  Cupriavidus necator H16 (PHB granule), Magnetospirillum
  gryphiswaldense MSR-1 (magnetosome)
- motility: Salmonella Typhimurium (flagellar swimming) and Pseudomonas
  aeruginosa (type IV pilus twitching)

Every example comes from the record's own deep-research artifact. Taxon
ids and labels were verified against NCBI taxonomy and all seven DOIs
resolved through Crossref before writing. Myxococcus xanthus was
deliberately excluded from motility: the artifact lists it as a taxon
label with no cited gliding-mechanism claim, and a token exemplar is the
defect #526 objects to.

Coverage moves 429/256 -> 436/259; the live NCBI audit resolves all 436
with 0 errors and the 24 pre-existing label-drift warnings, none on these
records. Quantitative bins stay deferred under #475/#478 and no gene or
operon was promoted to a primary entry.

Refs #444

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Restore the corpus round-trip invariant and stop pinning a live count

Two tests were already failing on main at 3316e80, both hidden by the
same CI gap.

#554 — `.github/workflows/pytest.yaml` filters on scripts/, src/, tests/,
research/ but NOT data/traits/, so pytest never ran on any curation-only
PR. Across #544-#552 that let 13 records drift into a form
write_validated_trait would not emit, breaking the corpus round-trip
invariant #322/#344 established. Adds data/traits/** to both filters
(naming the test that reads it, as the research/** entry already does)
and re-emits the 13 records through the helper's own path.

The normaliser follows #344: two-pass, so every file is computed and
semantically checked before anything is written; formatting only, so no
curation events (there is no curation claim to record). Verified
independently — all 477 records compared against `git show HEAD:` after
the rewrite, 0 semantic differences.

#555 — test_action_filter_narrows_both_rows_and_the_stated_count pinned
ALREADY_DEEP at 15; it is computed from live corpus depth, had already
been bumped 9 -> 15 once, and stood at 17. Now asserts the property the
name promises: the filter narrows rows and the stated count together,
and every printed row carries the action.

Closes #554
Closes #555

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Address the adversarial review of the exemplar tranche

Three of the seven notes asserted more than their source shows (#557).
All three were confirmed against the primary literature, not just the
research artifacts, before changing anything.

- intracellular_inclusion: the gas-vesicle exemplar named Halobacterium
  salinarum NRC-1 and said the Gvp proteins were characterised "in this
  organism". Europe PMC metadata for the cited paper shows the
  split-GFP, pulldown and deletion work was done in Haloferax volcanii
  as a heterologous host, and NRC-1 appears in neither the source nor
  the record's own artifact. Now the species node NCBITaxon:2242, with
  a note saying the analysis establishes protein roles in a heterologous
  host rather than in-situ assembly.
- flagellar_arrangement: 92% is a localization measurement; the note had
  restated it as "cells carry a single flagellum". Now reports monopolar
  hook localization and says the figure is not a per-cell count.
- motility: the 63% twitching-zone reduction came from PlzR
  OVEREXPRESSION, and the artifact explicitly instructs curators to keep
  the overexpression and 1% agar qualifiers plus the pleiotropy caveat.
  The note now carries all three.
- Salmonella note softened: the cited review treats it with E. coli.

Script and test hygiene (#558):
- the dry run now renders through write_validated_trait into a temp file,
  so a clean preview actually exercises the closed-schema gate
- the summary line reports examples added, not the tranche's size
- canonical_examples is inserted after `evidence`, matching 250 of the
  259 records that carry it
- the filter test derives its upper bound from the unfiltered row count
  instead of pinning 477
- the normaliser docstring no longer claims the post-write pass gives a
  guarantee only the pre-write pass provides

The correction is recorded in a new history record referencing the
original, per history/README.md's append-only rule.

Closes #557
Closes #558

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant