Verdict policy
A putnami.verdict-policy.json file decides what each gap costs a change, and
which declaration changes wait for an owner.
Status: available for runs on hosted CI. A run your own CI reports with
putnami observe --upload reads no policy file: its gaps and declaration
changes keep the defaults below.
There is no setting in the app: the rules live in your repository, next to the code they govern, and change through a pull request like the code.
What a file says
{
"$schema": "https://putnami.dev/schemas/putnami-verdict-policy.json",
"gaps": {
"no-requirement": "block",
"lost-proof": { "modeled": "accept", "live-verified": "block" }
},
"declarations": { "adr": "never", "spec": "when-weakening" }
}| Key | Values | What each value does |
|---|---|---|
gaps.<kind> |
inform, accept, block |
inform lists the gap for information; accept waits for a person who accepts it; block makes it a gap nobody can accept |
declarations.<kind> |
always, when-weakening, never |
always waits for an owner; when-weakening waits only when the change weakens the declaration, or when Putnami could not judge it; never does not wait |
The gap kinds:
| Kind | The gap |
|---|---|
no-requirement |
A project the change touches declares no requirement. |
unproven-requirement |
A requirement no test proves. |
lost-proof |
A requirement proven on main and not in this change. |
unknown-requirements |
Putnami could not read the requirements of a project. |
unknown-impact |
Putnami could not read which projects the change touches. |
unknown-declarations |
Putnami could not read which declarations the change modifies. |
The declaration kinds are spec, baseline, binding (a
putnami.features.json or features/*.json), adr, decisions,
architecture, ci and owners.
A value can depend on the feature's maturity: an object from a maturity to a
value, which holds modeled. The highest key the feature's target reaches
applies. The target is the one the feature's binding states, never the
maturity its evidence earned: a lost proof lowers the earned maturity, and
would loosen the rule meant to catch it. A change that lowers a target
loosens nothing in that change; one that raises it tightens at once.
Where the files sit, and which one decides
A file sits at the root of the repository, in a scope directory or in a project directory.
- A project's gaps read the files from the project's directory up to the root.
- A declaration reads the files from its own directory up.
unknown-impactandunknown-declarationsconcern the whole change: only the root file sets them.- The nearest file that names a key decides. A
lost-proofgap with nolost-proofrule reads theunproven-requirementrule. - A key no file names keeps the default: a gap waits for a person, and a
declaration change waits for its owner. On a run your own CI reports with
no spec verification record, as on a repository without a Putnami
workspace, the
no-requirementandunknown-declarationsgaps inform instead.
Some gaps inform whatever the files say: a gap of a project the change only
reaches, a proof the run did not read, and the no-requirement gap of a
project whose putnami.json declares featureAuthority.
Who sets it
Putnami reads the files at the base of your pull request, never at its head:
a pull request never applies its own rules. A change to a
putnami.verdict-policy.json is itself a declaration. It always waits for an
owner of its directory: a person the base's CODEOWNERS file names for it,
approving on GitHub, or a workspace admin approving on the change page. It
weakens when it can make a change cost less: a rule removed, a value lowered
at some maturity, or a rule added below the strictest value.
So the people who own a directory decide what its changes must prove, and a change cannot lower its own bar. In the merge queue, an approved policy change ahead in the line governs the entries behind it.
What the check says
- A blocked gap shows under Gaps: "It cannot be accepted:
<file>blocks it." The title says "Blocked: N gaps cannot be accepted": change the code, or the policy file on the default branch. - An acceptance skips a blocked gap, and an acceptance given before does not count.
- A gap or a declaration change the policy lets inform shows under For information, with the file that decides.
GET /v1/workspaces/{workspace}/runs/{run}/verdict/acceptances lists, in
information, each gap that waits for nobody and why, your verdict policy
included.