Insert '--' terminator before the sandboxed command in buildLandrunArgs - #60
Merged
Merged
Conversation
landrun's CLI parser continues flag-scanning past positionals and consumes the first bare '--' in the command tail. safeExport passes exactly such a '--' to lean4export as the module/declaration separator, so lean4export receives the declaration names as module names and fails with 'unknown module prefix'. Adding the explicit flag terminator before the command protects every sandboxed invocation's arguments.
Member
|
Can you provide a test that did not pass before but passes now? The bug in the generality you are describing it would just cause everything to currently be broken would it not? |
Member
|
Oh, it seems this is a new landrun development that we should catch in this way, great! |
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.
landrun's CLI parser continues flag-scanning past positionals and consumes the first bare
--in the command tail.safeExportpasses exactly such a--to lean4export as the module/declaration separator (#[module.toString, "--"]), so lean4export receives the declaration names as module names and fails with:(lean4export v4.31.0 supports the
--separator viaargs.span (· != "--")— the separator simply never reaches it.)One-line fix: add the explicit flag terminator before the command in
buildLandrunArgs, which also hardens the other sandboxed invocations (lake build, nanoda) against any future--in their argument lists.Verified end-to-end on a real project (4-theorem config): with this patch the export, statement comparison, and axiom check all complete; without it the run dies at export.
🤖 Generated with Claude Code