Stop the lint pipeline from reporting issues it re-creates itself - #5788
Draft
jurgenwerk wants to merge 1 commit into
Draft
Stop the lint pipeline from reporting issues it re-creates itself#5788jurgenwerk wants to merge 1 commit into
jurgenwerk wants to merge 1 commit into
Conversation
The realm lint pipeline runs prettier before template-lint. Prettier wraps text nodes longer than its print width across indented lines, and the no-whitespace-for-layout rule flags exactly that wrap with no autofix — so for any over-width text node the pipeline reported an error no edit could clear, and the AI assistant looped forever re-patching whitespace that the formatter reverted on every save. The template linter now runs with that rule disabled; the wrapped whitespace collapses at render, so nothing is lost by not flagging it. As a generic backstop, PatchCodeTool now detects when the lint/format pass reverts an applied patch back to the original file content. It skips the no-op save and reports alongside the lint issues that reformatting-only patches cannot make progress, so the model stops retrying. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
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.
The AI assistant could loop forever on a correctness check it could never satisfy. The realm lint pipeline runs prettier before template-lint, and the two disagree by construction for any text node longer than prettier's 80-column print width:
Every "fix" patch applied, was rewrapped to byte-identical content, and produced the same two lint messages — reproduced end to end against a real looping session's file.
Two changes:
no-whitespace-for-layoutdisabled. Prettier's wrapping is canonical in this pipeline and the whitespace collapses at render, so the rule only ever contradicted the formatter. (Host source already silences this rule inline where it conflicts.)PatchCodeTooldetects when the lint/format pass reverts an applied patch back to the original content: it skips the no-op save and adds a lint issue saying reformatting-only patches cannot make progress, so the model stops retrying instead of looping.A lint-endpoint test covers the wrapped-long-text case; other template-lint rules from the
extendschain still fire (verified against the pipeline directly).