Skip to content

Preserve scoped material identities and correct audited BacDive substrates - #1256

Merged
realmarcin merged 6 commits into
masterfrom
fix/material-identity-and-substrates-1250
Sep 29, 2026
Merged

realmarcin merged 6 commits into
masterfrom
fix/material-identity-and-substrates-1250

Conversation

@realmarcin

@realmarcin realmarcin commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Finite evidence-backed material and substrate corrections upstream of the
#650/#286 production rebuild, retaining original claims in mandatory audits.

  • Preserve the explicit P3556 product, qualified Sugar stock, and two reviewed
    peptone materials on source-local nodes, without inventing molecular identity.
  • Correct the chloride-qualified tetramethylammonium alias while preserving
    unqualified-parent behavior.
  • Stage the reviewed consolidated mapping delta: three removals and four
    structural-label-only changes, with unrelated rows unchanged. Unified SHA-256
    67c48e1bf6bed1f1fef03a0da1d7d1b56af9fc72374dddd703c222fb36df3cd4.
  • Correct four exact BacDive legacy substrate rows and retain original evidence;
    require the correction policy/raw input and source audit at finalization.

Supported MIM and its immutable upstream pin remain unchanged.

Completed validation

Merged revision de22343a328df57e2ab0fda3c09741be87162999, reviewed head
1329368de7feb835baa4f19f63fd945fe9207f1a. Independent source, mapping and actual
MediaDive node/audit reviews are posted in this PR.

  • Full local pytest: 5,160 passed / 51 skipped. Default tox: all six environments
    passed, including 5,161 passed / 50 skipped in its pytest run. The original
    runner correctly failed its clean-tree guard after formatter-only edits;
    retained failed receipt is not restamped. Independently verified identical
    test AST and source/mapping trees support the bounded formatting continuation.
  • New-head continuation: stable formatter check, 19 focused tests, lock and
    generated merge-config checks passed.
  • Exact-head CI 36576348968: Python 3.10, 3.11, 3.12 all passed.
  • Actual isolated MediaDive replay: 32,135 nodes / 113,926 edges, zero API calls,
    normal source admission, unchanged inputs. Full comparison verifies 29 intended
    target changes, 113,897 otherwise unchanged edge rows, and all 225 audit rows.
  • Manual review covers all nine removed/added node rows and zero residual
    incidence for removed declarations. Inherited malformed KEGG annotation is
    explicitly tracked in Normalize inherited double-prefixed KEGG compound xrefs before rebuild #1259 for repair before the final rebuild/release.

The finite checker defect #1258 was independently fixed and retested; its
original failed comparison is retained alongside the successful new attempt.

Fixes #1241
Fixes #1242
Fixes #1243
Fixes #1245
Fixes #1248
Fixes #1249
Fixes #1250
Fixes #1252
Fixes #1257

Umbrellas #650 and #286 remain OPEN pending the fresh all-15-source rebuild,
candidate-only merge, full KG/model/path acceptance and evidence retention.
This PR is not release authorization; the canonical archive and user statistics
remain untouched.

@realmarcin

Copy link
Copy Markdown
Collaborator Author

Independent exact-head review of 97487141ad6e79e9296025a6f0d608fd3bce3794 against merged master c7dae95a046801e4dac171889df4af7204022c6e: no new actionable composition defect found.

All 27 source/policy/fixture/science-document paths match previously reviewed bytes; the three staging changes are the accepted 67c48e1b… unified artifact, exact reviewed e77a1c34… paired test, and accurately scoped promotion note. Supported MIM and the immutable export pin are unchanged. All 30 changed working-tree files match their committed blobs.

Verified the actual 19-test and 584-test passing receipts without duplicating them. The successful three-phase consumer receipt is correctly identified as pre-BacDive integration; its 16 imported runtime modules remain byte-identical, and the only expected subsequent mapping-input change is accepted candidate staging. No execution was restamped as a new-head run.

This is source/artifact review clearance, not release approval. Actual combined MediaDive replay/comparison and manual node review, complete repository gates, and exact-head CI remain required before merge. Fresh all-source transforms, candidate merge, retained audit evidence, and final KG reviews remain separate release gates; umbrella #286 and #650 are not closed by this review.

Fixes #1257. The two formatting hunks preserve the complete Python AST and all scientific assertions.
@realmarcin

Copy link
Copy Markdown
Collaborator Author

Independent continuity review at 1329368de7feb835baa4f19f63fd945fe9207f1a: no new actionable defect found. The only change from reviewed 97487141… is two formatter hunks in the paired-artifact test; its full AST is identical and its new byte hash is a0341861…. Entire producer, mapping, script, configuration and fixture trees are unchanged.

The original gate receipt remains correctly failed for its dirty-tree guard, not restamped as green. Verified logs show full pytest passed (5,160/51 skipped) and all six default tox environments passed (tox pytest: 5,161/50 skipped). The new-head focused 19 tests passed; the coordinator separately completed stable formatting, lock and merge-config checks with clean head guards.

This clears source/test continuity, not final acceptance. Exact-head three-version CI and actual combined MediaDive replay/comparison with manual node review remain pending. Fresh all-source transforms, candidate merge, retained audit evidence and final KG reviews remain separate release gates; umbrella #286/#650 are not closed.

@realmarcin

Copy link
Copy Markdown
Collaborator Author

Independent actual MediaDive review at 1329368de7feb835baa4f19f63fd945fe9207f1a clears the finite material changes, with the explicit inherited annotation exception below.

The isolated producer replay succeeded. Corrected full comparison (6f065514…) accounts for all 113,926 edges: 29 intended target changes and 113,897 otherwise identical full rows, preserving quantities, raw context, assertions and provenance. All 225 mandatory audit rows/37 scoped assertions are retained and bound in both producer-time and finalized evidence. All 18 input pins remain unchanged.

Reviewed every affected node field: four obsolete source declarations removed only after their incidence reaches zero, five correctly named/scoped nodes added; all other node rows unchanged. Soy peptone correctly retains its existing ComplexMolecularMixture category. The chloride target, raw display name, native CAS/KEGG reference and synonym are supported.

Exception: chloride enrichment also exposes pre-existing malformed kegg.compound:cpd:C11335. This is not a valid third native xref; #1259 tracks the required upstream fix before the final production rebuild/release. It is not silently waived by manual review.

Exact-head CI and final production/merged-KG acceptance remain separate gates. This review does not close #286/#650 or declare the current merged graph release-ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment