Verdict policy
This page lists the keys of putnami.verdict-policy.json, the file that decides what each gap costs a change and which declaration changes wait for an owner.
The policy applies to 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. The policy decides what blocks a change. It never changes the verdict itself. See Verdict and decisions.
The rules live in your repository next to the code they govern. They change through a pull request. There is no setting in the app.
Example
{
"$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" }
}Keys
| Key | Values | What each value does |
|---|---|---|
gaps.<kind> |
inform, accept, block |
inform lists the gap and blocks nothing. accept blocks until a person accepts it. block blocks, and nobody can accept it. |
declarations.<kind> |
always, when-weakening, never |
always waits for an owner. when-weakening waits when the change weakens the declaration, or when Putnami could not judge it. never does not wait. |
Gap kinds
| Kind | The gap | Accepted |
|---|---|---|
no-requirement |
A project the change touches declares no requirement. | Once for the repository and project, until main no longer carries the gap |
unknown-requirements |
Putnami could not read the requirements of a project. | Same |
unproven-requirement |
A requirement no test proves. | Same |
lost-proof |
A requirement proven on main and not in this change. |
For the head commit |
weakened-proof |
A test that proves a requirement is edited or deleted, while the requirement's declaration stays as it is. | For the head commit |
unknown-impact |
Putnami could not read which projects the change touches. | For the head commit |
unknown-declarations |
Putnami could not read which declarations the change modifies. | For the head commit |
A new push, or the merge commit, asks again for a per-commit acceptance. An acceptance carries to a new head of the same pull request when what the person judged did not change. It never carries across pull requests. Only a workspace admin accepts a gap. A declaration that waits for approval (unapproved-declaration) is never accepted: only an approval clears it.
Declaration kinds
The declaration kinds are spec, baseline, binding (a putnami.features.json or features/*.json file), adr, decisions, architecture, ci and owners.
A change to a putnami.verdict-policy.json is itself a declaration. It always waits for an owner, and no policy sets that.
Values by maturity
gaps.lost-proof, gaps.unproven-requirement, declarations.spec and declarations.binding accept an object instead of one value. Its keys are maturities, from lowest to highest: modeled, coded, wired, default-on, live-verified, design-partner-proven, ga. The object must hold modeled. The highest key that 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 that would loosen the rule meant to catch it. A change that lowers a target loosens nothing in that change. A change that raises it tightens at once.
Which file decides
A file sits at the root of the repository, in a scope directory or in a project directory.
| Rule | Detail |
|---|---|
| Gap of a project | Reads the files from the project's directory up to the root. |
| Declaration | Reads the files from its own directory up. |
unknown-impact, unknown-declarations |
Concern the whole change. Only the root file sets them. |
| Nearest file | The nearest file that names a key decides. A lost-proof gap with no lost-proof rule reads the unproven-requirement rule. |
| Key no file names | A gap waits for a person. A declaration change waits for its owner. |
weakened-proof no file names |
Informs. An edited test waits for nobody. A deleted test always waits for a person, even when a file says inform, unless a file blocks it. A file that sets accept makes an edited test wait. |
| Run with no spec verification record | On a run your own CI reports, as on a repository without a Putnami workspace, no-requirement and unknown-declarations inform. |
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 policy file 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 counts as weakening 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.
In the merge queue, an approved policy change ahead in the line governs the entries behind it.
What the check says
| You see | Meaning |
|---|---|
Under Gaps: "It cannot be accepted: <file> blocks it." The title says "Blocked: N gaps cannot be accepted". |
The policy blocks the gap. Change the code, or change the policy file on the default branch. |
| An acceptance given before does not count. | An acceptance skips a blocked gap. |
| Under For information, with the file that decides. | The policy lets the gap or declaration change inform. |
GET /v1/workspaces/{workspace}/runs/{run}/verdict/acceptances lists, under information, each gap that waits for nobody and why, your verdict policy included.
Review findings are not gaps and this file does not set them. The blocking threshold for open findings is a setting of the review. See Set up review.