fix(hooks): treat neutral check conclusion as non-failing in require-ci-green-before-stop#410
Conversation
…ci-green-before-stop Socket Security: Pull Request Alerts (and other apps) report `neutral` when they can't process a PR — typically because the head branch is from an outside contributor and the app lacks access. The CI-green policy previously filtered failing checks as "not success / skipped / cancelled", which lumped `neutral` in with real failures and produced false-positive Stop blocks demanding the agent "fix" a check it cannot affect. Add `neutral` to the non-failing set, matching GitHub's documented semantics (`neutral` = "neither passing nor failing"). Add a unit test mirroring the existing `cancelled` / `skipped` cases. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Mirror the policy code change from the prior commit into the built-in-policies reference, so the documented behavior for require-ci-green-before-stop matches what the policy actually does. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe ChangesCI Policy Update
Docs Pipeline and Vocabulary
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
docs/built-in-policies.mdxESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. 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 |
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 `@docs/built-in-policies.mdx`:
- Around line 814-815: In the sentence that reads "Treats `skipped`,
`cancelled`, and `neutral` conclusions as non-failing (the latter covers e.g.
Socket Security alerts on outside-contributor PRs, where the app intentionally
reports neutral rather than success/failure)", replace the hyphenated term
"outside-contributor PRs" with a non-hyphenated form such as "outside
contributor PRs" (or "PRs from outside contributors") to satisfy the Vale
spellcheck; update the surrounding text for grammar if needed to keep the
sentence clear and consistent with the existing phrase "Treats `skipped`,
`cancelled`, and `neutral` conclusions..." so CI passes.
🪄 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: CHILL
Plan: Pro
Run ID: 66ce3088-0868-4e31-b0ce-e13254d8ab0c
📒 Files selected for processing (4)
CHANGELOG.md__tests__/hooks/builtin-policies.test.tsdocs/built-in-policies.mdxsrc/hooks/builtin-policies.ts
The Mintlify Validation (exosphere) - vale-spellcheck CI check was failing
on this PR with 8152 suggested changes across 15 files — almost all of it
noise from running the default English dictionary over the 14 translated
copies of the modified docs file plus dozens of legitimate brand/tooling
terms in the English source.
Add docs/.vale.ini (alongside docs.json, per Mintlify's CI contract) that
keeps Vale.Spelling enabled on canonical English *.{md,mdx} files but
disables it on the {ar,de,es,fr,he,hi,it,ja,ko,pt-br,ru,tr,vi,zh,i18n}/**
subdirs where running an English dictionary produces zero signal. Add a
project Vocab at docs/styles/config/vocabularies/Mintlify/accept.txt (the
Vale 3.0 path Mintlify requires, not the legacy styles/Vocab/) covering
the brand names, CLI tooling (npx, bunx, gcloud, systemctl, …), and
Claude Code event names (PreToolUse, SessionStart, …) the dictionary
doesn't know.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ellcheck startup error First attempt failed with "There was an error running Vale: please check your .vale.ini file and styles/ directory." The culprit was the BasedOnStyles = Vale + Vale.Spelling = YES enable section: vale's built-in Vale style requires a styles/Vale/ scaffold present on disk to enable via BasedOnStyles, even though the rules themselves are bundled in the binary. Switch to a disable-only config: let Mintlify's default spellcheck still run (which is what was producing the original flags), but point it at the project Vocab to whitelist legitimate terms, and disable Vale.Spelling on the 14 translated subdirs + i18n/. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CodeRabbit nit on PR #410: switch to the non-hyphenated form so the phrase reads cleanly without compound-modifier punctuation. Vale-spellcheck no longer flags either form (the project Vocab + disable globs make it pass), but this is the form CR will keep re-flagging on every review until it's gone. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
require-ci-green-before-stoppreviously treated any GitHub check-runconclusionother thansuccess/skipped/cancelledas failing. GitHub'sneutralconclusion means "neither passing nor failing" — Socket Security: Pull Request Alerts (and similar apps) emit it when they can't process a PR (e.g. the head branch is from an outside contributor and the app lacks access).gh pr checkoutan outside-contributor PR with a neutral Socket check.neutralto the non-failing set insrc/hooks/builtin-policies.ts, mirrors that into the policy reference indocs/built-in-policies.mdx, adds a unit test next to the existingskipped/cancelledcases, and adds a CHANGELOGFixesentry under the current0.0.11-beta.3section.Test plan
bun run test:run -- __tests__/hooks/builtin-policies.test.ts(419 passed, incl. the newtreats neutral conclusions as non-failingcase)bun run lint(clean — 2 pre-existing warnings in unrelated files)bunx tsc --noEmit(clean)🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
neutralconclusion as non-failing to avoid false-positive stop blocks.Tests
neutralcheck conclusions are treated as non-failing.Documentation