ci(frontend): make checks deterministic - #71
Conversation
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughFrontend linting, typechecking, and Bun tests are consolidated into shared local and CI commands. Biome and TypeScript coverage expands to source, CSS, tests, and Playwright configuration, with related formatting and compatibility updates. ChangesFrontend checks
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant BunScripts
participant FrontendChecks
GitHubActions->>BunScripts: run check:frontend
BunScripts->>FrontendChecks: run lint:js, typecheck, and test:js
FrontendChecks-->>GitHubActions: report check results
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
⚔️ Resolve merge conflicts 💡
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai full review |
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 1 minute. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Line 15: Update the lint:fix script in package.json to chain vendor/bin/phpcbf
and biome check --write . with failure propagation, ensuring the command exits
unsuccessfully when PHPCBF fails while preserving the existing Biome formatting
step on successful PHPCBF execution.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 95fa30b4-acf2-4015-83ac-35db0e06ad9e
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (13)
.github/workflows/js-lint.ymlREADME.mdbiome.jsonpackage.jsonresources/css/admin.cssresources/css/tinymce-content.cssresources/ts/modules/utils.tsresources/ts/tinymce-separator.jstests/e2e/global-setup.tstests/e2e/helpers.tstests/e2e/interactions.spec.tstests/e2e/media.spec.tstsconfig.json
|
@coderabbitai full review |
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 22 minutes. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@coderabbitai I fact-checked the non-inline Docstring Coverage warning and disagree with adding metric-driven comments here. This PR adds CI/tooling configuration, package scripts, formatting/type annotations, and Playwright/Bun test code; it does not add a public application API that needs contract documentation. The repository enforces PHPCS, Biome, TypeScript, PHPStan, and behavioral tests, but has no 80% docstring threshold. The changed callbacks are local test/compatibility implementation details, so boilerplate docstrings would reduce signal without documenting a meaningful invariant. The existing targeted README and compatibility comments are the appropriate documentation for this change. |
|
Tip For best results, initiate chat on the files or code changes.
🐇💭 ✏️ Learnings added
You are interacting with an AI system. |
|
@coderabbitai full review |
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 30 minutes. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/js-lint.yml:
- Line 42: Pin the Bun runtime used by the frontend lint gate by adding an
explicit supported version to the oven-sh/setup-bun@v2 configuration in the
workflow and declaring the same version in the project’s package metadata.
Ensure check:frontend runs with this identical pinned version rather than
latest.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 01dc4ebd-ee40-461e-aae8-d64ffa96ca7b
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (13)
.github/workflows/js-lint.ymlREADME.mdbiome.jsonpackage.jsonresources/css/admin.cssresources/css/tinymce-content.cssresources/ts/modules/utils.tsresources/ts/tinymce-separator.jstests/e2e/global-setup.tstests/e2e/helpers.tstests/e2e/interactions.spec.tstests/e2e/media.spec.tstsconfig.json
|
@coderabbitai The fresh summary repeats two outside-inline warnings that do not warrant code changes:\n\n1. Docstring Coverage: this repository has no 80% docstring policy, and this PR adds tooling/configuration plus local test callbacks rather than new public application contracts. You previously agreed and withdrew this exact warning in https://github.com/oszuidwest/teksttv-wp-plugin/pull/71#issuecomment-5128284051.\n2. Linked Issues / lockfile: the check is inconclusive only because CodeRabbit excludes |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- package.json TypeScript declaration ---'
rg -n -C 2 '"typescript"' package.json
printf '%s\n' '--- bun.lock TypeScript entries ---'
if [ -f bun.lock ]; then
rg -n -C 2 'typescript@|typescript":' bun.lock | head -n 80
else
printf '%s\n' 'bun.lock is not present in the checked-out PR.'
fi
printf '%s\n' '--- CodeRabbit configuration files and lockfile filters ---'
fd -HI -t f '(^|/)(\.coderabbit\.ya?ml|coderabbit\.ya?ml)$|^\.coderabbit/' . 2>/dev/null || true
rg -n -i -C 3 'path_filters|\.lock|coderabbit' \
-g '.coderabbit.yml' -g '.coderabbit.yaml' -g 'coderabbit.yml' -g 'coderabbit.yaml' . 2>/dev/null || trueLength of output: 2803
🐇💭 You are interacting with an AI system. |
|
@coderabbitai full review |
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 35 minutes. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@coderabbitai The new full review run |
|
Tip For best results, initiate chat on the files or code changes.
🐇💭 You are interacting with an AI system. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@biome.json`:
- Around line 4-5: Update the Biome files.includes configuration to explicitly
include the repository’s maintainer configuration files, including the root
package.json, biome.json, and TypeScript configuration files, so biome check .
covers them. Preserve the existing resources, tests, and Playwright entries, and
use the intended explicit config paths rather than leaving them unintentionally
excluded.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d9f001b5-fc30-4690-812b-b8a77247cd78
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
.github/workflows/js-lint.yml.github/workflows/release.ymlREADME.mdbin/package-plugin.shbiome.jsonpackage.jsontsconfig.jsontsconfig.tests.json
| "includes": ["resources/**", "tests/**", "playwright.config.ts"] | ||
| }, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Files:"
git ls-files | sed -n '1,200p'
echo
echo "biome.json:"
if [ -f biome.json ]; then cat -n biome.json | sed -n '1,220p'; fi
echo
echo "Search for files.includes / lint / check:"
rg -n '"files"|"includes"|"biome check"|lint|formatter' -S . --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' | sed -n '1,240p'Repository: oszuidwest/teksttv-wp-plugin
Length of output: 8170
🌐 Web query:
Biome configuration files includes files includes configuration files biome check does not lint included linter rules
💡 Result:
In Biome, the files.includes and tool-specific .includes (such as linter.includes) fields determine which files are processed [1][2]. The statement that "biome check does not lint included linter rules" is not a standard or documented behavior of Biome, but users may encounter issues where files or rules appear ignored due to configuration order, glob syntax, or specific environment factors [3][4][5]. Key points regarding Biome's include/exclude configuration: 1. Relationship between files.includes and linter.includes: The global files.includes setting is the primary filter. If a file is not matched by files.includes, it is excluded from all Biome operations, including linting [6]. Consequently, a tool-specific include setting (like linter.includes) cannot include a file that has already been excluded by files.includes [2][6]. 2. Configuration Precedence and Overrides: Settings are hierarchical. If you are not seeing expected linting behavior, ensure that your glob patterns are correctly defined relative to the configuration file [2][7]. Additionally, there have been confirmed bug reports regarding inconsistent behavior with linter.includes in monorepo setups or when using specific CLI flags like --staged [3][5]. 3. Glob Pattern Requirements: When using negated patterns (e.g., !file.js) to exclude files, you must generally specify a base glob like `` first to ensure all files are initially considered [1][2]. For directory exclusions in tool-specific fields (e.g., linter.includes), using `!/path/to/dir/` is recommended to ensure the directory is properly excluded [8]. 4. Troubleshooting: If rules appear to be ignored: - Verify that your glob patterns are matching the intended files using documentation references [2]. - Check if the files are being unintentionally excluded by a broader `files.includes` pattern [6]. - Ensure you are not running into known issues regarding CLI execution paths or monorepo configurations, which can cause paths to be interpreted differently than expected [3][5]. For the most accurate debugging, ensure your `biome.json` is at the project root or correctly relative to your command execution, and verify the pattern syntax adheres to the current version's requirements [2][3][7].
Citations:
- 1: https://biomejs.dev/guides/configure-biome/
- 2: https://biomejs.dev/reference/configuration/
- 3: Ignored files are not ignored when using --staged or explicitly specified in CLI biomejs/biome#3659
- 4: Biome seems to ignore overrides when using --staged biomejs/biome#8036
- 5: 🐛 Linter and formatter don't exclude files in monorepo configuration biomejs/biome#7160
- 6: https://github.com/biomejs/website/blob/main/src/content/docs/guides/configure-biome.mdx
- 7: https://biomejs.dev/guides/upgrade-to-biome-v2/
- 8: https://github.com/biomejs/website/blob/main/src/content/docs/reference/configuration.mdx
Include the maintainer configuration files in Biome’s coverage.
biome check . is the repo’s JS lint entry point, but files.includes only covers resources/**, tests/**, and playwright.config.ts. This leaves root package.json/biome.json and TS config files out of Biome’s lint/filter scope; add the intended config paths explicitly or document them as intentionally unlinted.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@biome.json` around lines 4 - 5, Update the Biome files.includes configuration
to explicitly include the repository’s maintainer configuration files, including
the root package.json, biome.json, and TypeScript configuration files, so biome
check . covers them. Preserve the existing resources, tests, and Playwright
entries, and use the intended explicit config paths rather than leaving them
unintentionally excluded.
Summary
package.jsonandbun.lockcheck:frontendcommand for Biome, TypeScript and Bun unit tests, and run that exact command in CIVerification
bun install --frozen-lockfilebun run check:frontend— 49 files checked, TypeScript clean, 5 tests passedbun run buildvendor/bin/phpunit— 377 tests, 696 assertionsvendor/bin/phpstan analyse --memory-limit=1G --debugvendor/bin/phpcscomposer validate --strictCloses #61
Summary by CodeRabbit
check:frontend), plus adjusted release/package exclusions to omit alltsconfig*.json.tsconfig.tests.jsonfor test-oriented TypeScript typing.