Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Submit a pull request

This page takes a change from the issue to the merge.

Before you begin

Three rules apply to every contribution.

  • Do not contribute code or knowledge obtained by reverse engineering proprietary software. Code from open-source projects may be reused only under a licence compatible with GPL-3.0, and must be credited.
  • All contributions are licensed GPL-3.0-or-later. You sign off every commit to certify the Developer Certificate of Origin. There is no contributor licence agreement.
  • Reviews talk about code, not about people. The code of conduct applies to issues, pull requests and reviews.

Report security problems privately, as described in SECURITY.md. For ordinary bugs see Report a bug.

Read the architecture decision for the area you are about to change. If the decision is wrong, propose a new record.

Follow the workflow

  1. Open an issue or pick one, and say in it that you are working on it.
  2. Create a branch from main.
  3. Make the change. Keep the pull request to one feature or one fix. A protocol change touches proto/, the Rust side and the Kotlin side in the same pull request, so that the two sides on main never disagree. See Add or change a protocol feature.
  4. Update the documentation and the changelog.
  5. Run the checks locally.
  6. Commit with a Conventional Commits message and a sign-off.
  7. Push and open the pull request against main. Fill in the template.
  8. Wait for CI and for the review. Push further commits to the same branch to answer review comments.

Run the checks locally

CI runs one workflow per part of the repository, and only when a pull request touches its paths. Run the same commands before you push.

Desktop

Runs for changes under desktop/ or proto/ (.github/workflows/desktop.yml), on Ubuntu 24.04 with the latest stable Rust.

cd desktop
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

CI sets RUSTFLAGS="-D warnings" for all three steps, so a compiler warning fails the build. To reproduce that locally:

RUSTFLAGS="-D warnings" cargo test --workspace

The system packages CI installs first are listed in Set up a development environment.

CI does not build the mock feature of tether-gtk. If you changed the Backend trait or the fake daemon, also run:

cargo clippy --workspace --all-targets --features tether-gtk/mock -- -D warnings
cargo test --workspace --features tether-gtk/mock

Android

Runs for changes under android/ or proto/ (.github/workflows/android.yml), with JDK 21 (Temurin), platforms;android-35 and build-tools;35.0.0.

cd android
./gradlew --no-daemon --stacktrace :app:testDebugUnitTest :app:assembleDebug

CI uploads the debug APK and the test reports as artefacts of the run.

Documentation

Runs for changes under docs/, to book.toml or to CHANGELOG.md (.github/workflows/docs.yml). Run from the repository root:

python3 docs/tools/check_links.py
mdbook build

Write documentation shows how to install mdBook. Test your changes covers the fake phone and the device checklists.

Write commit messages

The project uses Conventional Commits:

type(scope): summary
PartValues
Typefeat, fix, docs, refactor, test, build, ci, chore, perf
Scopethe part of the repository, such as proto, core, tetherd, gtk, cli, android, packaging, docs

The history also uses desktop for a change that spans several Rust crates and release for the release commit (chore(release): 0.4.1).

A breaking protocol change adds ! after the scope and a BREAKING CHANGE: footer that says what breaks.

feat(android): forward RemoteInput replies for MessagingStyle notifications

Maps NotificationActionRequest.reply_text onto the action's RemoteInput and
fires the PendingIntent. Closes #42.

Signed-off-by: Jane Doe <jane@example.com>

Add the sign-off with -s:

git commit -s

Git appends Signed-off-by: Your Name <you@example.com> from your user.name and user.email. If you forgot it on the last commit:

git commit --amend -s --no-edit

Describe the pull request

Fill in every part of the pull request template.

  • What and why: what changes and which problem it solves. Link the issue (Closes #123), and the ADR if the behaviour follows from one.
  • How it was tested: the commands you ran. If you tested on hardware, give the phone model, Android version and OEM skin, desktop distribution and session (X11 or Wayland). State what you did not test.
  • Screenshots for user interface changes. Take desktop screenshots with the fake daemon (--mock) or with demonstration data only. Never attach a picture that shows a real person’s name, number, message, photo or device identifier.
  • Security note, for a new Android permission, a new exported component or a new D-Bus method: who can call it and what it can do.
  • The checklist: sign-off, checks passed, protocol changes complete on both sides, documentation and changelog updated.

Update documentation and the changelog

A pull request that changes behaviour changes the pages that describe it.

Get it reviewed and merged

  • CI must be green.
  • One approving review from a maintainer is required.
  • The maintainer squash-merges the pull request. Commits are kept when the history is meaningful, for example a contract commit followed by one commit per stack.
  • The maintainer cuts releases: see Package and release.

Record an architecture decision

Anything that is expensive to reverse gets an architecture decision record (ADR): the shape of the protocol, cryptography, a platform mechanism, a dependency on a system service, a packaging format, the licence. Small implementation choices need only a code comment or a line in the pull request.

  1. Copy the template to docs/adr/NNNN-short-title.md, where NNNN is the next free number:

    cp docs/adr/0000-adr-template.md docs/adr/<NNNN>-<short-title>.md
    
  2. Fill in Context (with the research and its sources), Decision, Consequences and Alternatives considered. Set the status to proposed.

  3. Open a pull request. The discussion happens there.

  4. Before the merge, set the status to accepted. Add the row to the table in docs/adr/README.md and the page to docs/SUMMARY.md. If the decision changes the plan, update the roadmap.

The statuses are proposed, accepted, deprecated and superseded by ADR-NNNN.

To change an accepted decision, write a new ADR that supersedes it and set the old record’s status to superseded by ADR-NNNN with a link. Do not rewrite an accepted record beyond typing corrections and cross-links. An addition that keeps the decision is recorded as a dated amendment at the end of the record and in its status (accepted (amended 2026-11-15)).