Skip to content

chore(review): assertive profile, instructions for four trees, and let CodeRabbit approve - #41

Merged
dcotelo merged 2 commits into
mainfrom
chore/review-config
Sep 18, 2026
Merged

dcotelo merged 2 commits into
mainfrom
chore/review-config

Conversation

@dcotelo

@dcotelo dcotelo commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Two .coderabbit.yaml changes, one commit each so either can be reverted alone.

Closes #37 and #36.

Type

  • chore

Surface(s) touched

  • CI and release automation (.github/) — .coderabbit.yaml

cfcd591 — assertive profile, and instructions for four untouched trees

At chill, the incremental review of #33 missed a classifier that ignored
statusLine.type and so called a configuration Claude Code would never run
correctly wired. Only an explicitly requested full review found it. That reason
is written beside the setting.

Path instructions covered scripts/** and tests/**. Four trees had none, and
each carries conventions a reviewer cannot infer from a diff:

Path What the instruction says
statusline/** Runs every few seconds in a live session: never block, never exit non-zero, no network, and read stdin only when asked — the payload has one reader
hooks/** Degrade to silence; never assume cprof is on PATH
docs/** Every command, flag and key must exist as written; anchors must resolve across the topic-doc split; no other statusline tool named; versions written by automation
.github/** Actions pinned to full SHAs; no workflow with a write-capable token executing a script from the PR's own revision

The tests/** instruction gains the failure mode this repository keeps
producing — an assertion that passes whether or not the code works — with the
specific shapes to look for, including the assert_fail on a function that does
not exist yet that produced three vacuous passes in #33.

No linter changes: actionlint, yamllint, markdownlint and gitleaks
already default to enabled, and listing only shellcheck under tools: never
disabled them. That was my own wrong assumption when #37 was filed, corrected in
the issue.

781045b — let CodeRabbit approve

main requires one approving review; as the sole maintainer every PR has landed
with --admin, so the rule has been bypassed rather than met. CodeRabbit
reviews every PR and finds real defects but submits COMMENTED reviews, which
can never satisfy it. request_changes_workflow: true makes it approve once its
comments are resolved and the head has been reviewed.

This PR is the test. Two things are unverified, and both are recorded in the
config beside the setting rather than left to be rediscovered:

  1. Whether the approval counts. GitHub treats bots inconsistently — Actions
    reviews count subject to an org toggle, Copilot's explicitly do not.
    CodeRabbit is a GitHub App with write access, which ordinarily does count,
    but that is an assumption until a PR reaches CLEAN without --admin. If
    this one does, the mechanism works; if it sits BLOCKED while CodeRabbit
    shows approved, it does not, and the setting should be reverted.
  2. Whether an approval survives the release. dismiss_stale_reviews is on
    and release-bump pushes chore(release): after review. This PR is chore:
    so nothing will be pushed into it — meaning it tests (1) but not (2). The
    first feat: or fix: branch after this lands is what tests (2).

auto_assign_reviewers was considered and left off. I described it earlier as
making CodeRabbit visible as a reviewer; that was wrong — it assigns suggested
reviewers
, which on a single-maintainer repository is noise.

Test evidence

No code touched. .coderabbit.yaml parsed with Ruby's YAML after each commit:

  • after cfcd591: profile=assertive, path_instructions=scripts/** tests/** statusline/** hooks/** docs/** .github/**
  • after 781045b: request_changes_workflow=true

Checklist

  • bash tests/run.sh passes, and CI is green.
  • shellcheck clean over the file list CI uses (no scripts changed).
  • New behavior carries an assertion in tests/ — n/a, no code change.
  • Conventional Commits subjects; chore: publishes no release.
  • Every commit carries a DCO sign-off.
  • No AI attribution anywhere in the commits or this PR.
  • Docs updated if this changes user-facing behavior — n/a.
  • Breaking changes declared: None.

Summary by CodeRabbit

  • Chores
    • Updated automated code review settings to provide more assertive feedback.
    • Enabled workflows that request changes when review issues are identified.
    • Added area-specific review guidance for status lines, hooks, documentation, and repository configuration.
    • Expanded testing guidance to flag ineffective or redundant assertions.

…trees

Closes #37.

At `chill`, the incremental review of #33 missed a classifier that ignored
`statusLine.type` and so reported a configuration Claude Code would never run
as correctly wired. Only an explicitly requested full review found it. The
profile goes to `assertive`, with that reason written beside it.

Path instructions covered `scripts/**` and `tests/**` only. Four trees had
none, and each has conventions a reviewer cannot infer from the diff:

- `statusline/**` runs every few seconds inside a live session and must never
  block, exit non-zero, call the network, or consume stdin unasked.
- `hooks/**` degrades to silence and cannot assume cprof is on PATH.
- `docs/**` must name only commands and keys that exist, keep anchors
  resolving across the topic-doc split, and never name another statusline
  tool; versions are written by automation.
- `.github/**` holds write-capable tokens: actions pinned to full SHAs, and no
  workflow executing a script from the pull request's own revision.

The `tests/**` instruction gains the failure mode this repository keeps
producing: an assertion that would pass whether or not the code works, with
the specific shapes to look for.

No linter changes: actionlint, yamllint, markdownlint and gitleaks already
default to enabled, and listing only shellcheck under `tools:` never disabled
them.

Signed-off-by: Diego Cotelo <me@dcotelo.dev>
…ypass

Closes #36.

`main` requires one approving review, and as the sole maintainer every pull
request has landed with `--admin` — the rule bypassed rather than met.
CodeRabbit reviews every pull request and has found real defects, but submits
`COMMENTED` reviews, so its verdict could never satisfy the rule.
`request_changes_workflow: true` makes it approve once its comments are
resolved and the head has been reviewed.

Two things this does not yet know, recorded in the config beside the setting
rather than left for someone to rediscover:

Whether the approval counts at all. GitHub treats bots inconsistently —
Actions reviews count subject to an org toggle, Copilot's explicitly do not.
CodeRabbit is a GitHub App with write access, which ordinarily does count, but
that is an assumption until a pull request reaches `CLEAN` without `--admin`.
This pull request is the first test.

Whether an approval survives the release. `dismiss_stale_reviews` is on and
`release-bump` pushes `chore(release):` after review, dismissing the approval
it just gave. It does re-review a new head; whether it re-approves is
unverified.

`auto_assign_reviewers` was considered and left off: it assigns suggested
reviewers, which on a single-maintainer repository means noise rather than the
visibility it sounds like.

Signed-off-by: Diego Cotelo <me@dcotelo.dev>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3f32f74c-d0e0-4cba-8bc1-24abd90fd08a

📥 Commits

Reviewing files that changed from the base of the PR and between 0f05284 and 781045b.

📒 Files selected for processing (1)
  • .coderabbit.yaml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The CodeRabbit configuration now uses the assertive profile, enables request-change workflows, expands test assertion checks, and adds review instructions for statusline, hooks, documentation, and GitHub workflow paths.

Changes

Review policy coverage

Layer / File(s) Summary
Global review settings
.coderabbit.yaml
The review profile changes from chill to assertive. The request-changes workflow is enabled.
Path-specific review instructions
.coderabbit.yaml
Test instructions now flag assertions that cannot fail. New rules cover statusline behavior, hook fallback and CLI resolution, documentation accuracy, and GitHub workflow security constraints.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 78104

The PR only changes review configuration, and the settings are supported with no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The change reviews.request_changes_workflow: true adds CodeRabbit approval and branch-protection workflow behavior. Issue #37 requests a stronger review profile and path instructions; its optional r… Remove request_changes_workflow: true and its related configuration comments, or link this behavior to a separate issue that defines its requirements and tests.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: it raises the review profile to assertive, adds instructions for four path trees, and enables CodeRabbit approvals.
Linked Issues check ✅ Passed Issue #37 coding requirements are implemented in .coderabbit.yaml. reviews.profile is assertive. path_instructions now covers docs/**, .github/**, statusline/**, and hooks/** with the …
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Out of Scope Changes check

Explanation

The change reviews.request_changes_workflow: true adds CodeRabbit approval and branch-protection workflow behavior. Issue #37 requests a stronger review profile and path instructions; its optional reviewer-visibility consideration does not require this approval workflow. The associated comments also document release-bump approval behavior that is not part of the issue's coding scope.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

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

@dcotelo

dcotelo commented Sep 18, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@dcotelo

dcotelo commented Sep 18, 2026

Copy link
Copy Markdown
Owner Author

Result of the experiment this PR describes

A GitHub App approval does count here. CodeRabbit submitted APPROVED at 18:45:51Z and the PR moved to mergeStateStatus: CLEAN, reviewDecision: APPROVED. So risk (1) in the description is resolved: unlike Copilot, CodeRabbit's approval satisfies the one-approval rule on main. This PR can merge without --admin — the first one that can.

It also proves the config is read from the PR head, not the base. The default for request_changes_workflow is false, and a default-configured CodeRabbit would not have approved. So 781045b was active for this PR's own review, which means cfcd591's assertive profile and new path instructions were too.

One constraint neither issue anticipated: reviews are no longer automatic. CodeRabbit posted, on this PR:

This repository does not receive automatic reviews because it has fewer than 10 stars.

cprof has 5. The approval above only happened after an explicit @coderabbitai review. So the practical workflow becomes: open the PR, comment @coderabbitai review (or click the Trigger review checkbox in its comment), and once it approves, merge without --admin.

Worth correcting a claim I made on #39 in the process: I reported it as reviewed with zero comments. It was never reviewed — the CodeRabbit SUCCESS check means nothing failed, not that anything was examined. Same for this PR before the trigger.

Risk (2) remains untested. dismiss_stale_reviews is on and release-bump pushes chore(release): after review; this PR is chore:, so nothing was pushed into it. The first feat: or fix: branch after this lands is what tests whether an approval survives the bump — and if it does not, the next PR will sit BLOCKED after the bot's push until the review is triggered again.

@dcotelo
dcotelo merged commit cb0616a into main Sep 18, 2026
5 checks passed
@dcotelo
dcotelo deleted the chore/review-config branch September 18, 2026 18:46
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@dcotelo, thank you for the detailed experiment results.

The approval test confirms that a CodeRabbit GitHub App approval satisfies the main branch's one-approval rule.

The configuration test confirms that CodeRabbit uses .coderabbit.yaml from the PR head for that PR's review.

For this repository, contributors must explicitly trigger CodeRabbit review until the repository meets the automatic-review eligibility requirement.

The remaining test is valid. A future feat: or fix: PR must verify whether dismiss_stale_reviews dismisses the CodeRabbit approval after the release-bump commit.

🐇


✏️ Learnings added
Learnt from: dcotelo
URL: https://github.com/dcotelo/cprof/pull/41

Timestamp: 2026-09-18T18:47:06.835Z
Learning: In the GitHub repository `dcotelo/cprof`, a CodeRabbit GitHub App `APPROVED` review satisfies the `main` branch's required one-approval rule. A pull request can merge without `--admin` after CodeRabbit approves it.

Learnt from: dcotelo
URL: https://github.com/dcotelo/cprof/pull/41

Timestamp: 2026-09-18T18:47:06.835Z
Learning: In the GitHub repository `dcotelo/cprof`, CodeRabbit uses `.coderabbit.yaml` from the pull request head when it reviews that pull request. This was confirmed by enabling `request_changes_workflow: true` in the PR head and receiving a CodeRabbit approval despite the default being `false`.

Learnt from: dcotelo
URL: https://github.com/dcotelo/cprof/pull/41

Timestamp: 2026-09-18T18:47:06.835Z
Learning: In the GitHub repository `dcotelo/cprof`, CodeRabbit automatic reviews are unavailable while the repository has fewer than 10 stars. Contributors must explicitly trigger review with `coderabbitai review` or the Trigger review checkbox.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

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.

review config: raise the profile, and cover the paths with no instructions

1 participant