feat: reject deprecated APIs in submissions, report them in upgrades - #239
Merged
Merged
Conversation
A deprecation is a warning under the pinned Mathlib and an error after a later one, so each admitted use is a future break in the upgrade audit; #224 had to fix thirteen by hand, two of them in a module merged an hour earlier. The receiver now rejects, as DEPRECATED_API, any deprecation warning Lean reports about the submission's own files after a successful build, quoting Lean's message, which names the replacement. Deprecations in other modules are not the submitter's to fix under the add-only rule and are ignored; style lints are not affected. CONTRACT.md documents the rule and the code. The Mathlib upgrade audit lists the corpus's deprecations under the new release in its report (corpus_deprecations, sorted so the byte-for-byte re-audit stays deterministic) without blocking the upgrade: that list is the follow-up maintenance work. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
qazW12345
pushed a commit
to qazW12345/LeanFrontier
that referenced
this pull request
Sep 22, 2026
Three arm-tagged submissions exist, so this is a dated deviation record, not an amendment. It lists carlok#193, carlok#201, carlok#216 and carlok#239, notes that the add-only rule creates import edges by construction and so interacts with the primary metric, and commits the analysis to splitting the metric at 22 September 2026. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 22, 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.
A deprecation is a warning under the pinned Mathlib and becomes an error after a later one, so every admitted use is a future break in the upgrade audit. #224 had to fix 13 by hand, and 2 of them were in a module merged an hour earlier.
Receiver:
DEPRECATED_APIAfter a successful
lake build, the receiver rejects any deprecation warning Lean reports about the submission's own files, quoting Lean's message, which names the replacement. For example:unused simp argument,<;>and so on) aren't affected.CONTRACT.md§4 states the rule, and the code joins the stable list.Upgrade audit:
corpus_deprecationsA new Mathlib release can deprecate things the existing corpus uses. The upgrade audit now lists those deprecations in its report without blocking the upgrade. The list is the follow-up
maintenance/work. It's sorted, because Lake's parallel build order isn't deterministic and the re-audit intest.ymlcompares the report byte for byte.State of
mainmainhas 0 deprecation warnings. #224 left the corpus at 0 on a full build of exactly what it merged, and no Lean source has landed since.Tests
CONTRACT.md, and pin that the upgrade audit reports deprecations without blocking.The new tests failed before the change. The full suite passes: 140 tests, 6 skipped.
🤖 Generated with Claude Code