Repository navigation
fix: reject a local MMseqs2 database rebuilt under the same identifier - #69
Merged
Merged
Conversation
The MSA cache key records each database's identifier, not its content, and completed shards are never re-validated, so a database rebuilt or re-copied in place kept serving MSAs from the old build while new proteins were searched against the new one. Every parse now compares each configured .index size against a witness stored once, atomically, in the MSA cache, and fails with instructions to assign a new identifier when it differs. This runs even when the whole DAG is complete. Caches from before the witness are adopted only after every completed bundle's recorded provenance matches today's indexes. Indexes must now be readable on the submit host as well as the workers. Closes #56. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The submit-host requirement is stated in config/config.yaml and in the parse-time error, which names it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 MSA cache key records each database's
identifier, not its content, and a completed shard is never re-validated against the databases. So a database rebuilt or re-copied in place under the same identifier kept serving MSAs from the old build, while proteins added later were searched against the new one. AlphaPulldown's ownindex_sizecheck never ran, because no search job is scheduled on a cache hit.This implements option 1 from the issue, adding a durable witness so that the check also covers a complete DAG.
Changes
validate_database_provenance()inrules/mmseqs2_gpu.smkruns at parse time whenever local MMseqs2 has proteins to search:{path}.indexsize. An unreadable index fails with a message saying indexes must be visible on the submit host and on the workers.{msa_cache}/.database_provenance.jsonrecords an identifier and index size per database. It is published atomically withos.link, so a racing parse checks the winner's witness instead of overwriting it.uniref90 (index size 6 -> 12)and "Assign a new identifier to the rebuilt database and rerun."config/config.yamlstates the new requirement and the witness's limits; the README is unchanged.Testing
uniref90.indexand runs again.create_mmseqs2_gpu_msa_shardandfinalize_mmseqs2_featuresagain.Compatibility
.indexfiles at the configured paths. Node-local staging still works if those paths also resolve on the submit host to the same build..indexthe same size, or changes data without changing the index, is not detected. Identifiers still have to change on a rebuild; this check makes the common case fail loudly instead of silently.Closes #56.
🤖 Generated with Claude Code