Required:
- Go 1.25+
- Git
make
Recommended:
golangci-lintjqfor inspecting JSON reports and fixtures- a JSON Schema-aware editor
- macOS or Linux for daemon and hook integration tests
git clone https://github.com/privometry/privometry-oss.git
cd privometry-oss
go version
make test
make check-generated
make buildSome tests open Unix and TCP loopback sockets or exercise launchd/systemd plans. Run them in an environment that permits local sockets. Service tests use fakes and should not modify the developer's actual service configuration.
| Target | Purpose |
|---|---|
make all |
Vet, test, and build |
make build |
Build four release binaries into bin/ |
make test |
Run all Go tests |
make race |
Run tests with the race detector |
make lint |
Run go vet and golangci-lint when installed |
make fmt |
Format Go source with simplification |
make tidy |
Update module requirements |
make generate |
Regenerate Go contract types and signed vectors |
make check-generated |
Fail when generated Go types are stale |
make definitions |
Build the adapter and detector pack sets in dist/; KEY=... NAME=... signs them |
make hook-recorder |
Build the development-only hook payload recorder |
make clean |
Remove bin/ and dist/ |
- Code in
internal/is private to this module. adapter-defs,rulepacks,detectorpacks, andui/timeline-webembed release data.specs/is the public compatibility boundary and must remain language-neutral.- CLI packages should coordinate components; business rules belong under
internal/. - OS-specific behavior belongs in
internal/platformor files with Go build suffixes.
- Edit the versioned schema and its changelog.
- Add at least one valid and one invalid example.
- Update semantic or OpenAPI tests.
- Run
make generate. - Run
make check-generatedandmake test. - Coordinate the matching Java contract generation.
- Add facts or intent extraction tests.
- Update compiler and engine tests.
- Add rule-pack test cases.
- Test an explanation through
privometry policy test. - Document changes that affect policy authors.
- Update
adapter-defs/<agent>.yaml. - Add real but sanitized fixtures under
test/fixtures/. - Validate paths, tool mappings, hook requests, and response templates.
- Exercise guard install/uninstall round trips.
Never point experimental binaries at production user state. Use a temporary home:
export PRIVOMETRY_HOME="$(mktemp -d)"
./bin/privometrydUse synthetic fixtures only. Raw hook payloads may contain source code, commands, paths, or secrets.
- Tests cover malformed and unavailable-dependency paths.
- Redaction occurs before persistence or upload.
- File and socket permissions remain user-only.
- Generated files are current.
- No secrets, databases, logs, or diagnostic archives are committed.
- Wiki, README, command help, and schemas agree.