Repository navigation
Report unused statement dependencies, and count paths from every owning article - #150
Merged
Merged
Conversation
The impact probe follows names, so a Markdown statement dependent whose Lean inlines the revised definition's body instead of naming it was not impacted, and the revision left it fully proved under the old meaning. The report now lists unused_statement_dependencies: the stated articles that reach the revised article through Markdown statement edges, transitively, but are not statement-impacted. They join claim_targets and keep the revision from being contained, and the text report prints them on one line. The README describes the field and what contained now requires. How the revision contract treats such an article belongs with the contract, in the open-statements layer. Restored from closed #115 (d9f9e94) and adapted to this layer's plural helper owners and Lean source and build revision lines.
A mathlib: true article counts as stated, so one whose Markdown statement depends on the revised article was reported in unused_statement_dependencies and claimed, although its statement is a Mathlib declaration that cannot use the revised one and the loader refuses to retract it. Restored from closed #115's review follow-ups (3bc24df).
work impact checked Markdown paths only against the selected article. With --declaration X where another article T names X, or owns it when no article does, a stated article whose Markdown statement rests on T was neither reported in unused_statement_dependencies nor claimed, although inlining X changes its statement, while T and the articles depending on T were reported as missing a dependency path. Both checks now start from the revised article and every article naming a revised declaration or, when none names it, owning it; an unowned declaration adds no article.
Deicyde
marked this pull request as ready for review
October 6, 2026 01:20
Contributor
Author
|
Exact-head review is complete at |
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #147. This is #147 rebased onto 8f4f5c8, the final head of
split/revision-impact, after #136 was rebuilt (9c2b43a). #136 merged into main while this was being tested, so it targets main; it merges cleanly with main's #149 docs changes.autoform-impact/v1is now on main withoutunused_statement_dependencies. This adds the key to v1 instead of bumping the schema, because no release ships v1 yet (the only release, v0, predates the impact layer).The rebuilt layer's 901f5f8 already claims a revised declaration that no article names under every owner's target, or under its own
lean/<slug>-<digest>key when it has no owner. That is what #147's 8940cc8 did, so this PR drops 8940cc8 and keeps 901f5f8's_claim_targets_for; the README sentence for that case follows 901f5f8's wording. The other three commits carry over unchanged apart from the rebase.unused_statement_dependencies: the stated articles whose Markdown statement rests on the revision through statement edges, but which are not statement-impacted. They joinclaim_targetsand rule outcontained. The probe follows names, so it misses a dependent whose Lean inlines a revised definition's body.mathlib: truearticles out of that list. Their statement is a Mathlib declaration, and the loader refuses to retract them.Before e1301c6,
--declaration Xchecked paths only from the selected article, which had two failures when X was named by another article T:The fff95bd port keeps this layer's plural helper owners, its exact source inventory, and its Markdown, Lean-source and build revision lines. The exact-format test now pins those revision lines (review item 4).
The revision-contract text that says how to handle an unused statement dependency belongs with the contract in the open-statements layer. It goes in the companion PR into
split/open-statements.Tests (on e1301c6)
ruff checkis clean.tests/test_impact.pygave 72 passed, 1 skipped.tests/test_claims.pyandtests/test_work.pygave 117 passed.AUTOFORM_REQUIRE_REAL_LEAN_TESTS=1),tests/test_impact.pygave 73 passed.test_markdown_paths_count_from_every_article_a_revised_declaration_belongs_to.