Skip to content

test: real-world config corpus and production-pattern runtime tests - #112

Merged
SkyeAv merged 1 commit into
mainfrom
upgrade-the-test-suite
Aug 24, 2026
Merged

test: real-world config corpus and production-pattern runtime tests#112
SkyeAv merged 1 commit into
mainfrom
upgrade-the-test-suite

Conversation

@SkyeAv

@SkyeAv SkyeAv commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

Upgrades the test suite with production-driven coverage, mined from the real-world config corpora (MultiomicsNext .tablassert, DAKP tables/, TableConfigs FLAKASSIST/MBKG/MOKG):

  • tests/test_realworld_configs.py (22 tests) — a vendored corpus of 14 sanitized production configs under tests/fixtures/realworld/ (every local: rewritten to a placeholder; provenance in the fixture README), validated with the same recipe as test_docs_examples.py. Includes deliberate-negative legacy fixtures (QI-era syntax/status/contributors keys, pre-rig graph layout) and targeted semantic assertions: DAKP provenance.override with per-infores upstream_source_record_urls, split_by: "|" annotations, nullable disease_context_qualifier, unpaired effect_size drop, YAML-anchor provenance sharing, multi-section expansion, and a fully populated RIG graph config. An env-gated sweep (TABLASSERT_CONFIG_CORPUS) validates ~480 live production configs in place; the one known-legacy failure (TableConfigs MOKG/MIN1.yaml, duplicate qualifier after template merge, superseded by its own v12 conversion) is pinned strict-both-ways in KNOWN_CORPUS_FAILURES.
  • tests/test_production_patterns.py (18 items) — pipeline/e2e tests against a real inline Rust fullmap for features production configs use that previously had only model/op-level coverage: enum-ranged qualifier literals bypassing resolution, explode-before-prefix op order, provenance.override URL rehoming in emitted KGX, reindex across all six comparisons plus default-ne, regex ${1} backrefs and qualifier-level regex, avoid/prioritize deciding ambiguous resolution, fill forward/zero, copysign transformation, suffix, the nullable+prioritize+avoid qualifier combo, partial-node template merge, and row_slice at e2e level. Each test names the production config it is shaped after.

Findings surfaced while mining the corpora (no action taken): all 56 TableConfigs QI configs and both GRAPH/*.yaml are legacy-incompatible with the 12.x schema; row_slice is 0-based-offset; CURIE value literals need a fullmap synonym row to resolve; qualifier slot attachment is edge-class-dependent.

Test plan

  • uv run pytest -q — 975 passed, 38 skipped
  • Live sweep over ~480 production configs via TABLASSERT_CONFIG_CORPUS — all pass except the pinned known-legacy MIN1.yaml
  • uv run ruff check . / ruff format --check . / uv run pyright — clean

Vendor 14 sanitized production configs from MultiomicsNext (.tablassert
mokg-v12/refconfigs), DAKP (tables/), and TableConfigs (FLAKASSIST/MBKG/
MOKG) under tests/fixtures/realworld, plus two legacy negative fixtures
(QI-era keys, pre-rig graph layout).

tests/test_realworld_configs.py validates the vendored corpus with the
same recipe as test_docs_examples.py, asserts the negative fixtures are
rejected with the expected legacy-key errors, pins production-observed
semantics (DAKP override/split_by/nullable qualifier, unpaired
effect_size drop, YAML anchor provenance, multi-section expansion, full
RIG), and adds an env-gated sweep (TABLASSERT_CONFIG_CORPUS) that
validates ~480 live production configs in place. One known-legacy
failure (TableConfigs MOKG MIN1.yaml duplicate qualifier) is pinned
strict-both-ways.

tests/test_production_patterns.py adds pipeline/e2e coverage, shaped
after named production configs, for features that previously had only
model/op-level tests: enum-ranged qualifier literals bypassing
resolution, explode-before-prefix op order, provenance.override URL
rehoming in emitted KGX, reindex across all six comparisons plus
default-ne, regex capture-group backrefs and qualifier-level regex,
avoid/prioritize deciding ambiguous resolution, fill forward/zero,
copysign transformation, suffix, nullable+prioritize+avoid qualifier
combo, partial-node template merge, and row_slice at e2e level.
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ada0e5a9-9ec5-4fa3-882e-208e81bc7ef7


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SkyeAv
SkyeAv merged commit 2ccc931 into main Aug 24, 2026
5 checks passed
SkyeAv added a commit that referenced this pull request Aug 24, 2026
Cut 13.0.0 and bump the package version in pyproject.toml, uv.lock, and
CITATION.cff.

Major: three breaking changes since 12.1.0. The inlined supporting study now
carries current Biolink Study metadata with disjoint ids and names and no `#`
composition; biolink-model 4.4.4 types the statistical edge slots, so
`effect_size` ships as a real JSON number and `statistical_significance_qualifier`
rides the edge as a bare enum token (both 99099a1); and an unpaired
`effect_size`/`effect_type` half is now DROPPED with an
`UnpairedEffectAnnotationWarning` instead of failing the section, retiring the
`annotation-effect-size-without-type` / `annotation-effect-type-without-size`
codes (#105). Also ships the two final-graph QC assertion sets (#106, #107), the
resolve_batch single-materialization win (#110), and the agent's task
pre-rendering, planning-off, improve-round cap, and build memoization (#113).

The legacy TableConfigs importer (#105) is deliberately absent from the
changelog: it landed and was removed (58787f4) inside this window, so it never
appeared in a released version and is a net no-op for users.

main was red at 7140c37; fixed here so the release is cuttable. Both failures
are #112 fixtures/expectations written against biolink-model 4.4.3 and merged
after the 4.4.4 bump landed:

- The vendored DAKP configs listed `AffinityMeasurement` in `avoid:`, a class
  4.4.4 renamed to `ProteinLigandAssayResult`. DAKP generates `avoid` as the
  sorted complement of each side's prioritize tuple, so the old name is a 4.4.3
  generation artifact rather than an intentional deviation; rewritten in place
  and recorded in the fixture README.
- test_copysign_transformation_in_pipeline asserted `effect_size == "-0.85"`,
  the pre-4.4.4 `{:.4g}` string form. It is a real JSON number now.

Deliberate Biolink departures are untouched: p-value columns keep their
controlled scientific notation despite the model typing them `float`, and
`approval_ids` remains a curated pending pass-through.

docs/cli.md's validate-kgx section still printed `biolink-model 4.4.3` and
claimed `effect_size`/`effect_type` were pending; rewritten around the fields
that are actually pending today (`approval_ids` plus the KGX denormalized
carryovers), noting the pair graduated when 4.4.4 shipped #1774.

Testing:
- uv run pytest -q -> 1047 passed, 15 skipped (94% coverage)
- uv run ruff check . && uv run ruff format --check . && uv run pyright -> clean / 0 errors

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HZQ8rLfhvtyErcq9S4Ao6b
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