Repository navigation
fix: run AF2's ModelCIF conversion without a shell and report it truthfully - #665
Merged
Merged
Conversation
…hfully AF2's post-processing built a shell command holding the output path, ran it with "python3" and took any stderr as failure. A path with spaces or shell metacharacters broke it (or ran parts of it as commands), python3 could be another interpreter than the one running AlphaPulldown, and the converter's ordinary logging was reported as an error while its real exit code was ignored. A private helper now runs the converter with sys.executable and an argument list, passes on its stdout and stderr as diagnostics, and reports a nonzero exit or a failure to start as a warning. Conversion stays best effort and in its own process, after which storage cleanup and fold completion run as before. The standalone converter is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Plan item 1 of 3: make AF2's ModelCIF subprocess reliable. ModelCIF stays best effort.
Problem
AF2 post-processing built a shell command containing the output path, ran it with
python3, and treated any stderr output as failure. As a result:python3could be a different interpreter from the one running AlphaPulldown;Change
A private helper,
_convert_to_modelcif, runs the converter as[sys.executable, <converter path>, "--ap_output", <dir>]without a shell.Tests
fold A+B; touch pwned $(touch pwned2) 'q' & \x``. It writes into exactly that directory, nothing else appears, and informational stderr does not count as failure.TESTfixture through the backend helper inside a directory full of shell metacharacters, and with the standalone script in a plain directory. Every.cifis byte-identical, and the zip archives have identical members; only their timestamps differ. Both images run this test.main, plus the new tests. AF2 image: 979 passed. AF3 image: 1050 passed.mainafter this round is merged.🤖 Generated with Claude Code