Support temporary IDs #3567
Open
Support temporary IDs #3567
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.
This PR implements the idea proposed in #3564 for allowing AI agents (or in fact any editor, AI or not) to use “temporary” term IDs that are later replaced by definitive IDs.
It allocates two new ID ranges:
Temporary IDs
range (UBERON:99NNNNN): any ID picked within that range is treated as a temporary ID, slated for later replacement by a definitive ID;Automation
range (UBERON:12NNNNN): this is a “normal” ID range (IDs picked within that range are not treated differently from any other ID), but is reserved for automated process – notably, for the process that replaces temporary IDs by definitive ones.It also adds a new GitHub Action workflow,
allocate-definitive-ids.yml
, which finds all temporary IDs (all IDs in theUBERON:99NNNNN
range) in the -edit file and replaces them by newly allocated IDs from theAutomation
range. That workflow can be used in two different ways, corresponding to the two options outlined at the end of the #3564 ticket:(A) Manual trigger: When a PR contains temporary IDs, a Uberon maintainer should manually trigger the
allocate-definitive-ids.yml
workflow on the PR’s underlying branch, just before merging the PR into the master branch. This will automatically add a commit to the PR, in which temporary IDs are replaced by definitive ones. The PR should then be merged as soon as possible once that commit has been added.(B) Automatic trigger: If a PR containing temporary IDs is merged into the master branch (with the temporary IDs still present), the
allocate-definitive-ids.yml
workflow will automatically be triggered and push a new commit to replace the temporary IDs by definitive ones, directly on the master branch. This can act as a “fall-back” action to ensure that temporary IDs are never left in the master branch, in case a Uberon maintainer forgets to manually trigger the ID replacement workflow on a PR.