Skip to content

ci: handle documentation-only repos in desloppify gate#31

Merged
samtuckerdavis merged 2 commits intomainfrom
fix/desloppify-no-code-files
May 3, 2026
Merged

ci: handle documentation-only repos in desloppify gate#31
samtuckerdavis merged 2 commits intomainfrom
fix/desloppify-no-code-files

Conversation

@samtuckerdavis
Copy link
Copy Markdown
Contributor

@samtuckerdavis samtuckerdavis commented May 3, 2026

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_health in desloppify returns early without setting scores when merge_potentials returns an empty dict (all-zero potentials). This leaves the score at the empty_state() default of 0.

Fix

Detect the no-code-files case in the CI workflow by checking:

  1. The Zones: line from desloppify output is empty (no files in any zone)
  2. The extracted score is exactly 0.0

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

  • Chores
    • Improved the quality gate to treat documentation-only scans with empty zones as a full pass, preventing unnecessary failures.
  • Documentation
    • Updated contributor guidelines and automated checks to promote inclusive language, replacing speciesist idioms with suggested alternatives and linking to the full guidance.

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

📝 Walkthrough

Walkthrough

Added logic to the CI quality gate to treat desloppify scans with empty Zones and an objective score of 0.0 as a full pass by overriding SCORE to 100.0. Also updated .coderabbit.yaml wording for speciesist idioms/path instructions and condensed CONTRIBUTING.md guidance to point to the full rule set.

Changes

Quality Gate — documentation-only scan detection

Layer / File(s) Summary
Scan Output Parsing
.github/workflows/desloppify.yml
Extracts Zones from SCAN_OUTPUT and reads the objective SCORE.
Control Logic
.github/workflows/desloppify.yml
If ZONES is empty and SCORE == 0.0, logs no code files detected and sets SCORE to 100.0 before threshold check.

Content-policy & CONTRIBUTING updates

Layer / File(s) Summary
Path/instruction text
.coderabbit.yaml
Expanded path_instructions for **/*.md to call out avoiding industry euphemisms and preferring terms like “farmed animals”, “factory farm”.
Pre-merge check instructions
.coderabbit.yaml
Rewrote No speciesist idioms check instructions to reference the Open-Paws “no-animal-violence” guideline and provide example inclusive alternatives instead of a hardcoded mapping.
Contributor guidance
CONTRIBUTING.md
Reworded “Use movement terminology” bullets for clearer movement-language phrasing and replaced the inline example idioms with a pointer to the full enforcement guidance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No Speciesist Idioms ❌ Error PR addresses speciesist idioms per Open-Paws guidelines but terminology inconsistency remains unresolved. Change 'Farmed animal' to 'Farmed animals' in CONTRIBUTING.md to match repository guidelines and ensure full compliance.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: fixing the desloppify quality gate to handle documentation-only repositories that have no code files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Hardcoded Secrets Or Credentials ✅ Passed None of the three modified files contain hardcoded API keys, tokens, or credentials. References to credentials appear only in documentation and configuration check definitions.
✨ Finishing Touches
  • 🛠️ fix NAV violations: Commit on current branch
  • 🛠️ fix NAV violations: Create PR

Review rate limit: 0/5 reviews remaining, refill in 51 minutes and 48 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

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>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between cf23375 and 37c5fb5.

📒 Files selected for processing (2)
  • .coderabbit.yaml
  • CONTRIBUTING.md

Comment thread CONTRIBUTING.md
Comment on lines +42 to 46
- **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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Suggested change
- **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.

@samtuckerdavis samtuckerdavis merged commit eef06be into main May 3, 2026
4 checks passed
@samtuckerdavis samtuckerdavis deleted the fix/desloppify-no-code-files branch May 3, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant