POLIS is a deterministic software-delivery protocol and Go CLI for evidence-driven validation, packaging, inspection, and transactional application of code changes.
Go module: github.com/MarcosAlves90/polis/v5.
V5 keeps the V4 exact-baseline and exact-target-tree model and strengthens the consumer trust boundary. Authority remains separated into:
guide/— engineering workflow, scope, safety, and evidence obligations.spec/— machine contracts for package bytes, schemas, evidence, status, integrity, and application semantics.cmd/polis+internal/— deterministic Go reference implementation.
With Go 1.23+ and Git installed:
go install github.com/MarcosAlves90/polis/v5/cmd/polis@latest
Then run polis doctor. See the installation guide for OS-specific PATH instructions.
polis doctor [--format text|json]
polis init --repo /path/to/repo
polis capture-red --repo /path/to/repo --contract /outside/change.json --out /outside/regression.patch
polis build --repo /path/to/repo --project project-slug --change change-slug --contract /outside/change.json --regression-patch /outside/regression.patch --out /path/to/output
polis verify [--format text|json] [--signature artifact.polis.sig --trusted-key public.pem] artifact.polis
polis inspect [--format text|json] [--signature artifact.polis.sig --trusted-key public.pem] artifact.polis
polis preflight --repo /path/to/repo [--format text|json] [--signature artifact.polis.sig --trusted-key public.pem] artifact.polis
polis apply --repo /path/to/repo [--format text|json] [--signature artifact.polis.sig --trusted-key public.pem] artifact.polis
polis sign --key private.pem --out artifact.polis.sig [--format text|json] artifact.polis--regression-patch is required only for defect Change Contracts. preflight never applies the payload and a later apply always validates again.
- package format v3, still exactly seven regular members under
polis/; - Project Policy schema v3, with explicit command environments;
- Change Contract schema v2, with
scope.allowed_paths; - Evidence v2 stores bounded-output byte counts and SHA-256 digests rather than raw stdout/stderr;
- detached Ed25519 signatures authenticate exact
.polisbytes when the consumer supplies a trusted public key; - coverage adapters:
go-coverprofile-v1,lcov-v1, andcobertura-v1; - exact Git baseline and target tree remain mandatory;
- consumer validation remains isolated and
applypreservesHEADand the real index; - project-wide line coverage remains strictly greater than 80% unless project policy requires more.
V5 can read Project Policy v2 and Change Contract v1 to support migration from V4. New polis init output uses the stronger V5 schemas.
The verifier treats .polis bytes as untrusted input. V5 bounds archive size, total uncompressed content, individual contract/evidence/patch members, and NDJSON event lines. Runtime stdout/stderr retention is limited to 1 MiB per stream while digesting all received bytes.
Change Contract v2 scopes are checked from the Git base-to-target path set. . authorizes the full repository; directory entries ending in / authorize that prefix; other entries authorize an exact path. Rename source and destination are both checked.
polis sign produces a detached signature. The signature signs SHA-256 of the exact artifact bytes with Ed25519. The .polis package never chooses its own trusted key; verify, preflight, and apply only authenticate when the consumer supplies both --signature and --trusted-key.
Automation-oriented commands use these stable categories:
0PASS2usage error3invalid artifact/signature4blocked environment5baseline mismatch6validation failure7apply failure
Repository-owned GitHub Release publication is available through scripts/github-release.sh. It resolves the standard gh from PATH by default and accepts POLIS_GH or --gh when an explicit GitHub CLI executable is required.
Run preflight first:
./scripts/github-release.sh --tag v5.0.0Remote mutation requires an explicit --publish. See the GitHub Release guide for tag safety, release notes, optional assets, SHA-256 verification, and immutable-release attestation checks.
The existing local SonarQube workflow remains available:
export SONAR_TOKEN='your-token'
./scripts/sonar-local.shSee POLIS Specification v2, SDD-0023, and CHANGELOG.md.
