Skip to content

Settle CodeRabbit's docstring-coverage pre-merge check in .coderabbit.yaml, which no CI step enforces #1558

Not planned

Description

@ptr727

CodeRabbit's pre-merge checks include a Docstring Coverage check that warns below 80 percent, scoped to the functions a diff touches. Nothing in this repository enforces docstring coverage, so the check raises an item no gate will ever confirm or deny.

Measured on the current tree:

  • No CI step, composite action, or hook runs a docstring-coverage tool. grep over .github/workflows/, .github/actions/, .husky/ and pyproject.toml finds no interrogate, no pydocstyle, and no ruff D rules.
  • pyproject.toml's ruff configuration sets extend-select = ["I"], isort ordering on top of the defaults. The D family is not selected.
  • .coderabbit.yaml configures no docstring rule, so the 80 percent threshold is CodeRabbit's own default rather than a fleet decision.
  • The threshold does not describe this repository's code. scripts/tests/test_spec_validate.py's methods, measured before any recent change, sit at 49.6 percent, 63 with a docstring against 64 without.

It fires inconsistently rather than steadily, which is what makes it easy to merge past without deciding: warning on #1556 and #1547, passed on #1550 and #1541.

Why this belongs in the config

.coderabbit.yaml already settles this exact shape for four tools, disabling markdownlint, actionlint, shellcheck and ruff with the reason stated in the file: "CI runs these four linters and fails the pull request on them, so a review comment from the same tool is a second copy of a red check." A pre-merge check that no CI step runs is the mirror of that case. Rather than duplicating a red check it raises one that nothing can ever turn red, so a reader cannot tell a real miss from the default threshold.

What closing this takes

Decide, and record the decision in the config beside its siblings with a comment saying why:

  1. Disable the docstring-coverage pre-merge check, consistent with how the four tool entries are already handled.
  2. Or set a threshold that describes the fleet's actual convention, in which case the measured baseline above is the starting point rather than 80 percent.

Worth deciding in the same pass whether the fleet wants a docstring convention for test methods at all. CODESTYLE.md governs comments and docstrings, and if a rule is wanted then it belongs in CI as ruff D rules where a pull request fails on it, rather than in a reviewer's advisory check that every author reargues from scratch.

Raised while driving #1556, where the finding was declined with this evidence rather than acted on, since a warning nothing enforces is a class question rather than that pull request's defect.

Activity

  1. ptr727 commented on Nov 1, 2026

    @ptr727
    OwnerAuthor

    Decision needed (decision triage, 2026-11-01)

    Question: Should .coderabbit.yaml turn off CodeRabbit's Docstring Coverage pre-merge check (default 80%, enforced by no CI step), set its threshold to the measured ~50% baseline, or should docstrings be enforced in CI with ruff D rules?

    Options, recommended first:

    1. Turn the check off, with a comment saying why (recommended): Mirrors how the file already disables markdownlint, actionlint, shellcheck, and ruff, reviewer checks with no CI counterpart. The fleet's docstring convention is judgment, not coverage ("A short one-liner is fine for trivial functions"), so no percentage describes it. Hub-only file. No work in flight.
    2. Set the threshold to the ~50% baseline: Keeps a signal, but the number describes today's code rather than a stated convention and stays advisory. No work in flight.
    3. Add ruff D rules to CI, turn the check off: A real gate, but a convention change for every fleet Python tree through python-codestyle and CODESTYLE.md with the corpus converged first: a separate design issue. No work in flight.

    Evidence: .coderabbit.yaml:28-38 disables four tools: entries ("CI runs these four linters"), and has no pre_merge_checks or docstring key, so 80% is the default. pyproject.toml:8 extend-select = ["I"], no D. python-codestyle references/code-style.md:26-36 sets PEP 257 and one-liner-is-fine. .coderabbit.yaml is not in spec/files.json. The check fired inconsistently (warned on #1556, #1547, passed on #1550, #1541).

    Blocks: none

  2. added
    decision
    on Nov 1, 2026
  3. ptr727 commented on Nov 1, 2026

    @ptr727
    OwnerAuthor

    Maintainer answer (decision triage, 2026-11-01): Option 1: turn CodeRabbit's docstring-coverage pre-merge check off in .coderabbit.yaml, with a comment saying why. This is now work for the next burndown round.

  4. removed
    decision
    on Nov 1, 2026
  5. ptr727 commented on Nov 24, 2026

    @ptr727
    OwnerAuthor

    Released (2026-11-24): #4400 answered that #1558 is obsolete; no branch was ever created, so this claim holds no files.

    Backlog burndown claim (away run 2026-11-24, round 2, group 5): branch burndown/coderabbit-docstring-check, issue #1558.

    Predicted files:

    • .coderabbit.yaml, turning CodeRabbit's docstring-coverage pre-merge check off with a comment saying why, per the maintainer's answer of 2026-11-01 (option 1).
    • docs/pr-reviewer-reference.md, the CodeRabbit configuration bullet that lists what .coderabbit.yaml turns off.

    Any other group needing one of these files waits for this branch to merge.

    Parked on decision #4400: CodeRabbit retired the Docstring Coverage check, so the planned edits are on hold. No branch was pushed.

  6. ptr727 commented on Nov 24, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown park (away run 2026-11-24, round 2, group 5): no code written, no branch pushed, no PR, no worktree created. CodeRabbit's schema marks reviews.pre_merge_checks.docstrings deprecated with no effect (the check is retired), so the recorded option 1 would add a no-op key. Waiting on decision #4400 (recommended: close #1558 as obsolete). A fresh worker resumes by creating branch burndown/coderabbit-docstring-check from origin/develop and, only if the decision picks option 2, setting reviews.pre_merge_checks.docstrings.mode: "off" in .coderabbit.yaml plus the CodeRabbit bullet in docs/pr-reviewer-reference.md.

  7. ptr727 commented on Nov 24, 2026

    @ptr727
    OwnerAuthor

    Closed as obsolete per the maintainer's answer on #4400 (2026-11-24): CodeRabbit retired the Docstring Coverage check, so there is nothing to turn off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions