feat: baseline mode + touched-line enforcement#288
Closed
aidenybai wants to merge 1 commit into
Closed
Conversation
|
🔴 No new issues 0/100 (unchanged) Reviewed by react-review for commit dd93a69. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3fdd119 to
9287d69
Compare
d702581 to
53c60c5
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Third and final PR of the #286 split. Stacked on cursor/baseline-and-touched-lines-675b (#288). - New `--pr-comment-output <path>` CLI flag writes a sticky-PR-comment- ready markdown document to a side file. Compose with --pr-comment so one scan produces both the build-log plaintext (stdout) and the structured markdown (file) without re-invoking the scanner. - buildPrCommentMarkdown: `<!-- react-doctor -->` marker, per-rule `<details>` groups with severity icons + file:line refs + suppression snippets, per-package summary block for monorepos (worst-scored project drives the headline), baseline-aware framing ("no new violations introduced by this PR"), touched-lines footnote when filtering removed diagnostics. - action.yml: single-scan dual-output integration. The github-script step now prefers the markdown file when available and falls back to the legacy plaintext-in-fence layout when running against older react-doctor versions. - 6 new tests in build-pr-comment-markdown plus updated github-action contract tests for the single-scan + PIPESTATUS preservation. 1223 tests passing. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
9287d69 to
a6a1db3
Compare
53c60c5 to
4db24e7
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Third and final PR of the #286 split. Stacked on cursor/baseline-and-touched-lines-675b (#288). - New `--pr-comment-output <path>` CLI flag writes a sticky-PR-comment- ready markdown document to a side file. Compose with --pr-comment so one scan produces both the build-log plaintext (stdout) and the structured markdown (file) without re-invoking the scanner. - buildPrCommentMarkdown: `<!-- react-doctor -->` marker, per-rule `<details>` groups with severity icons + file:line refs + suppression snippets, per-package summary block for monorepos (worst-scored project drives the headline), baseline-aware framing ("no new violations introduced by this PR"), touched-lines footnote when filtering removed diagnostics. - action.yml: single-scan dual-output integration. The github-script step now prefers the markdown file when available and falls back to the legacy plaintext-in-fence layout when running against older react-doctor versions. - 6 new tests in build-pr-comment-markdown plus updated github-action contract tests for the single-scan + PIPESTATUS preservation. 1223 tests passing. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
a6a1db3 to
7abb104
Compare
4db24e7 to
a9c3e64
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Third and final PR of the #286 split. Stacked on cursor/baseline-and-touched-lines-675b (#288). - New `--pr-comment-output <path>` CLI flag writes a sticky-PR-comment- ready markdown document to a side file. Compose with --pr-comment so one scan produces both the build-log plaintext (stdout) and the structured markdown (file) without re-invoking the scanner. - buildPrCommentMarkdown: `<!-- react-doctor -->` marker, per-rule `<details>` groups with severity icons + file:line refs + suppression snippets, per-package summary block for monorepos (worst-scored project drives the headline), baseline-aware framing ("no new violations introduced by this PR"), touched-lines footnote when filtering removed diagnostics. - action.yml: single-scan dual-output integration. The github-script step now prefers the markdown file when available and falls back to the legacy plaintext-in-fence layout when running against older react-doctor versions. - 6 new tests in build-pr-comment-markdown plus updated github-action contract tests for the single-scan + PIPESTATUS preservation. 1223 tests passing. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a9c3e64. Configure here.
7abb104 to
e42aee0
Compare
a9c3e64 to
62eba8e
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Third and final PR of the #286 split. Stacked on cursor/baseline-and-touched-lines-675b (#288). - New `--pr-comment-output <path>` CLI flag writes a sticky-PR-comment- ready markdown document to a side file. Compose with --pr-comment so one scan produces both the build-log plaintext (stdout) and the structured markdown (file) without re-invoking the scanner. - buildPrCommentMarkdown: `<!-- react-doctor -->` marker, per-rule `<details>` groups with severity icons + file:line refs + suppression snippets, per-package summary block for monorepos (worst-scored project drives the headline), baseline-aware framing ("no new violations introduced by this PR"), touched-lines footnote when filtering removed diagnostics. - action.yml: single-scan dual-output integration. The github-script step now prefers the markdown file when available and falls back to the legacy plaintext-in-fence layout when running against older react-doctor versions. - 6 new tests in build-pr-comment-markdown plus updated github-action contract tests for the single-scan + PIPESTATUS preservation. 1223 tests passing. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
e42aee0 to
ebb1c04
Compare
Second of a three-PR split of #286. Stacked on cursor/config-foundation-675b (PR #287). Both features are scan-time filters that combine with diff mode, both extend InspectResult / JsonReport, both touch action.yml inputs. - Baseline mode: --baseline [path] / --update-baseline. Stable per-diagnostic fingerprint (plugin + rule + filepath + message; line / column intentionally excluded so unrelated edits don't break the baseline). Baseline counts surface in InspectResult.baselineDiagnostics, JsonReport.summary.baselineDiagnosticCount, and the PR comment header ("9 baseline issues, no new violations"). - Touched-line enforcement: --touched-lines. In diff or staged mode, restricts diagnostics to lines actually touched by the active diff (git diff --unified=0). DiffInfo.diffBaseRef + a HEAD baseRef for current-changes mode so staged-only edits aren't silently dropped. Hidden-by-touched-lines counts surface in the JSON report. - action.yml: baseline + touched-lines inputs alongside the existing annotations input. - 25 new tests across baseline + get-touched-lines suites. 1217 tests passing; lint / typecheck / format clean. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
62eba8e to
dd93a69
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Third and final PR of the #286 split. Stacked on cursor/baseline-and-touched-lines-675b (#288). - New `--pr-comment-output <path>` CLI flag writes a sticky-PR-comment- ready markdown document to a side file. Compose with --pr-comment so one scan produces both the build-log plaintext (stdout) and the structured markdown (file) without re-invoking the scanner. - buildPrCommentMarkdown: `<!-- react-doctor -->` marker, per-rule `<details>` groups with severity icons + file:line refs + suppression snippets, per-package summary block for monorepos (worst-scored project drives the headline), baseline-aware framing ("no new violations introduced by this PR"), touched-lines footnote when filtering removed diagnostics. - action.yml: single-scan dual-output integration. The github-script step now prefers the markdown file when available and falls back to the legacy plaintext-in-fence layout when running against older react-doctor versions. - 6 new tests in build-pr-comment-markdown plus updated github-action contract tests for the single-scan + PIPESTATUS preservation. 1223 tests passing. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.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.

Second of a three-PR split of #286. Stacked on #287 (
cursor/config-foundation-675b) — review and merge that one first.Both features in this PR are scan-time filters that combine with diff mode. They share enough infrastructure (
InspectResult/JsonReportextensions,inspect.ts,action.ymlinputs, thevalidate-config-typesschema additions) that splitting them further would create awkward dependencies.Baseline mode —
--baseline/--update-baselineInspectResult.baselineDiagnostics,JsonReport.summary.baselineDiagnosticCount, and PR comment framing ("9 baseline issues — no new violations introduced by this PR").DEFAULT_BASELINE_FILENAME(regression test included).Touched-line enforcement —
--touched-linesgit diff --unified=0to filter diagnostics by line.DiffInfo.diffBaseRefexposes the right git ref for each diff shape; current-changes mode usesHEAD(notnull) so staged-only changes aren't silently dropped by the touched-lines filter.JsonReportProjectEntry.diagnosticsHiddenByTouchedLines."-- "(e.g. SQL comments) —FILE_HEADER_RESET_PATTERNonly resets on real--- a/<path>or--- /dev/nullheaders.action.ymlAdds the
baselineandtouched-linesinputs alongside main'sannotationsinput. Preserves the existingPIPESTATUS/set +eexit-code preservation around the scan pipeline.Stats
get-touched-linessuites, plus the build-json-report summary contract.What's NOT in this PR
Originally landed as part of #286.