Skip to content

Update merge fixtures for mandatory BacDive correction provenance and audit #1252

Closed

Description

@realmarcin

Update merge test fixtures for the mandatory BacDive correction input/audit contract

Related #1249/#1250. Independent review of frozen W8 found a repository-test
integration failure, not a reason to weaken the new production evidence checks.

BacDiveTransform now declares ec_substrate_correction_policy and
ec_substrate_legacy_mapping as required consumed roles, plus mandatory audit
ec_substrate_corrections.tsv. Two existing inert registered-producer fixture
builders still assume any required role is bacdive_taxon_lookup and only
prepare MediaDive's mandatory audit:

  • tests/test_merge_source_freshness.py:88, prepare_source;
  • tests/test_merge_upstream_review.py:50, _prepare.

Minimal reproduction at the frozen six-file W8 patch:

PYTHONDONTWRITEBYTECODE=1 PYTHONPATH="$PWD" python -m pytest -q -p no:cacheprovider \
 tests/test_merge_source_freshness.py::test_scoped_ontology_requires_whole_producer_schema_evidence \
 tests/test_merge_upstream_review.py::test_subset_checks_required_upstreams_but_not_unrelated_stale_source

Result: 2 failed, 4 dependency warnings, 8.33 seconds, exit1. Both fail
before their intended merge assertion with:
AssertionError: ... explicit immutable input for ec_substrate_correction_policy.

The new 223-case focused suite does not exercise these fixture branches. Fix
their tiny immutable empty-cohort protocol: consume the actual policy and a
test-owned empty legacy input using the real preparation boundary, write and
record the corresponding header-only producer audit, and preserve finalization/
admission checks. Do not monkeypatch away required roles, forge finalized
receipts, or relax missing/tampered audit rejection. Retain positive evidence
binding checks and missing/unrecorded/tampered negative controls in regressions.

Reviewed source bytes: bacdive.py
a29ccaf97fad660b51299d53a11b76e0f867ee9b91b8a7cdf5f45c616e7aaa4e,
ec_substrate_corrections.py
b6ed3210687739b4399d64889f964115a22b603622fdb293d45ca4fcbc6e9432.
No production run, full suite rerun or implementation edit was made by this
reviewer. Full repository gates remain pending after the fixture repair.

Activity

  1. realmarcin commented on Sep 29, 2026

    @realmarcin
    CollaboratorAuthor

    Implemented and independently reviewed in merged PR #1256 (de22343), with exact-head three-version CI green. See PR comments for scoped tests and actual MediaDive full-row/audit acceptance; this is not a claim of a new full BacDive or all-source production run. Fresh all-15 rebuilding and merged-KG acceptance remain tracked under open umbrellas #650/#286; inherited KEGG annotation follow-up #1259 is required before that rebuild.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions