Skip to content

ci: fix react-doctor workflow failing on report schema v3 - #198

Merged
yoyo837 merged 1 commit into
mainfrom
fix/react-doctor-schema-v3
Dec 3, 2026
Merged

yoyo837 merged 1 commit into
mainfrom
fix/react-doctor-schema-v3

Conversation

@yoyo837

@yoyo837 yoyo837 commented Dec 3, 2026

Copy link
Copy Markdown
Member

Problem

The react-doctor workflow fails on every PR that touches React files:

##[error]Process completed with exit code 1.

The pinned action commit (0b4f4f4, 2026-06-20) bundles an older ensure-json-report.mjs whose validator only accepts report schemaVersion 1 and 2:

const KNOWN_SCHEMA_VERSIONS = new Set([1, 2]);

The CLI the action installs (react-doctor@0.9.23, the current latest) emits schemaVersion: 3. The validator rejects the report, replaces it with the fallback ok: false error report, and the scan step exits 1 — so a clean repo still fails the check.

The same script also only parses a report starting at byte 0, so npm banner output on stdout was fatal too.

Fix

Bump the pin to v2.4.0 (695e46e), the current action release. Its script accepts schema versions 1–3 and scans stdout for the report payload:

const KNOWN_SCHEMA_VERSIONS = new Set([1, 2, 3]);

The first release with schema-3 support was v2.2.7 (2026-07-10); v2.4.0 is the latest tag, so this pins the newest available action rather than the minimum viable one.

Verified locally by running the old and new ensure-json-report.mjs against a real schema-3 report from this repo:

  • old script → exit 1, report overwritten with the ok: false fallback
  • new script → exit 0, report kept intact (schemaVersion: 3, ok: true)

Note: dependabot PR #196 already bumps this same line to 01820bb4 (v2.2.8), which also contains the fix — this PR is the same fix delivered against current main without the other seven workflow bumps.

The pinned commit (0b4f4f4, 2026-06-20) ships an older action script whose
ensure-json-report.mjs validator only accepts report schemaVersion 1 and 2,
while react-doctor 0.9.23 emits schemaVersion 3. Every scan therefore gets
replaced by the fallback error report and the job fails with
'Process completed with exit code 1' even though the repo is clean.

v2.4.0 (695e46e) accepts schema versions 1-3, and also stops treating CLI
banner output on stdout as an unparseable report.
Copilot AI balanced review requested due to automatic review settings December 3, 2026 04:34
@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 471c3fc4-5450-4e1f-9caf-ccf960e3aa89
Commits

Reviewing files that changed from the base of the PR and between 00b9016 and 64164c5.

Files selected for processing: 1

  • .github/workflows/react-doctor.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the React Doctor v2.4.0 pin update.

No open issues 🎉

What changed in this PR

Updates the React Doctor action pin to v2.4.0 to address CI failures caused by schema-v3 reports and npm banner output.

Changes:

  • Bumps only React Doctor, independently of the broader dependency updates in PR #196.
  • Keeps the action pinned to a full commit SHA.
File Description
.github/​workflows/​react-doctor.yml Updates the React Doctor action pin to commit 695e46e (v2.4.0).

Review effort: Balanced

@yoyo837
yoyo837 merged commit 65846cb into main Dec 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants