Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
reviews:
# The description is the author's: no summary written into it, nor a fortune while it runs.
high_level_summary: false
in_progress_fortune: false
suggested_reviewers: false
# A version bump has nothing of ours to review; CI checks it.
auto_review:
ignore_usernames:
- 'dependabot[bot]'
# Not ours to change: H5P's vendored core, the pack's generated index, lz-string as shipped.
path_filters:
- '!packages/runtime/vendor/**'
- '!packages/libraries/index.js'
- '!packages/libraries/install.js'
- '!packages/embed/scorm/lz-string.js'
# The repository lints with oxlint (pnpm lint); the others would hold it to rules it does not keep.
tools:
biome:
enabled: false
eslint:
enabled: false
markdownlint:
enabled: false
languagetool:
enabled: false
htmlhint:
enabled: false
stylelint:
enabled: false
yamllint:
enabled: false
knowledge_base:
code_guidelines:
# Added to the defaults, which read AGENTS.md. A plain entry would govern design/ alone, but the
# rules there, its bold sentences, are for the whole repository.
filePatterns:
- files: design/*.md
applyTo: '**'
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- 'docs/**'
- '*.md'
- LICENSE
- .coderabbit.yaml
pull_request:
branches:
- main
Expand All @@ -20,6 +21,7 @@ on:
- 'docs/**'
- '*.md'
- LICENSE
- .coderabbit.yaml
# Everything, and the week's caches saved on main, which pull requests restore.
schedule:
- cron: '0 5 * * 1'
Expand All @@ -35,7 +37,7 @@ env:

jobs:
# Heavy packages get a lane each, the rest one. A change picks its packages and dependents; a file
# outside packages/, apps/, skills/, design/, docs/, root *.md, LICENSE picks all (reach unknown).
# outside packages/, apps/, skills/, design/, docs/, root *.md, LICENSE, .coderabbit.yaml picks all.
scope:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -64,7 +66,7 @@ jobs:
esac
if [ -n "$base" ]; then
changed=$(git diff --name-only "$base" HEAD)
if grep -qvE '^(packages|apps|skills|design|docs)/|^[^/]+\.md$|^LICENSE$' <<< "$changed"; then all=true; fi
if grep -qvE '^(packages|apps|skills|design|docs)/|^[^/]+\.md$|^LICENSE$|^\.coderabbit\.yaml$' <<< "$changed"; then all=true; fi
fi
# pnpm counts a file outside the packages as the root's, whose test script tests them all.
names() { pnpm "$@" ls --depth -1 --json | jq -r --arg root "$PWD" '.[] | select(.path != $root) | .name'; }
Expand Down
8 changes: 7 additions & 1 deletion design/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the packages (the lockfile, a workflow, the root's `package.json`) tests every p
is one of the docs below. The player, the verifier, the skills, the embed package and the learner
journeys take most of the time, so each tests in a job of its own, side by side, and the rest in
one more. Every package that has a `typecheck` script runs it whatever the change, since each
package's check writes the types the next one reads. A change to `design/`, `docs/`, a root `.md` or `LICENSE` alone starts
package's check writes the types the next one reads. A change to `design/`, `docs/`, a root `.md`, `LICENSE` or `.coderabbit.yaml` alone starts
no run. The `scope` job in `ci.yml` decides.

**The costly checks run weekly and by hand.** These are Firefox and WebKit, the player's browser
Expand All @@ -22,6 +22,12 @@ which also runs when `packages/vscode` changes. The slow files are `stalling-hos
publishing the player, run CI by hand on main (`gh workflow run ci.yml`) and publish once it is
green.

**CodeRabbit reviews each pull request against `AGENTS.md` and `design/`.** `.coderabbit.yaml`
skips what `pnpm lint` skips and Dependabot's pull requests, leaves linting to oxlint alone, and
writes nothing into a pull request's description. It reads the file from the pull request's own
branch, so a branch made before a change to it is reviewed without that change until rebased.
`@coderabbitai review` in a comment asks it again.

**A test's time limit is its package's, set once in its config for a slow runner** (#255). A
limit stops a hang; it does not time a test. The author's Node tests ran on vitest's 5 s a test,
and a CI runner builds packages and writes bundles two to four times slower than a laptop: three
Expand Down