Repository navigation
ci: cache per-project validation and defer full docs - #534
Conversation
|
Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict. [High risk] Adds validation caching to CI and changes documentation job scheduling. The PR should not merge until the workflow-condition test stops evaluating PR-controlled text as Python code. FindingsSummaryThe PR defers full documentation generation on ordinary pull requests and adds per-unit cached Lean validation while retaining static, style, and Challenge/Solution checks.
Reviews (1) · Last reviewed commit: "Reuse project validation and generate fu..." |
| return eval( | ||
| expression.replace("&&", " and ").replace("||", " or "), | ||
| {"__builtins__": {}}, | ||
| {}, | ||
| ) |
There was a problem hiding this comment.
PR-controlled condition reaches eval
A pull request that edits docs.yml triggers Python CI, where this test reads the PR's job condition and passes it to eval. Replacing four names and clearing __builtins__ does not make that expression safe: a crafted condition can execute code on the test runner before an assertion fails. Parse the limited condition syntax instead.
How this was verified: The test passes if: text from the checked-out docs.yml to eval, and edits to that workflow trigger the pytest job.
| """Cold and warm checks preserve complete axiom/backdoor coverage.""" | ||
| cache = ValidationCache(repository, repository / ".lake/validation-cache/v1") | ||
| with ( | ||
| patch("lean_pool.quality._audit_axioms", return_value=[]) as axioms, | ||
| patch("lean_pool.quality._run_option_audit", return_value=[]) as backdoors, | ||
| ): | ||
| assert _cached_pool_audits(repository, cache) == [] | ||
| assert [call.args[2] for call in axioms.call_args_list] == pool_units( | ||
| repository | ||
| ) |
There was a problem hiding this comment.
Replacement linter lacks integration coverage
These cache tests mock the axiom and backdoor audits but never run the new Lean declaration linter, which CI now uses instead of runLinter LeanPool. A regression in declaration selection or linter invocation could leave lint coverage missing while the Python tests stay green. Add a small compiled Lean fixture that exercises both a passing declaration and a rejected finding through the new command.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
mainor an explicit dispatch previewValidation
uv sync --locked --group dev --group testruff check .ruff format --check .pytest— 476 passedThis is an infrastructure-only change. The exact tested head is
efd08b6064b0b82908f18c559c6bc4936722cb6c.