Skip to content

Configure CodeRabbit for this repo's conventions - #587

Merged
mairas merged 3 commits into
mainfrom
chore/coderabbit-config
Aug 13, 2026
Merged

Configure CodeRabbit for this repo's conventions#587
mairas merged 3 commits into
mainfrom
chore/coderabbit-config

Conversation

@mairas

@mairas mairas commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Why

The CodeRabbit app is installed but unconfigured, so it reviews with generic defaults. On #583 that already cost a merge: it asked for tighter toBeCloseTo precision on the unit-conversion tests, which is the opposite of the policy stated two tests up in the same file, and required_conversation_resolution turned that nit into a merge gate.

Approach

Baseline is signalk-server/.coderabbit.yaml; the structure and the "what NOT to flag" idea come from there. The content is Skip's.

profile: assertive, matching the baseline.

Traps a generic reviewer gets wrong here, encoded as path_instructions:

  • Specs run against the real app services by design. Anything placed in src/test.ts as { provide: AppClass, ... } is DI-inert, so the standard "add a shared stub" advice is not merely unwanted, it does nothing. A local fake must still expose serverServiceEndpoint$ and serverVersion$.
  • Never a per-file vi.mock() for a library vitest.config.ts aliases to a shim — that is exactly what #544 was.
  • Unit-conversion tolerances are physical, not library-exact. This is the Add the mass and area conversion groups #583 finding, written down so it does not recur.
  • units.service.ts diverges from the server's imperial fuel-flow formulas by 3600× on purpose (upstream signalk-server#2951); do not suggest reconciling.
  • DataService.updatePathData runs per delta on Pi-class hardware; ask for perf-harness numbers rather than asserting a regression.
  • Widgets own clearing their own stream-derived state on a re-point, because suppressBootstrapNull filters the replayed null.
  • The /@halos-org/skip/ serving path is a cross-package contract with @halos-org/skip-freeboard-panel.

Four things it must stop asking for: a CHANGELOG entry (the file was removed in #586), a VERSION bump (version-bump-check already enforces the subtle cycle rule), syncing with mxtommy/kip (not an upstream), and a bundled server plugin (webapp-only by design).

Evidence standard from the review conventions, as tone_instructions: name the trigger, the code path and the user-visible consequence, or do not raise it.

Noise removed: eslint off (npm run lint already gates every PR), markdownlint and languagetool off (docs here are deliberate prose), poem and in_progress_fortune off. github-checks.timeout_ms raised to 10 minutes because npm run ci outlasts the 90-second default, so CodeRabbit was giving up before the result existed.

path_filters exclude build output, the lockfile, the two vendored minified libraries, the generated MCP schema artifact, and the committed perf baselines. Verified against git ls-files: 172 tracked files excluded, none of them source.

knowledge_base.code_guidelines points at CLAUDE.md, so the rest is picked up rather than duplicated here.

Verification

Validated against schema.v2.json. Note that schema only sets additionalProperties: false at the root, so a typo under reviews would pass validation silently — every key and enum value was additionally checked against the schema's declared properties by walking it.

One real bug that caught: mode: off parses as the boolean false under YAML 1.1, where the field wants the string "off". It is quoted, with a comment saying why.


Also in this PR: the docs/ tree is removed

Called out because it is a second topic. It touches this PR's own config, which is why it rides along: .coderabbit.yaml had a path_instructions exception telling CodeRabbit not to flag docs/**-plan.md as stale, and that exception is now dead. It is replaced by an instruction not to suggest re-creating the tree.

Three of the four files were planning records for work that shipped long ago — git history holds them.

The fourth needed checking, because README.md pointed at docs/widget-schematic.md three times as live documentation for the npm run generate:widget CLI. It is not live. Comparing it against tools/schematics/create-host2-widget/schema.json:

  • 8 of the 14 options it documents do not exist: description, icon, category, pathKey, pathDescription, convertUnitTo, sampleTime, interactive.
  • 4 real options go unmentioned: pathDefault, zonesSupport, todoBlock, debugLogging.
  • 6 are correct: name, title, pathType, registerWidget, addSpec, readme.

It arrived in the KIP era (mxtommy/kip PR 835, Oct 2025) and drifted from the first change afterwards. Somebody following it would pass flags that do nothing.

The three README references now point at schema.json itself, which cannot drift from the CLI because it is the CLI's definition.

Baseline taken from the signalk-server config, then adapted to Skip's CLAUDE.md
and to the traps a generic reviewer gets wrong here — chiefly that specs run
against the real app services on purpose, so the usual "add a stub" advice is
inert, and that a per-file mock of an aliased library is the defect #544 was.

profile is `chill` rather than `assertive` because main has
required_conversation_resolution enabled: every comment is a merge gate until
someone resolves it, so a style nit costs more than it finds.
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e98fabc0-7e1c-47a1-ae07-112836b4ba5b

📥 Commits

Reviewing files that changed from the base of the PR and between 0606916 and e32202a.

📒 Files selected for processing (6)
  • .coderabbit.yaml
  • README.md
  • docs/named-configs-plan.md
  • docs/power-system-plan.md
  • docs/signalk-auth-plan.md
  • docs/widget-schematic.md
💤 Files with no reviewable changes (4)
  • docs/power-system-plan.md
  • docs/named-configs-plan.md
  • docs/widget-schematic.md
  • docs/signalk-auth-plan.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .coderabbit.yaml

📝 Walkthrough

Walkthrough

Changes

CodeRabbit review configuration

Layer / File(s) Summary
Review defaults and scope
.coderabbit.yaml
Sets review language, tone, profile, automation, title checks, timeouts, disabled tools, and ignored paths.
Repository and path review guidance
.coderabbit.yaml
Defines repository-wide rules and specific guidance for specifications, widgets, core services, packages, manifests, and Markdown documentation.
Knowledge-base configuration
.coderabbit.yaml
Enables the knowledge base and uses CLAUDE.md as its guideline file.

Widget documentation references

Layer / File(s) Summary
Widget development guidance
README.md
Removes references to docs/widget-schematic.md and points widget scaffolding guidance to Host2 schematic resources.

The PR also deletes three planning documents and the former widget schematic guide.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: ⚪ Minimal · up to e3220

This change configures repository review conventions and updates documentation; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes the CodeRabbit configuration but does not use the required conventional-commit format with a type and scope. Rewrite the title in conventional-commit form, such as "chore(coderabbit): configure repository conventions".
✅ Passed checks (3 passed)
Check name Status Explanation
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/coderabbit-config

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

mairas added 2 commits August 13, 2026 11:53
Three of the four files were planning records for work that shipped long ago.
Git history holds them.

The fourth, widget-schematic.md, read as live documentation — README pointed at
it three times for the scaffolding CLI's flags — but 8 of the 14 options it
documents do not exist in the schematic's schema (description, icon, category,
pathKey, pathDescription, convertUnitTo, sampleTime, interactive), and 4 that do
exist go unmentioned. It came from the KIP era, in #835, and drifted from the
first change afterwards. A reader following it would pass flags that do nothing.

README now points at the schematic's own schema.json, which cannot drift from
the CLI because it is the CLI's definition.
Lowering the profile trades away real findings to avoid a merge gate that costs
one reply to clear. The instructions below are the right instrument for a
reviewer that raises the wrong things.
@mairas
mairas force-pushed the chore/coderabbit-config branch from 79a266b to c65952f Compare August 13, 2026 09:00
@mairas
mairas merged commit 1a7992f into main Aug 13, 2026
5 checks passed
@mairas
mairas deleted the chore/coderabbit-config branch August 13, 2026 09:03
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