Skip to content

odinfree/storm-ecdsa-harness / skills/fast-lean-proof-loop

fast-lean-proof-loop

Verified

Shorten Lean 4 proof iteration with a warm editor session, dependency-aware reverse-import build plans, and lemma lookup that Lean itself confirms, while a separate full build plus axiom audit stays the promotion gate.

FileKindSize
SKILL.mdskill md3.5 KB
agents/openai.yamlconfig324 B
references/promotion-gate.mdmarkdown1.1 KB
scripts/lean_fast_loop.pyexecutablescript10.3 KB
scripts/lean_symbol_check.pyexecutablescript6.3 KB
scripts/test_lean_fast_loop.pyexecutablescript3.8 KB
scripts/test_lean_symbol_check.pyexecutablescript2.6 KB

scripts/test_lean_symbol_check.py

View on GitHub
#!/usr/bin/env python3

from __future__ import annotations

import json
import pathlib
import stat
import subprocess
import tempfile
import unittest


SCRIPT = pathlib.Path(__file__).with_name("lean_symbol_check.py")


class LeanSymbolCheckTests(unittest.TestCase):
    def setUp(self) -> None:
        self.temp = tempfile.TemporaryDirectory()
        self.root = pathlib.Path(self.temp.name)
        source = self.root / "Demo"
        source.mkdir()
        (source / "Target.lean").write_text("def ExactName := 1\n")

    def tearDown(self) -> None:
        self.temp.cleanup()

    def fake_lake(self, body: str) -> pathlib.Path:
        path = self.root / "fake-lake"
        path.write_text("#!/usr/bin/env python3\n" + body)
        path.chmod(path.stat().st_mode | stat.S_IXUSR)
        return path

    def command(self, lake: pathlib.Path, output: pathlib.Path, timeout: int) -> subprocess.CompletedProcess[str]:
        return subprocess.run(
            [
                "python3", str(SCRIPT), "--project-root", str(self.root),
                "--source-root", "Demo", "--query", "ExactName",
                "--import", "Demo.Target", "--name", "Demo.ExactName",
                "--lake", str(lake), "--timeout-seconds", str(timeout),
                "--output", str(output),
            ],
            check=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
        )

    def test_verified_batch_is_recorded(self) -> None:
        lake = self.fake_lake(
            "import sys\n"
            "if '--version' in sys.argv:\n"
            "    print('Lean test')\n"
            "else:\n"
            "    text=sys.stdin.read()\n"
            "    assert '#check Demo.ExactName' in text\n"
            "    print('Demo.ExactName : Nat')\n"
        )
        output = self.root / "pass.json"
        proc = self.command(lake, output, 3)
        self.assertEqual(proc.returncode, 0, proc.stderr)
        receipt = json.loads(output.read_text())
        self.assertEqual(receipt["verification"], "PASS")
        self.assertEqual(receipt["verified_names"], ["Demo.ExactName"])

    def test_timeout_kills_process_group_and_writes_receipt(self) -> None:
        lake = self.fake_lake("import time\ntime.sleep(30)\n")
        output = self.root / "timeout.json"
        proc = self.command(lake, output, 1)
        self.assertEqual(proc.returncode, 124, proc.stderr)
        receipt = json.loads(output.read_text())
        self.assertEqual(receipt["verification"], "TIMEOUT")
        self.assertEqual(receipt["returncode"], 124)
        self.assertEqual(receipt["verified_names"], [])


if __name__ == "__main__":
    unittest.main()
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall