Repository navigation
Stop allocate-definitive-ids self-trigger loop - #2726
Merged
Merged
Conversation
Once the workflow actually ran (after the kgcl fix), it looped: `robot convert -f owl` re-serialises efo-edit.owl's anonymous rdf:Description blocks (obsolete-term replacement annotations) in a non-deterministic order, so every run rewrote the file even with no temporary IDs to mint. The resulting "Replace temporary IDs" commit touches efo-edit.owl, which matches the push path filter and re-triggers the workflow -> infinite loop (observed running ~11 times back-to-back on master). Guard the work on the presence of temporary EFO_099 IDs: skip MONDO prep, minting and the commit when none exist. A real allocation now triggers at most one trailing no-op run (temp IDs already gone -> skip -> no commit), which terminates the chain. Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
Problem
After #2725 fixed the workflow so it actually runs, it began looping — it ran ~11 times back-to-back on
master, each pushing aReplace temporary IDs by definitive IDs.commit.Root cause: the allocate step runs
robot ... kgcl:mint ... convert -f owl -o efo-edit.owl. ROBOT re-serialises the ~13 anonymous<rdf:Description>blocks inefo-edit.owl(obsolete-termIAO_0100001replacement annotations) in a non-deterministic order. So every run rewrites the file even when there are no temporary IDs to mint. That commit touchesefo-edit.owl, which matches the workflow'spaths:filter, so it immediately re-triggers the workflow → infinite loop. (normalize_srcis the same non-deterministicrobot convert, so it can't stabilise it either.)The temp ID allocation itself worked correctly —
systemic inflammationgotEFO_0920000— the bug is purely the self-perpetuating trigger.Fix
Guard the work on the presence of temporary
EFO_099IDs:Check for temporary IDsstep grepsefo-edit.owl.Prepare MONDO import,Allocate definitive IDs, andCommit and push changesrun onlyiftemp IDs are present.A genuine allocation now triggers at most one trailing no-op run (temp IDs already minted → grep finds none → all steps skipped → no commit), which terminates the chain. No-op runs are also cheap now — they skip the MONDO download entirely.
Notes
gh workflow enable "Allocate definitive EFO IDs").masterhas no temporary IDs, so the guarded workflow will be a no-op until a newEFO_099xxxxterm is added.