Repository navigation
At/lean with raw - #540
At/lean with raw#540adamtobey wants to merge 4 commits into
Conversation
| command | ||
| .args(args) | ||
| .env_clear() | ||
| .env("PATH", root.join("bin")) |
There was a problem hiding this comment.
Linux proof builds cannot start
Command::new("bwrap") searches the child’s PATH, but this function replaces it with only root/bin. CI installs Bubblewrap under /usr/bin, outside the Lean toolchain. Every isolated proof build therefore fails to start, blocking verification, native builds, and artifact reload.
Resolve Bubblewrap to an absolute path before clearing the environment.
Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/temper-lean/src/process.rs
Line: 155
Comment:
**Linux proof builds cannot start**
`Command::new("bwrap")` searches the child’s `PATH`, but this function replaces it with only `root/bin`. CI installs Bubblewrap under `/usr/bin`, outside the Lean toolchain. Every isolated proof build therefore fails to start, blocking verification, native builds, and artifact reload.
Resolve Bubblewrap to an absolute path before clearing the environment.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| let output = core | ||
| .invoke(tenant.as_str(), &request.input) |
There was a problem hiding this comment.
Lean requests stall other routes
The async HTTP handler calls core.invoke directly. That function waits on a blocking Mutex and runs native Lean code on the HTTP worker. With a slow reviewed component, concurrent requests can occupy every worker: one runs Lean while the others wait for its lock. Unrelated requests and timers then stop making progress until those calls finish.
Move the call and its lock wait to spawn_blocking, with a bound on queued work.
Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/temper-platform/src/lean.rs
Line: 96-97
Comment:
**Lean requests stall other routes**
The async HTTP handler calls `core.invoke` directly. That function waits on a blocking `Mutex` and runs native Lean code on the HTTP worker. With a slow reviewed component, concurrent requests can occupy every worker: one runs Lean while the others wait for its lock. Unrelated requests and timers then stop making progress until those calls finish.
Move the call and its lock wait to `spawn_blocking`, with a bound on queued work.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Fix Linux sandbox startup and move native calls off HTTP workers before merging.
Fix with agent prompt
Summary
Adds verified native Lean components and a proof-preserving optimization loop.
Review checks were static.
git diff --checkpassed; native execution was not verified.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD S[Specification and manifest] --> V[Check specification proofs] V --> C[Check candidate proofs] C --> N[Build native artifact] N --> B[Benchmark and select] B --> C B --> R[Review exact artifact] R --> L[Load reviewed core] L --> H[Authenticated tenant request] H --> A[Check Cedar permission] A --> I[Invoke native Lean]Reviews (1) · Last reviewed commit: "feat(lean): add typed buffer FFI and sus..." · Reviewed by Greptile