Repository navigation
Conversation
…t-injection-ci # Conflicts: # tests/test_repl_core_protocol.py
…ion' into codex/pr107-restack-20261005
…e' into codex/pr106-header-fix-20261005
…ion' into codex/pr107-restack-20261005
…e' into codex/pr106-header-fix-20261005
…ion' into codex/pr107-restack-20261005
|
Exact-head adversarial review is complete at |
…n' into split/repl-fault-injection-ci
|
Swarm pass on the REPL lifecycle base of the #105 → #106 → #107 stack. What changed and why
Diff vs main: +1,175/-81 → +648/-86 (9 files). Checks: exact-head CI on Remaining risks
Posted by PR swarm: Swarm · REPL #105-107 |
|
The landing stack is now folded atomically at |
|
Independent review of the folded stack at Verdict: fix first.
Removing quarantine in Lifecycle1.
2.
3.
4.
Header validation (from #106)5.
6.
7.
8.
9.
Real-REPL coverage (from #107)10.
11.
Golf (about 55 lines)
Disputed, worth a human look
On
|
|
Final combined gate at |
|
Correcting the live status at unchanged head |
|
Published the non-force integration at exact head |
Problem
Public REPL calls used resident processes, so process-owned environment and proof-state handles could outlive a response. The first disposable implementation then introduced three new hazards: synchronous cleanup could trap request threads, 100 ms queue polling broke FIFO admission, and Lean 4.30–4.32’s fast import parser could hide an import behind a block-comment edge case.
Architecture
lake exe @repl/replchild and submits exactly one combined frame containing generated imports plus user source.lean --deps-jsonon the original source with a context-free normalization of suspect close spellings. Reject only when the toolchain reports different header facts; strings, line comments, and body comments remain valid.timeoutis one explicit total post-admission budget—default and maximum 240 seconds—for idle-slot wait, header validation, disposable startup, generated imports, and submitted code. Retained cleanup may continue after the response budget.The import allowlist is a deterministic policy check, not a sandbox: submitted Lean can still perform effects available through allowed imports.
Setup and configuration
lake update repl, committing the manifest, beforelake build @repl/repl.lakefromLEAN_REPL_CMDis reused for header validation. Container or other wrappers must set the matchingLEAN_REPL_HEADER_CMDexplicitly.warmstatus means the project’s cold wrapper pool is cached; no REPL subprocess remains resident.Scope and validation
Against #111, the diff is 23 files, +2,019/−139, predominantly adversarial protocol, lifecycle, and pinned real-REPL coverage.
At exact head
8bfdf44d:git diff --check, andmake check-example: pass;Real regressions prove warmup-prefix use, distinct child PIDs, source-line correction, parser timeout/output caps and descendant reaping, FIFO service, shutdown ordering, dirty-generation fencing, and the escaped-module traversal control.