Skip to content

Add bounded Lean project inspection - #14

Open
Deicyde wants to merge 1 commit into
facebookresearch:mainfrom
VivienCabannes:split/05-project-inspection
Open

Deicyde wants to merge 1 commit into
facebookresearch:mainfrom
VivienCabannes:split/05-project-inspection

Conversation

@Deicyde

@Deicyde Deicyde commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Part of the reviewed split of #8. This PR is independent of #13.

What this adds

  • autoform project inspect for bounded, read-only inspection of Lean, Lake, Mathlib, Git, and Autoform project metadata.
  • Stable human and JSON reports without invoking Git, Lake, Lean, or the network.
  • autoform project versions backed by a packaged catalog containing the tested Lean 4.32.2 and Mathlib v4.32.2 pair.
  • Strict TOML, path, symlink, encoding, and catalog validation with Python 3.10 support.

Scope-only package registry entries remain indeterminate because offline metadata cannot prove an exact Git source.

Validation

  • make lint
  • make test: 627 passed, 1 skipped
  • make check-example
  • Focused project tests on Python 3.10 and 3.13
  • Installed wheel and sdist contents checked
  • Independent adversarial review: SHIP

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 18, 2026

@Deicyde Deicyde left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review result: changes needed.

  • project/inspect.py:494-503 probes lowercase blueprint without requiring exact directory-entry spelling. On default macOS filesystems, formal-math's tracked Blueprint/ Lean library is falsely reported as an Autoform vault; Linux reports differently.
  • project/inspect.py:257-266 rejects projects containing both Lake configuration formats, although Lake 4.32.2 validly selects lakefile.lean. Treat the unused file as an advisory diagnostic or document the stricter policy.
  • project/inspect.py:819-825 permits C1 controls such as U+009B and prints them raw in human output. Apply the catalog's Unicode control/surrogate rejection consistently.

All three cases were reproduced; the focused inspection suite still passes.

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

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant