fix(lint-surface): блокувати in-file collateral у fix-ladder - #208
Merged
Conversation
Cross-file collateral-veto не бачив колатеральних правок ВСЕРЕДИНІ вже- таргетованого файлу поза ділянкою самого порушення — LLM-rung міг виправити violation і заодно тихцем видалити сусідній задокументований воркараунд у тому ж файлі (реальний кейс: видалення Bun SQL workaround-у в upsert-order.js, що зламало проєктний тест, але пройшло canonical re-detect). findInFileCollateralEdits() рахує грубий (common-prefix/common-suffix) змінений рядковий діапазон між pre-image і поточним вмістом файлу й звіряє його з вікном навколо кожної violation.data.line — fail-open, якщо рядок порушення невідомий. Той самий rollback/feedback/телеметрія шлях, що й у наявного cross-file veto. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- npm/scripts/lib/lint-surface/tests/run-fix.test.mjs: неправильний відносний шлях у JSDoc-типі (`../../types.mjs` → `../types.mjs`) — knip unresolved import. - npm/rules/doc-files/docgen-gen/main.mjs: дедуплікувати pre-send guard + факт-лист (jscpd 30-рядковий клон між generateDoc і prepareBatchItem) у спільний loadSrcAndFacts(); поведінка ідентична (68/68 тестів модуля зелені). - .cspell.json: додати "післястартовий" (helyx typo-report на acp/docs/session.md, вже existed on main до цього PR). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…eless-assignment Мердж трьох veto-механізмів (cross-file collateral, in-file hunk-level, test-gate) у runRung підняв cognitive complexity до 47 (allowed 20, eslint sonarjs/cognitive-complexity). Виносить обчислення collateral (cross-file + in-file hunk), test-gate-виклик і побудову errorSuffix/silentFailureNote у окремі чисті функції (computeCollateral, detectBrokenTest, describeVetoOutcome) — поведінка та телеметрія незмінні (34/34 тестів run-fix.test.mjs зелені). Заразом прибрано no-useless-assignment: `let current = null` перед try, що завжди перезаписує current до першого читання. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…fix.mjs oxlint jsdoc(require-param-description)/jsdoc(require-returns-description) — @param/@returns без описового тексту у computeCollateral/detectBrokenTest/ describeVetoOutcome (типи-only, без прози). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Що змінено
Перевірено
bun test npm/scripts/lib/lint-surface/tests/run-fix.test.mjsnpx @7n/rules lint changelog