Repository navigation
fix: pin the simulator library list instead of fetching it per request - #182
Merged
Merged
Conversation
run_simulation fetched registry.json from the dev branch of biosimulations/registry on every request, so the simulator identity (the md5 of the generated definition) depended on a network call and on whatever that branch held at the time. Copy the file at f8b0132 into compose_api/simulation/ and parse it locally. The identity is unchanged (c7e984d3), and it now changes only in a reviewed commit here. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 6, 2026
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.
Part of the open follow-up on publishing simulator images, and a first small step toward strategy decision 2 (identity is an image digest).
The problem
handlers.run_simulationbuilt each run's container definition from pbest's_default_registry_deps(). That function does anhttpx.geton every request, fetchingregistry.jsonfrom thedevbranch ofbiosimulations/registry. The md5 of the resulting definition is theSimulatorVersionidentity, and it is also the tag the service looks for inghcr.io/biosimulations/registry_env. Three consequences:The change
compose_api/simulation/simulator_registry.jsonis a copy of that file atf8b0132, the last commit to touch it (2026-04-30). The contents are identical; pre-commit's JSON formatter changed only the whitespace.compose_api/simulation/simulator_registry.pyparses it exactly as pbest parses the fetched copy. It records the source commit and how to take an upstream change.registry_dependencies()in place of_default_registry_deps().CLAUDE.mdnotes that editing this file changes the simulator identity.The identity is unchanged:
c7e984d31f441805315590a4c53e7f9fboth before and after, checked by generating the definition both ways. No rebuild is triggered.Tests
tests/simulation/test_simulator_registry.py:httpx.getraise, and checks the definition and its hash are still produced and stable.tests/simulation/test_simulation.pypasses against the new source.make checkis clean.What this does not do
registry_envstill holds only7a327410…(2026-05-01); the current identity isc7e984d3…. Publishing it is now worthwhile, because the tag will stay stable until someone changes it here on purpose.🤖 Generated with Claude Code