Repository navigation
Conversation
…porary-rules-to-decision-lint' into akhilpindiprolu/eng-8873-add-temporary-rules-to-decision-lint
This branch was successfully deployed
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.
Linear issue
Adds five decision-model lint rules as a temporary safety net while we build deterministic API checks in CI. All five are warn, so they show up in the lint comment but never fail the check. Each one should be removed once its deterministic check is enforced
Rules:
api suite
security suite
The api suite rules use threshold: 0.8, like the existing rules that had false positives. returnsNumericIdAsInteger keeps the default
Only reporting problems the PR adds
The linter shows the model only the lines a PR changed, never what they were before. So it couldn't tell new code from code that was already there. Touching a line next to an old integer ID got a comment, and the fix it suggested would break clients. The stricter input rule also couldn't see that
required=Falsebecamerequired=True.The api suite now also gets each file's git diff against the PR's base, with removed and added lines only, so unchanged code stays hidden as before. The workflow sets
DECISION_MODEL_LINT_BASE: HEAD^1for this; local runs get no diff unless you set it, ideally togit merge-base origin/master HEAD. The three design rules now answerINTRODUCED,PREEXISTING, orNONE, and onlyINTRODUCEDis reported, so existing problems never get a comment. The stricter input rule compares the removed and added lines, which also lets it catch default changes again.Tested in #129449 on six cases, with the old and new config. The old config made three mistakes: it flagged an existing integer ID on a reformatted line, flagged an integer ID in a file with none, and missed a field made required. The new config got all six right, for about 9% more input tokens.