Contributing and local validation
This policy applies to humans, Hermes, and Claude (including the Claude Action). Validation belongs in the development checkout before committing. GitHub Actions is a small backup safety net, not a substitute for local checks. These are working agreements, not git hooks or new mandatory workflow jobs.
Choose checks by the change
Section titled “Choose checks by the change”- Every change:
git diff --checkandpython -m ruff check .. - Python/backend behavior: run the affected tests, then the core suite:
python -m pytest core/tests -q -rs -p no:cacheprovider -k 'not mobile'. - JavaScript, web UI, Chrome extension, or ESLint config/dependencies:
npm cithennpm run lint. Ruff does not check JavaScript. - Shell scripts or deployment changes:
git ls-files -z '*.sh' | xargs -0 -r shellcheck --severity=warning. This is static analysis; never execute deployment/reset scripts as a test. - Mobile/responsive UI, editor, or browser interaction changes: run the phone suite using the setup below, as well as relevant backend tests.
- Docs site (
site/, or a doc it shows):npm ci && npm run buildinsite/. The build fails on a link to a missing file. A doc appears on the site once it is listed insite/sync.mjs. - Workflow-only/docs-only changes: inspect the workflow triggers and job guards; validate YAML/workflows (for example with actionlint). Application/browser suites are not needed unless behavior or their test setup changes.
Use Python 3.11+ and an isolated virtual environment. Install test/lint tooling:
python -m venv .venv. .venv/bin/activatepython -m pip install -e './core[test,lint]'Install ffmpeg for media tests and ShellCheck for shell linting using your platform package manager. Use Node 22 and the committed package-lock.json for JavaScript checks. Do not update dependencies just to run validation.
Phone/browser suite
Section titled “Phone/browser suite”In an isolated development environment, with ffmpeg and the Python test extras installed:
npm install -g --no-audit --no-fund playwright@1.62.1playwright install --with-deps chromiumexport AUTOMINER_CHROMIUM="$(NODE_PATH=$(npm root -g) node -e 'console.log(require("playwright").chromium.executablePath())')"python -m pytest core/tests -q -rs -p no:cacheprovider -k mobile --durations=5An existing compatible Chromium may instead be selected with
AUTOMINER_CHROMIUM. Inspect the skip summary: missing Node, Playwright,
Chromium, or ffmpeg is missing coverage, not a passing browser test.
On the memory-limited Pi, run candidate tests unprivileged in an isolated
worktree, keep temporary files on disk (not /tmp), and run browser tests
separately from the core suite. Never point tests at production data or secrets.
Hosted checks and reporting
Section titled “Hosted checks and reporting”- Claude remains on its existing explicit invocation triggers.
- Ruff and core pytest run on PRs, with superseded runs canceled. They do not repeat on pushes to master. Direct-to-master changes therefore rely on local validation; prefer PRs.
- Mobile and Docker are manual-only (
workflow_dispatch), for an explicitly requested hosted run. Do not dispatch them automatically to replace local work. - ESLint and ShellCheck have no standalone hosted workflows; their tools and configuration remain available and must be used locally when relevant.
pr-symptomruns on every PR event and fails a PR that links an issue (Fixes #N,Closes #N) or carries thesymptomlabel but has neither aFixes symptom:line norDoes not fix:as its first line. It runsscripts/operations/pr_symptom_line.py.
In the PR include exact commands, pass/fail results, and any skips or environment blockers. Separate local evidence from hosted CI status. A billing-blocked job has not tested the code. Documentation directs agent behavior; it cannot technically guarantee compliance, so reviewers should check the reported evidence.
A PR that answers a reported symptom
Section titled “A PR that answers a reported symptom”A symptom is what someone reported: an issue, or something Chris told you is broken. A PR that answers one does exactly one of these:
- Shows the symptom gone. Put a
Fixes symptom: <symptom>line in the body (the template puts it first). Under Evidence, give the before and after: a test that reproduces the symptom, failing before the change and passing after, and the production-shaped replay or check that shows it gone there too. - Says it does not fix it. Make the first line of the body
Does not fix: <symptom>. Open the follow-up GitHub issue before merging and link it from the body.
A fix to part of the cause is the second case. Saying so halfway down the body is not enough: the reader takes the title as the fix. The PR template has the line and the sections.