Skip to content

React Compiler compliance check blocked in AI code reviewer #85070

@kacper-mikolajczak

Description

@kacper-mikolajczak

Background

The Expensify App repo uses claude-code-action to run automated code reviews on every PR via .github/workflows/claude-review.yml. The reviewer agent operates in a restricted sandbox where only explicitly whitelisted Bash commands are permitted through the allowedTools parameter - currently limited to gh pr diff and gh pr view. Separately, a coding standards rule (CLEAN-REACT-PATTERNS-0) instructs the reviewer to verify whether a file compiles with React Compiler before flagging manual memoization as redundant.

Problem

When the reviewer agent tries to verify React Compiler compliance per the rule's instructions, it cannot execute the npx react-compiler-healthcheck command due to the allowedTools whitelist, which prevents it from distinguishing files that compile (where manual memoization is redundant) from files that don't (where manual memoization may be necessary).

Image

Solution

Replace the npx react-compiler-healthcheck instruction with npm run react-compiler-compliance-check check <filepath> - an existing repo script that wraps the same healthcheck. Add Bash(npm run react-compiler-compliance-check:*) to the allowedTools in both claude-review.yml and review-code-pr.md. Update the rule's verification command accordingly.

PR: #85067

Issue OwnerCurrent Issue Owner: @kacper-mikolajczak

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions