Skip to content

Contributing

Localgauge is an experimental measurement project. Preserve result numbers and provenance unless a new run intentionally replaces a result. Keep pull requests focused.

Before a pull request

From the repository root, run:

python3 -m unittest discover
python3 scripts/check_home_paths.py
bash -n profiles/pi-local/pi-local
bash -n scripts/pre-push-public-privacy
node --check bench/pi_fetch_capture.cjs

Keep machine-specific home prefixes out of committed JSON. Add a regression test when changing serialization, redaction or capture handling.

Regenerate the social preview

The site social-preview asset is generated from docs/assets/social-preview.svg with ImageMagick:

python3 scripts/render_social_preview.py

Run this after changing the source. Commit the SVG and rendered docs/assets/social-preview.png together. The PNG must remain 1280×640 and under 1 MB.

Optional private-term pre-push hook

The repository includes an opt-in privacy hook. Point it at a denylist outside the repository, then install it as your Git pre-push hook:

export LOCALGAUGE_PUBLIC_DENYLIST=/absolute/path/outside/the/repository
ln -s "$(pwd)/scripts/pre-push-public-privacy" .git/hooks/pre-push

The hook blocks absolute home paths and configured terms in tracked files. It does not print the list. Keep the list private and uncommitted.

Reporting a security issue

Report security-sensitive findings privately through the security policy.