Repository navigation
fix(cut-photo): a GAF 2.1 header declares its GO release, in capitals - #1296
Merged
Merged
Conversation
The photo build read the GAF header with a lowercase-only key pattern. GOA's GAF 2.1 files capitalise their keys (!GO-version:, !Generated:), so the 2.1 headers of cuts 160, 177 and 194 were read as declaring no GO release, and the photos recorded the cut_date rule. They all declare one; read from EBI's files on 2026-11-23: - 160: releases/2016-10-29 - 177: releases/2018-04-20 - 194: releases/2019-11-09 Keys are now matched in any case and stored in lower case, and a 2.1 file's Generated date fills date_generated as date-generated does in 2.2. In the development store no graph changes: one graph per cut is loaded, and it is the newest not after both the declared release and the cut's date. The manifests of 160, 177 and 194 do change (the rule they name and the header they keep), so their digests change on a rebuild while every count stays. Where more graphs are loaded, the cut_date rule could have picked a graph newer than the one the file declares, which is what the declared rule exists to prevent. ADR-D59's paragraph on the rule said a GAF 2.1 declares none; it is corrected in place, with the date. A new test builds a photo from GOA 160's real header and fails without the fix.
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (83.97%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #1296 +/- ##
========================================
Coverage 85.69% 85.69%
========================================
Files 471 471
Lines 37374 37374
========================================
Hits 32026 32026
Misses 5348 5348
🚀 New features to boost your workflow:
|
frapercan
marked this pull request as ready for review
November 23, 2026 12:12
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
… the cut (#1297) ## The bug `protein.sequence_id` and `protein.taxonomy_id` are today's UniProt entry. Four readers used them on photo windows: | Reader | Effect in development | Effect in production | |---|---|---| | Prediction: alignment and length inputs (batch and unified path) | 12 features silently null | today's sequence, published after the cut | | Prediction: taxonomy inputs | 6 features silently null | today's organism | | Transitions export: the queries a window asks about | zero queries for every photo window | today's sequence ids | | Target FASTA and its declared query set entries | targets without a sequence | today's sequences in the scored file | ## The fix - On a run whose annotation set a photo loaded (`photo_of`), the readers take the member's sequence (`cut_photo_member.sequence_md5`) and taxon (`cut_photo_member.taxon_id`). - They do it through two shared functions in `_photo_sequences.py`: `photo_sequences` and `photo_taxa`. - A run over a set no photo loaded reads today's entry, as before. - Uploaded query sets keep their own sequences. ## Tests - **New: `tests/test_a_photo_run_reads_the_cut_inputs.py`** (test database). - It gives a member a different sequence and taxon today than at the cut, so a leaking reader returns the wrong values instead of nothing, whatever the environment. - Three of its four tests fail without the fix. - **Changed: the fake session of `tests/test_the_queries_a_window_asks_about.py`** now answers the photo lookup with none, since that universe has no photos. - **Regression run:** 54 test files on prediction, export, transitions, features, retrieval, queries and targets: 850 passed, 2 skipped. The lint gates pass. ## Not in this change (next) - **Other readers that still read today's entries:** - the legacy training dump and the mini-job feature export (`training_dump/_data_loaders.py`, `export_minijobs/_export_features_batch.py`); - the InterProScan input (`run_interproscan_batch.py`). - **The information accretion feature.** It needs `information_accretion_set` as a dated reference first. - **The taxonomy tree,** which waits for the author's choice. Until it exists, the taxonomy distances stay empty even with the right taxon. - **A re-scoring of the 211->227 ProtT5-XL set**, to record the coverage of the 18 features per window. This is part of the closure plan's first wave (dated inputs), together with #1296. ## Verified in the development universe The branch's readers were run against the development store, without deploying it: 500 targets of 211->227 sampled with seed 0, the window's start set 453f8cf5, photo b98ba58b. | Reader | At the cut (this branch) | Today's entry (before) | |---|---|---| | Sequences | 500 of 500 | 0 of 500 | | Taxa | 499 of 500 known | 0 of 500 known |
frapercan
added a commit
that referenced
this pull request
Nov 24, 2026
The six photos were rebuilt at develop 798210f, which reads the GO release a GAF 2.1 header declares (#1296), and they were loaded into the clean store. Their data files are byte-identical to the earlier builds and every count is unchanged, so the figures and the member and row tables do not move. The manifest digests do, because each manifest records the revision that built it and, for 160, 177 and 194, the GO release its GAF declares.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
The photo build reads the GAF header with
^!([a-z][a-z-]*):, a lowercase-only key pattern. GOA's GAF 2.1 files capitalise their keys (!GO-version:,!Generated:). The 2.1 headers of cuts 160, 177 and 194 were therefore read as declaring no GO release, and their manifests recordgo_release_rule: cut_datewith a header of{"gaf-version": "2.1"}only.Read on 2026-11-23 from EBI's own files (byte-range read of each file's head), all three do declare one:
!GO-version: http://purl.obolibrary.org/obo/go/releases/2016-10-29/go.owl!GO-version: http://purl.obolibrary.org/obo/go/releases/2018-04-20/extensions/go-plus.owl!GO-version: http://purl.obolibrary.org/obo/go/releases/2019-11-09/extensions/go-plus.owlThe production node found the disagreement: its pairing note (
plans/GOA-ONTOLOGY-PAIRING.mdin agent-farm) quoted the 160 header, which the photo manifest did not show.The fix
Generatedfillsdate_generated, asdate-generateddoes in 2.2.go_release_ruledocstring no longer says a GAF 2.1 declares nothing.What it changes
cut_daterule could have picked a graph newer than the declared one. Thedeclaredrule exists to prevent that.Checks
test_cut_photo_build,test_cut_photo_formatsandtest_gaf_header_guard, 78 tests.