Skip to content

Compare data-keyed result maps by shape, not by key - #107

Merged
Robbie1977 merged 1 commit into
mainfrom
fix-example-shape-data-keys
Sep 4, 2026
Merged

Compare data-keyed result maps by shape, not by key#107
Robbie1977 merged 1 commit into
mainfrom
fix-example-shape-data-keys

Conversation

@Robbie1977

Copy link
Copy Markdown
Contributor

Compare data-keyed result maps by shape, not by key

test_live_result_matches_recorded_shape treated every key in a recording as schema, so a backend content change could fail CI as a missing key — the opposite of this module's stated contract, that content changes must not fail while a key or type disappearing from a payload must.

Four recorded maps are keyed by data: Examples and Images by template short_form, Domains and Licenses by index. Which keys they carry follows whichever images the indexer picked, and the class documents cap anatomy_channel_image at ten entries however many images a class really has:

FBbt_00058205  adult cholinergic neuron   pdb=56384   solr=10
FBbt_10000000  anatomical entity          pdb=35568   solr=10
FBbt_00003748  medulla                    pdb=   12   solr=10

So a class whose only image on some template falls outside that ten loses the whole template key. That is what happened to medulla on 2026-09-03: it lost VFB_00030786 (adult brain template Ito2014), while VFB_00030810 still had its in_register_with edge in the PDB, its own SOLR document, and every image file serving 200. Nothing was missing from the backend.

These four are now compared the way lists already are — non-emptiness plus the shape of one value, with a free key set. Meta is deliberately excluded because its keys are the schema, as is headers, where a lost column is a real regression.

How to test

pytest src/test/test_example_queries.py against the live backend — 15 passed here, including the term_info_FBbt_00003748 case that has failed since 1 Sep. The two new unit tests need no backend.

Follow-up, not in this PR

The other image that missed medulla's cap, VFB_00107fob ("ME_R on JRC2018Unisex"), has no SOLR document of its own and its volume.obj 404s while volume.nrrd and volume_man.obj serve. That one looks like a genuine defect.

test_live_result_matches_recorded_shape treated every key in a recording
as schema, so a backend content change could fail CI as a missing key --
the opposite of this module's stated contract, that content changes must
not fail while a key or type disappearing from a payload must.

Four recorded maps are keyed by data: Examples and Images by template
short_form, Domains and Licenses by index. Which keys they carry follows
whichever images the indexer picked. Class documents cap
anatomy_channel_image at ten entries however many images a class really
has -- 56,384 for adult cholinergic neuron, 12 for medulla -- so a class
whose only image on some template falls outside that ten loses the whole
template key. That is what happened to medulla (FBbt_00003748) on
2026-09-03: it lost VFB_00030786, adult brain template Ito2014, while
VFB_00030810 still had its in_register_with edge in the PDB, its own SOLR
document, and every image file serving 200.

Compare those four the way lists are already compared: the map must still
be non-empty and one value must still have the recorded shape, but the
key set is free. Meta is deliberately not in the set -- its keys are the
schema -- and neither is headers, where a lost column is a real
regression.

Verified against the live backend: the full example suite passes,
including the term_info_FBbt_00003748 case that has failed since 1 Sep.
@Robbie1977
Robbie1977 merged commit 0dd0a35 into main Sep 4, 2026
4 of 5 checks passed
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

⚠️ 72 test(s) skipped — VFB backend was unreachable

The full suite ran, but 72 test(s) were skipped because the VFB backend (Neo4j / SOLR / Owlery) did not answer during this run.

These are not failures and not a problem with this branch — but those queries went unverified, so a green check here is an incomplete run.

To re-run: open this workflow run and click Re-run all jobs once the backend is healthy (re-running the “Run completeness” check itself does nothing — it has no job behind it).

2 failed, 696 passed, 72 skipped, 339 warnings in 796.56s (0:13:16)

Posted automatically. This comment is removed once a run completes with zero skips.

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