Commit Graph

61 Commits

Author SHA1 Message Date
Aiden Bai 6a8d514ec5 ci(native): build packages on source-patch branch pushes 2026-09-10 01:53:38 -07:00
Aiden Bai 070e6b0082 fix(native): allow Intel macOS builds to finish 2026-09-05 03:07:17 -07:00
Aiden Bai f08f1e9f2e fix(native): target glibc 2.28 for Linux packages 2026-09-05 02:04:39 -07:00
Aiden Bai 7491725eda fix(native): disable unused smoke cache 2026-09-02 23:21:30 -07:00
Aiden Bai e1ac677b9d ci(native): allow Intel build to finish 2026-09-02 22:28:30 -07:00
Aiden Bai 6e6945b875 feat(native): package react-doctor-rust 2026-09-02 18:15:59 -07:00
Aiden Bai 0ce8d9b500 fix(native): sync rule fixes from main 2026-09-02 01:29:54 -07:00
Aiden Bai 9f7d26fc04 Revert "fix(ci): pin publish actions to immutable commits (#1720)" (#1721)
This reverts commit cad6b5f4e2.
2026-08-29 23:12:48 -07:00
Aiden Bai cad6b5f4e2 fix(ci): pin publish actions to immutable commits (#1720) 2026-08-29 23:10:30 -07:00
Skosh 72a4f4684c fix(ci): prevent pull request cache writes (#1688)
* fix(ci): harden workflows against cache poisoning and document unsigned tags

- Restrict TURBO_TOKEN/TURBO_TEAM to main-branch pushes only across
  ci.yml, code-quality.yml, and react-doctor.yml. First-party PR branches
  no longer have cache write access (preventing cache poisoning attacks).
  PRs run with a cold cache.

- Add SECURITY comments in action-version-bump.yml explaining that tags
  are unsigned and recommending SHA pinning for hardened CI.

- Update install-github-workflow.ts template to include security note
  about @v2 floating major tag and SHA pinning recommendation.

Closes #1685

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix(ci): make pull request cache read-only

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-29 22:53:52 -07:00
Aiden Bai ecba44a29f fix(native): install rustfmt for registry generation 2026-08-21 12:21:02 +00:00
Aiden Bai 1e12d5ff2c feat: add source-patched native Oxlint path 2026-08-21 06:38:59 +00:00
Aiden Bai 8c2f03aea9 feat: make React cleanup first-class (#1624)
* feat: make React cleanup first-class

* refactor: remove editor integrations

* fix: harden React cleanup analysis

* fix: detect default export duplication roots

* fix: unwrap typed duplication roots

* feat: add opt-in project analysis rules

* fix: canonicalize project analysis paths

* fix: harden project analysis precision

* fix: recognize cross-platform project entries

* fix: eliminate project analysis false positives

* fix: harden project analysis reachability

* fix: canonicalize project analysis inputs

* fix: resolve project analysis review findings

* fix: eliminate residual project analysis false positives

* fix: ignore commented registry previews

* fix: eliminate project analysis false positives

* fix: normalize project analysis paths across platforms

* fix: normalize Nextra theme path identity

* test: canonicalize convention fixture paths

* fix: preserve project analysis provenance

* fix: harden project analysis precision

* fix: honor project analysis boundaries

* fix: recognize conditional config plugins

* fix: recognize executable project references

* fix: recognize Stencil tool contracts

* fix: recognize nested tool references

* fix: recognize project setup contracts

* fix: recognize generated and local package consumers

* fix: recognize static template package references

* fix: recognize nested package runtime contracts

* fix: close project analysis parser gaps

* fix: parse project conventions structurally

* refactor: replace structural scanners with parsers

* fix: recognize functional Next CSS config

* fix: close remaining project analysis gaps

* fix: apply tag filters to project analysis

* fix: preserve embedded source positions

* fix: validate static config helper bindings

* fix: bound runtime directory discovery

* fix: close final dependency analysis gaps

* fix: preserve declaration dependency references

* chore: refresh generated rule metadata

* fix: make project analysis portable and bounded

* test: stabilize cleanup scaling guard

* refactor: parse project syntax with oxc

* fix: normalize native filesystem paths

* fix: separate path identity from report paths

* fix: match project files by filesystem identity

* fix: match build glob files by package identity

* fix: use native path keys for file identity

* fix: canonicalize Windows file identities

* fix: canonicalize package ownership paths

* test: inspect Windows path identities

* test: trace Windows package ownership

* fix: keep Windows path identities consistent

* fix: classify test contracts by normalized path

* fix: scope test contracts by canonical package path

* fix: keep test package graphs conservative

* test: keep React complexity advisory
2026-08-13 16:26:08 -07:00
Aiden Bai 7d6ab6f0f6 fix(ci): use GitHub-hosted Windows runner 2026-08-12 08:42:39 +00:00
Aiden Bai 13138a4af5 refactor: simplify internals across the workspace (#1590) 2026-08-08 00:20:14 -07:00
Aiden Bai 7ce5dfa112 fix(ci): serialize Windows test tasks (#1567) 2026-08-03 13:47:39 -07:00
Aiden Bai 3f3197f8e3 fix(cli): improve interactive startup and short-terminal TUI (#1426) 2026-07-26 21:00:36 -07:00
Aiden Bai fd2db30f6e fix(ci): drop registry-url from OIDC stable publish (#1109)
The 0.7.3 failure was IDENTITY_TOKEN_READ_ERROR mid parallel publish,
not missing registry-url. Adding registry-url writes an empty
_authToken line that blocks Trusted Publishing OIDC
(actions/setup-node#1551). Keep force_publish dispatch to finish
partial releases.
2026-07-09 06:16:46 -07:00
Aiden Bai e89b0c4a16 fix(ci): restore npm OIDC auth for stable publish (#1108)
setup-node was missing registry-url on the main publish job, so trusted
publishing failed mid-release (react-doctor@0.7.3 / eslint-plugin). Match
publish-dev, and add workflow_dispatch force_publish to finish partial releases.
2026-07-09 06:13:18 -07:00
Aiden Bai 9cb414905d fix(oxlint-plugin): precision sweep — narrow 40+ rules against verified FPs from a 67k-diagnostic OSS audit (#1077) 2026-07-07 18:35:55 -07:00
blacksmith-sh[bot] 4d7c9dce3e .github/workflows: Migrate workflows to Blacksmith runners (#1021)
Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden.bai05@gmail.com>
Co-authored-by: Ray Arayilakath <me@rayhanadev.com>
2026-07-02 15:40:56 -07:00
Ray Arayilakath 88a5c3cb49 fix(action): surface degraded baseline scans + scaffold full-history checkout (#1019)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 05:09:28 -04:00
devin-ai-integration[bot] 4728f2da91 FABLE_CLEANUP: fix(action): 20-day audit fixes for the GitHub Action and workflows (#1015)
Co-authored-by: Aiden Bai <aiden.bai05@gmail.com>
Co-authored-by: Rayhan Noufal Arayilakath <me@rayhanadev.com>
2026-07-02 01:29:50 -07:00
Ray Arayilakath 2cadd3fe2c perf(action,core): CI speedups — install cache, persistent scan caches, local diff scope (plans 09–11) (#908)
* feat(action,core): CI speedups — install cache, persistent scan caches, local diff scope (plans 09–11)

The GitHub Action's dominant cost on a PR run is the uncached install (~15s of
an ~18s step), not the scan. These three plans target the CI experience:

Plan 09 — cache the install (biggest CI win). A resolve-version step pins the
concrete published version (so the cache key is stable even for `latest`;
scripts/resolve-package-spec.mjs), an actions/cache step restores the install
keyed on version+node+os+arch (no fuzzy fallback — native ABI safety), and the
scan installs into the cached `--prefix` only on a miss. A non-cacheable
local-path spec keeps the npx path. ~15s install → ~1-2s restore on a hit.

Plan 11 — derive PR changed files locally + lock the diff fast path. The base
step now runs `git diff --name-only --diff-filter=AMR <base>...HEAD` (faster, no
API rate limit, works on forks), falling back to the GitHub API only when the
base isn't reachable; both share scripts/normalize-changed-files.mjs. A
regression test locks that diff mode skips dead-code + supply-chain (the
fast-path guarantee). A clearer degraded-mode warning points at `fetch-depth: 0`.

Plan 10 — persist scan caches across CI runs. `REACT_DOCTOR_CACHE_DIR` lets the
action point the engine's caches at a stable `${runner.temp}` path an
actions/cache step persists, so the per-file content-addressed lint cache (#900)
restores across commits — a PR re-lints only its changed files. A new
supply-chain per-PURL on-disk cache (24h TTL, fail-open, NO_CACHE-bypassed) skips
the Socket network for unchanged deps.

Unit/integration tests cover all three (version classification, changed-file
normalization, diff-fast-path skip, cache-dir override, supply-chain cache
hit/bypass); changeset for the npm-facing surface (REACT_DOCTOR_CACHE_DIR +
supply-chain cache). Action releases (tags) + the self-test cacheable-install
job (a workflow-file change needing `workflow` push scope) + R3 sparse-checkout
docs + plan-09's `--print-cache-key` follow-up are noted for a workflow-scoped
push / dogfooding pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(action): self-test the cacheable install path (plan 09)

Adds an `action-cacheable-install` job that runs the action with a published
`version:` (latest) so CI exercises the resolve-version + actions/cache +
prefix-install branch (the local-path job covers the npx branch). Advisory
(`blocking: none`). Split out from the main plan-09 commit because pushing a
`.github/workflows/` change requires `workflow` token scope.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(cli): migrate mutable @main action refs to @v2 (action change → migration)

Since plans 09-11 change the action, register a once-per-repo project migration
(the framework's "action updates" path) that pins a mutable `@main` / `@master`
React Doctor action reference in `.github/workflows/*.yml` to the recommended
floating major `@v2`.

An unpinned `@main` runs whatever the action's HEAD points to with the
workflow's write permissions — a supply-chain risk (#299) — and the rewrite also
moves the workflow onto the install- and scan-cached release. Only mutable refs
are rewritten; pinned tags / SHAs are deliberate and untouched, a different
action on `@main` is ignored, and only the ref changes (owner, comments, and the
`version:` input are preserved). Runs once per repo like the legacy-config
migration and logs the change for review/commit (or revert if intentionally
tracking main). No-op (stays pending) when there's no mutable ref.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(action): update the action contract test for the plans 09-11 restructure

github-action.test.ts asserts the literal content of action.yml's steps; plans
09/11 moved that content into shared scripts, so two assertions broke:
- the inline `directoryPrefix` prefix-stripping is now in the shared
  normalize-changed-files.mjs (used by both the local-diff base step and the API
  fallback) — assert the wiring instead, with the behavior locked by
  normalize-changed-files.test.ts.
- the inline `PACKAGE_SPEC="react-doctor@$INPUT_VERSION"` derivation moved to the
  resolve-version step (resolve-package-spec.mjs) — assert it's read from that
  step's output.
Adds a test for the new contract (resolve-version + the toolchain/scan
actions/cache steps + the cached prefix-install). Behavior unchanged; the
contract test now matches the reworked action.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 23:38:48 -04:00
Aiden Bai 8bbcca87da chore: vendor deslop-js + deslop-cli into the monorepo (#880) 2026-06-19 01:02:54 -07:00
Ray Arayilakath 439e8e168c fix(ci): address post-merge Bugbot findings (cancel scope, self-test CLI, root-commit diff) (#888)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 01:58:53 -04:00
Ray Arayilakath 242bf69451 ci: action version-bump guard + faster CI (turbo remote cache, concurrency) (#885)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 01:49:22 -04:00
Aiden Bai 1ca6f0ead3 Fix react-doctor npx engine warning (#731) 2026-06-09 18:23:20 -07:00
Ray Arayilakath 15bd9d8617 feat(ci): surface React Doctor results on main + offer v1→v2 action upgrade (#706)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 04:16:24 -04:00
Ray Arayilakath 9a8ad6e40d feat(ci): blocking gate, PR-introduced-issues baseline, inline review comments + CLI flag cleanup (#663)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 17:56:22 -04:00
Ray Arayilakath 75c1f99e06 fix(oxlint-plugin-react-doctor): declare oxc-parser as a runtime dependency (#630)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 07:02:17 -04:00
Ray Arayilakath e9e71bbc2f feat(cli): deepen sentry observability -- source maps, tracing, anonymization, crash refs (#628)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 06:19:25 -04:00
Nisarg Patel c2198ed675 feat: order the diagnostics dump by rule priority (#590)
* feat: order the diagnostics dump by rule priority

Users report that `npx react-doctor` prints a large, undifferentiated dump and
they don't know what to tackle first. The score API now returns an intrinsic
priority/tier per rule; surface it so the dump leads with what's most worth
fixing instead of ordering purely by severity.

- core: `ScoreResult` carries the API's `rules: {ruleKey: {priority, tier}}`
  payload (new `RulePriority`/`RuleTier` types); `parseScoreResult` captures it.
- CLI: rule-groups and categories sort by `effectivePriority` (API priority
  desc). Unranked rules get a severity-based midpoint; with no score at all
  (`--no-score` / API unreachable) ordering degrades to the previous
  error-before-warning + count order, so there is no regression offline.

No priority table is duplicated here — the engine remains the single source of
truth and the values arrive over the score API.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(cli): improve error handling for command execution failures

* refactor(core): validate the score API response with effect/Schema

Replace the hand-rolled type guards in `parseScoreResult`/`parseRulePriorities`
with `effect/Schema` (the schema lib already used across @react-doctor/core, see
schemas.ts) — `Schema.Struct` + `Schema.Literals` + `Schema.Record` decoded via
`decodeUnknownOption`. A malformed payload decodes to null and falls back to the
severity ordering, same as before. Result types are now `readonly` to match the
decoded shape.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 22:49:53 -07:00
Aiden Bai ac14db31e2 fix(cli): guard startup stdin unref on isTTY so prompts don't exit by themselves (#593) 2026-05-29 21:11:50 -07:00
Aiden Bai adbec28b9a fix(ci): serialize @dev snapshot publish to avoid npm 409 conflict (#588) 2026-05-29 19:13:20 -07:00
Ray Arayilakath f4035fce9a refactor(action): rebuild PR reporting flow (#577)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 16:24:17 -04:00
Aiden Bai f036b0fc52 done 2026-05-28 20:16:27 -07:00
Aiden Bai ef47202cbd fix: remove registry-url and upgrade npm for OIDC trusted publishing
setup-node's registry-url writes an .npmrc with _authToken placeholder
that short-circuits the OIDC exchange. Also need npm 11.5.1+ for
trusted publishing support.
2026-05-27 01:03:10 -07:00
Aiden Bai 6531454b95 fix: use pnpm run version in publish workflow 2026-05-27 00:54:37 -07:00
Aiden Bai d9a6d68509 chore: add trusted publishing workflow via OIDC 2026-05-27 00:53:19 -07:00
Aiden Bai 07b8a6c3e0 fix: cross-platform spawn errors (#498, #501) and add Windows/macOS CI (#502) 2026-05-26 18:19:41 -07:00
Aiden Bai 9d6200cd15 fix 2026-05-24 19:38:38 -07:00
Aiden Bai 87981e9018 fix 2026-05-24 18:58:22 -07:00
Aiden Bai 6ac928383d Fix Node 20 runtime dependency support (#469) 2026-05-24 18:44:44 -07:00
Aiden Bai 5726307443 fix 2026-05-24 17:45:10 -07:00
Aiden Bai 9dca7f6a4d fix 2026-05-24 17:40:53 -07:00
Aiden Bai 6b51ea6241 test on multiple version for ci 2026-05-24 16:28:44 -07:00
Aiden Bai e642d461cc fix 2026-05-24 16:20:47 -07:00
Aiden Bai d4431fb7c7 fix 2026-05-24 00:05:07 -07:00
Aiden Bai 523696940c Revert "feat(action): React Doctor Review composite action (#307)" (#443)
This reverts commit 30f05ef532.
2026-05-23 01:35:12 -07:00