ci: handle documentation-only repos in desloppify gate#31
ci: handle documentation-only repos in desloppify gate#31samtuckerdavis merged 2 commits intomainfrom
Conversation
desloppify scores 0.0 when there are no recognized code files — not because the code is bad, but because there is nothing to measure. This causes the quality gate to always fail in documentation-only repos. Detect the empty-zones case (Zones: output is blank) and treat a 0.0 score in that context as a full pass rather than a false failure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdded logic to the CI quality gate to treat desloppify scans with empty ChangesQuality Gate — documentation-only scan detection
Content-policy & CONTRIBUTING updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (6 passed)
✨ Finishing Touches
Review rate limit: 0/5 reviews remaining, refill in 51 minutes and 48 seconds. Comment |
The no-animal-violence checker was flagging terms in .coderabbit.yaml and CONTRIBUTING.md that appeared in explanatory/prohibition context — describing what NOT to use rather than using the terms approvingly. Fix by rewriting the instruction text to reference the no-animal-violence repo directly instead of spelling out the flagged terms, and by replacing the "bad examples" list in CONTRIBUTING.md with inclusive alternatives. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CONTRIBUTING.md`:
- Around line 42-46: Replace the singular header/term "Farmed animal" in
CONTRIBUTING.md with the repo's canonical plural phrase "farmed animals"
(matching casing/spacing used elsewhere) so contributor guidance stays
consistent; search for the exact string "Farmed animal" and update it to "farmed
animals", and verify the other entries (e.g., "Factory farm") remain unchanged
and aligned with the repo terminology.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5b6fa4c0-e79a-4032-a105-73acf6016175
📒 Files selected for processing (2)
.coderabbit.yamlCONTRIBUTING.md
| - **Farmed animal** — not the industry term (use movement language, not production framing) | ||
| - **Factory farm** — not "farm" or "production facility" | ||
| - **Campaign** — an organized advocacy effort with defined goals | ||
| - **Investigation** — covert documentation (all data is potential evidence) | ||
| - **Sanctuary** — permanent care facility, not "shelter" |
There was a problem hiding this comment.
Use the repo’s exact movement term here.
Farmed animal is singular, but the repo guidance uses farmed animals. Keeping the established wording avoids terminology drift in contributor docs. As per coding guidelines, use 'farmed animals' not industry terms; use 'factory farm' not 'farm'.
Suggested edit
-- **Farmed animal** — not the industry term (use movement language, not production framing)
+- **Farmed animals** — not the industry term (use movement language, not production framing)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **Farmed animal** — not the industry term (use movement language, not production framing) | |
| - **Factory farm** — not "farm" or "production facility" | |
| - **Campaign** — an organized advocacy effort with defined goals | |
| - **Investigation** — covert documentation (all data is potential evidence) | |
| - **Sanctuary** — permanent care facility, not "shelter" | |
| - **Farmed animals** — not the industry term (use movement language, not production framing) | |
| - **Factory farm** — not "farm" or "production facility" | |
| - **Campaign** — an organized advocacy effort with defined goals | |
| - **Investigation** — covert documentation (all data is potential evidence) | |
| - **Sanctuary** — permanent care facility, not "shelter" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CONTRIBUTING.md` around lines 42 - 46, Replace the singular header/term
"Farmed animal" in CONTRIBUTING.md with the repo's canonical plural phrase
"farmed animals" (matching casing/spacing used elsewhere) so contributor
guidance stays consistent; search for the exact string "Farmed animal" and
update it to "farmed animals", and verify the other entries (e.g., "Factory
farm") remain unchanged and aligned with the repo terminology.
Problem
The Desloppify Quality Gate always fails for this repo because it scores 0.0/100. The repo is documentation-only (no
.sh,.py,.ts, etc. files). When desloppify finds zero code files, it initializes the objective score to 0.0 from the empty state default rather than 100.0.Root cause:
_update_objective_healthin desloppify returns early without setting scores whenmerge_potentialsreturns an empty dict (all-zero potentials). This leaves the score at theempty_state()default of 0.Fix
Detect the no-code-files case in the CI workflow by checking:
Zones:line from desloppify output is empty (no files in any zone)When both conditions are true, the gate passes with a synthetic 100.0 — because there is nothing to fail.
This is the correct semantic: a docs repo with zero quality issues is perfect, not broken.
Why this PR must merge before #27
PR #27 (
chore/remove-auto-merge) is a pure workflow file deletion. It cannot fix the desloppify gate itself. This PR fixes the gate on main so that #27 (and all future PRs) pass CI.Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Summary by CodeRabbit