21. A sign-off is a test run, with a scope of its own
Context
Section titled “Context”The plan for v0.5 (milestone) lets a policy require evidence from a person:
a product owner who tries a version in staging and signs it off, or a tester who runs a manual
check. Today a policy can require a kind such as uat, but anything that sends a uat report
satisfies it, and the pipeline that deploys a version is the one that sends the reports
(0006). A green uat suite from CI is not a person saying “I tried it”.
Two choices are costly to change once people use them: where a sign-off is stored and judged, and who
is allowed to give one. A new token scope is a value in a PostgreSQL enum (token_scope, in
apps/server/src/db/schema.ts), and a policy field is part of files that teams keep in their
repositories (0014).
Decision
Section titled “Decision”-
A sign-off is a test run. It has a kind (any kind, such as
uatormanual), a version, an environment, one test with an outcome (passorfail), and a note. It is stored with the other test runs and judged by the same rules:deployed(the signed-off version must be the one deployed when it was given),maxAge, and the rule that the latest run of a kind counts. A sign-off can be given again: the earlier one is kept, and the latest one counts. There is no second kind of evidence, no second table to join in the verdict, and no second set of reasons to explain. -
It needs its own token scope,
signoff, separate fromingest,policyandoverride(0007). The scope is added to thetoken_scopeenum; existing tokens and their rows don’t change. Asignofftoken can be limited to components and environments, and has a name, which is recorded as the author until Kollaudo has users (0017, 0018). The verdict endpoint accepts it, next toreadandingest, so thatkollaudo signoffprints the verdict that follows with the same token. This is new: anoverridetoken can’t ask for verdicts. -
A policy lists the kinds that need a sign-off, in the rule, next to
require:environments:staging:require: [e2e, smoke]signoff: [uat]A kind in
signoffcounts only from a run sent with asignofftoken. Auatrun sent with aningesttoken is kept, and shown, but doesn’t satisfy it, and the verdict says that the kind is waiting for a sign-off. A kind insignoffdoesn’t also need to be inrequire, and if it is in both,signoffwins: the kind counts only from asignofftoken. A sign-off with outcomefailmakes the verdictfail; a missing one makes itunknown(0013). -
The API says what a sign-off is.
POST /v1/signoffscreates one,GET /v1/signoffslists them, andkollaudo signoffcalls the first. Everywhere a verdict names a run, a sign-off shows its author, time and note. -
It is not an override (0018). An override lets a version through without evidence and expires; a sign-off is evidence that a person gave, and the policy still decides what it is worth.
Consequences
Section titled “Consequences”- Policies can ask for a person’s word, and a pipeline can’t give it for them: the scope, not the kind name, is what separates the two.
- Everything that already works on test runs works on sign-offs: limits, the record of who sent it,
the verdict log,
maxAge,deployed. - Test runs get a marker that tells a sign-off from a report, and its note: a migration, which
pnpm --filter @kollaudo/server db:generateproduces. Adding a value to a PostgreSQL enum can’t be taken back, so the namesignoffis fixed once released. signoffis a new field of the policy format. Older servers reject a file that has it, because rules don’t allow unknown fields, so teams update the server before the policy.- Whoever holds a
signofftoken can sign off anything within its limits. As withoverride, it should be held by people, not pipelines, and limited, until users and roles replace tokens. - Sign-offs are given with tokens, so only by people who can use a terminal or a webhook. Giving them in the UI waits for users and roles.