Skip to content

Latest commit

 

History

History
117 lines (93 loc) · 6.6 KB

CONTRIBUTING.md

File metadata and controls

117 lines (93 loc) · 6.6 KB

Contributing to Harness Maxxing

Thank you for helping. Harness Maxxing is fair source: the code is public and free to use, and contributions are welcome under the Contributor License Agreement. This guide walks you from an idea to a merged pull request.

1. Open an issue first

  • Bug: open a bug report with the version (maxxing status), what you did, what you expected and what happened (maxxing doctor output helps).
  • Feature or bigger change: open a feature request and wait for a go from a maintainer before writing code. It saves you a pull request that cannot be merged.
  • Small fixes (typo, obvious bug, a test) can go straight to a pull request.
  • Security issue: never a public issue - see SECURITY.md.

2. Fork and branch

  1. Fork the repository on GitHub, then clone your fork: git clone https://github.com/<you>/harness-maxxing.git && cd harness-maxxing
  2. Create a branch from beta named after the change:
    • feat/<short-name> for a feature (feat/telegram-reactions);
    • fix/<short-name> for a bug fix (fix/cron-timezone).
  3. Keep one topic per branch and per pull request.

3. Development setup

Read CLAUDE.md (development rules) and docs/dev/PLAN.md (architecture). The HTTP contract is docs/dev/API.md, the module interfaces docs/dev/INTERNALS.md, the UI rules docs/dev/DESIGN.md: change the contract docs first, then the code.

  • Server (Python >= 3.11, 3.12 recommended, FastAPI, uv):
    cd server && uv sync && uv run pytest
    Tests never touch the real system: they use MAXXING_STATE=/tmp/..., a fake claude (MAXXING_CLAUDE_BIN), MAXXING_SPAWN=direct, MAXXING_CRONTAB_FILE and mocks for Telegram and GitHub (MAXXING_TELEGRAM_API, MAXXING_GITHUB_API). Never point a test at your real crontab, a real Telegram bot or a real install. Unset a PYTHONPATH that points at an installed copy before running the tests.
  • Web UI (React, TypeScript, Vite, Tailwind, Node 22 or newer):
    cd web && npm ci && npm run typecheck && npm run build
  • PC agent (Go), only if you touched pc-agent/:
    cd pc-agent && go test ./...
  • A dev server: MAXXING_STATE=/tmp/hm-dev uv run maxxing serve --port 8801 (each contributor its own port 8801-8809 and its own state folder).

The web/dist rule

The built UI, web/dist, is committed: servers install and update without Node. So when your change touches web/ (sources, i18n, styles), run npm run build in web/ and commit the resulting web/dist in the same pull request. When it does not touch web/, do not commit a rebuilt web/dist.

4. Write the change

  • Code, comments and docs are in English; the UI texts exist in English and French (web/src/i18n/en.ts, fr.ts): add both.
  • Stay product-neutral: no personal data, names, domains, tokens or server paths. Examples use ui.example.com, acme, blog.
  • State writes are atomic (config.write_json); never block the event loop (asyncio.to_thread).
  • Add or update tests for what you change. A bug fix comes with a test that fails without it.
  • When you add or upgrade a dependency (Python, JavaScript or Go), run python3 scripts/third_party_notices.py (after uv sync --extra voice in server/ and npm ci in web/) and commit the updated THIRD_PARTY_NOTICES.md. A new dependency must have a license compatible with the CLA (no GPL / AGPL).
  • Update the user docs page (docs/user/) of every visible change.

5. Changelogs

Every change updates both changelogs, under the top section (## Unreleased when there is one; maintainers set the version at release time):

  • CHANGELOG.md is public: shown in the app ("What's new") and by maxxing update. Write for users: what changes for them, in plain language, no internals. One bullet, a bold first sentence, then one or two short sentences. Example: - **Voice messages sent after a quiet minute are always transcribed.** One sent at that exact moment could wait forever.
  • docs/dev/CHANGES.md is for maintainers: API, data formats, migrations, internals, tests added.

6. Open the pull request

  1. Run the checks of step 3 for the parts you touched; they must pass.
  2. Push your branch and open a pull request to beta (not main). Fill in the template (tests, changelogs, web/dist, CLA).
  3. Sign the CLA: on your first pull request the CLA bot asks you to post this comment once, exactly and alone: I have read the CLA Document and I hereby sign the CLA. Contributing for a company? Sign it on behalf of that entity (see CLA.md). The pull request cannot be merged before (its CLA check stays red).

Commits credit people only: no AI author, no "Generated with" signature, no Co-Authored-By naming an AI (co-authoring people is fine). Once per clone, git config core.hooksPath .githooks turns on the commit-msg hook that refuses them.

7. Review and release

A maintainer, FEU or Romain, reviews the pull request. Expect questions and change requests; push new commits to the same branch. The path of a change:

  1. beta: a maintainer integrates the pull request (full test suite, version number, web/dist rebuilt; a large pull request may be adapted - your authorship is kept). The maintainers run beta on their own servers.
  2. main: once a maintainer has checked the version in real use, main moves to it: it is the release for everyone (stable, the branch installs follow, is a copy of main).

What gets refused

  • a feature without a prior issue agreed by a maintainer, or that does not fit the product (see the non-goals in docs/dev/PLAN.md);
  • changes without tests, failing tests, or without changelog entries;
  • a web/dist that does not match the sources (or a rebuilt web/dist with no web change);
  • personal data, secrets, real domains or server paths in code, docs or tests;
  • tests that touch the real system (crontab, Telegram, a real install);
  • code you do not have the right to submit, or under a license incompatible with the CLA;
  • changes that weaken security defaults (binding to a public interface, disabling checks of downloads or signatures) without a strong reason agreed in an issue;
  • pull requests without a signed CLA.

By contributing you agree to follow the Code of Conduct.