Skip to content

Preserve Lean thread limits in sandboxed commands - #104

Open
muneikh wants to merge 1 commit into
leanprover:masterfrom
muneikh:fix-sandbox-lean-thread-limit
Open

muneikh wants to merge 1 commit into
leanprover:masterfrom
muneikh:fix-sandbox-lean-thread-limit

Conversation

@muneikh

@muneikh muneikh commented Oct 11, 2026

Copy link
Copy Markdown

Comparator currently drops a caller's LEAN_NUM_THREADS when starting both sandboxed Lake builds and lean4export. This makes configured concurrency limits ineffective inside those commands. Pass the existing value through both Landrun allowlists; when the variable is absent, Landrun continues to omit it.

FineEnvs/openai-math already patches these two allowlists to keep Lean builds within its sandbox's memory limit. This change removes the need for that downstream source patch.

The new regression test calls safeLakeBuild and safeExport with trusted command probes and a launcher that models Landrun's environment filtering. CI runs it with thread counts 1 and 3 and with the variable unset. Before the change, both configured cases fail in both command paths; afterward all six observations pass.

Validation: lake build comparator lean4export; the three regression scenarios; all 20 existing integration projects with the pinned exporter and real Nanoda binary. Local integration validation uses the documented macOS development Landrun shim. Neither that shim nor the new filtering test double validates Linux sandbox isolation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant