Contributing
Thanks for helping improve Gaze. This guide covers how to propose changes, what to test, and what to avoid when working on authentication, PAM, packaging, and docs.
For source builds and component-specific setup, start with the development guide.
Ways to contribute
- Report reproducible bugs with logs, distro version, desktop environment, and the command that failed.
- Improve docs when behavior is unclear, missing, or distro-specific.
- Add focused tests for pure logic, edge cases, and regressions.
- Fix packaging, install, or uninstall issues for supported distributions.
- Improve camera, DBus, CLI, GUI, PAM, or GNOME extension behavior.
Before you start
- Check existing issues and pull requests so work is not duplicated.
- Open an issue or discussion first for large behavior changes, new config keys, packaging policy changes, or authentication flow changes.
- Keep changes small and reviewable. Prefer one bug fix or feature per pull request.
- Do not commit downloaded ML models, face embeddings, local config, package artifacts, or secrets.
Local setup
Clone the repo, install dependencies from the development guide, then run:
just setup-hooks
just --listThe hook setup is local to your clone. CI still runs the required checks for pushes and pull requests.
Workflow
- Create a branch with a short descriptive name.
- Make the smallest correct change.
- Add or update tests when behavior changes.
- Update docs when user-visible behavior, install steps, config, CLI output, or packaging behavior changes.
- Run the relevant checks locally.
- Open a pull request with a clear summary, testing notes, and any manual verification steps.
Required checks
Run these before opening a pull request:
just fmt-check
just lint
just test
just auditIf you changed the Justfile, also run:
just --fmt --checkIf you changed packaging files, scripts, systemd units, DBus policy, PAM integration, or GNOME extension packaging, build at least the affected package format:
just package <deb | rpm | archlinux>Tests
Prefer tests that run in CI without hardware or system services.
Good test targets:
- Config parsing, defaults, and DBus map conversion.
- User database validation, persistence, matching, and error paths.
- Model helper logic that does not download files.
- Alignment, preprocessing, and other pure math or image transforms.
- CLI parsing and display helper behavior.
Avoid CI tests that require:
- A physical camera.
- A running system DBus
gazedservice. - PAM installed into system auth files.
- A graphical session.
- Network access to download model packs.
Use manual test notes for those areas instead.
Manual testing
For daemon changes, stop the installed service and run the local build in the foreground:
sudo systemctl stop gazed
just build-rust
sudo RUST_LOG=debug ./target/release/gazedThen exercise clients against the daemon that owns the system bus:
./target/release/gaze list-faces
./target/release/gaze auth --verbose
./target/release/gaze-guiRestart the installed service when finished:
sudo systemctl start gazedPAM safety
PAM changes can lock you out of authentication flows.
- Keep a second terminal open with an active root shell before editing PAM files.
- Test with a non-critical PAM service first, not
sudo,system-auth, or your graphical login. - Be careful with unsafe FFI in
pam-gazeandpam-gaze-grosshack. - Include exact manual test steps in the pull request.
Docs style
- Write for users first. Put the command they should run before long explanations.
- Mention distro differences when paths or packages differ.
- Use fenced code blocks for commands and config snippets.
- Keep warnings explicit for security, PAM, GDM, and lockout risks.
- Link to nearby pages instead of repeating long setup instructions.
- Do not edit generated files under
docs/.vitepress/dist; edit Markdown or theme files and rebuild docs.
To preview docs locally:
bun run docs:devTo verify the docs build:
bun run docs:buildBug reports
Useful bug reports include:
- Gaze version and install method.
- Distribution and desktop environment.
- Camera source from
gaze configor/etc/gaze/config.toml. - The exact command or flow that failed.
- Relevant logs from
journalctl -u gazed -n 300 --no-pager. - Whether the issue affects CLI auth, GUI enrollment, PAM, GNOME lock screen, or GDM login.
Remove private data before sharing logs.
Pull request notes
In the pull request description, include:
- What changed.
- Why it changed.
- Tests run.
- Manual verification, if hardware, DBus, PAM, GNOME, or packaging behavior was involved.
- Follow-up work or known limitations.