Labels
Point production at a version, read the label history, and set the rules that decide how a label moves.
A label is a name that points to one version of a prompt. Your code pulls a prompt by label, for example get_prompt("support", label="production"). When you move the label to another version, your code gets that version after its next refresh. The SDK keeps a pulled version for 60 seconds by default. The first call after that time starts the refresh, so each process has the new version a little more than one minute after the move. Code that pins a version number does not change.
The prompt page always shows a card for production and one for staging. A card shows the label, the version that it holds and since when, and who moved it. Not set means the label holds no version. A card for any other label shows only while the prompt holds that label.
A card can carry these chips: Gated (a check runs before the label moves), Needs approval (a second person approves each move) and No rule.
Move a label
Open the version
Open the version that you want on the label.
Open the dialog
Click Promote (key P) to move production. To move another label, click Move staging to v4 on its card. The dialog is titled "Promote support v4 to production".
Read the evidence
The dialog shows the version now on the label and the next one, the gate result, the verdict and a summary of What changes in production:. Open the diff opens the compare page.
Confirm
Add an optional Note for the label history, then click Promote to production. Risicare records the move.
If the label has a rule that needs a second person, the button reads Request promotion. See Gate and approvals.
A toast confirms the move. After a move of production, it offers Roll back to v3. If the label moved while the dialog was open, the dialog says so and reads the gate again. A move of a label that the prompt has never held is a first promotion. A first promotion is not gated.
Remove a label
Open Actions for the label production on the card and click Remove the label. Write a reason of 20 to 1,000 characters and click Remove the label. Code that pulls the label then gets an error after the cache time. The SDK keeps the version it pulled last, or uses your fallback.
Label history
The Label history tab lists every move of every label of the prompt, newest first. The History link on a card opens it.
| Column | Meaning |
|---|---|
| When | The time of the move, in UTC. |
| Who | The person who moved the label. For a move that two people made, both names: the person who asked and the person who approved. |
| Label | The label. |
| Move | For example v3 → v4. What changed opens the compare page for the two versions. |
| Kind | First promotion, Promotion, Promotion with override, Rollback or Removal. |
| Evidence | The verdict with its baseline and the number of cases and trials, First promotion, Not gated, Gate passed: no comparison needed, or No evidence: override. |
| Notified | How many webhooks and channels heard of the move: "2 sent", "1 sent, 1 failed", "None sent". Click the count to read each delivery and its reason. |
| Reason | The reason or the note that the person wrote. The newest production row has Roll back to v3. |
Two tables follow the history: Promotion requests and Rollback proposals. See Gate and approvals and Rollback. Show more reads older rows. Before the first move, the tab says "No label has moved yet."
Risicare sends four events for prompts to the webhooks that subscribe to them. See Webhooks.
Label rules
A label rule decides how a label moves. A rule applies to every prompt of the project. A label with no rule moves with no check. Open Settings → Prompt labels to read the rules.
| Column | Meaning |
|---|---|
| Label | The label, and what it means. |
| Rule | The rule in words, for example "Gated. Compared with the version production holds. Must not be Regressed." or "Not gated. A member moves it with no check." |
| Used by | How many prompts hold the label now. |
| Approval | Off, Needs an admin, or Needs a member or an admin. |
| Notify | The channels that hear of a move, or None. |
production and staging have a default rule that nobody saved. The table marks it "Default rule. Nobody saved it yet." By default, production is gated: a comparison must exist, and its verdict must not be Regressed.
A viewer or a member reads the table. An admin or an owner clicks Add a label rule or Edit the rule. A project holds up to 50 rules.
| Field | Meaning |
|---|---|
| Label name | For a new rule. It starts with a lower-case letter, uses lower-case letters, digits, _ and -, and has at most 40 characters. The rule then applies to that label on every prompt. |
| What the label means | Up to 200 characters. It shows on the prompt page. |
| Check a version before the label moves | Turns the gate on. The gate reads the stored comparison. It does not run a new one. |
| Compare with | The version this label holds now, or The version production holds. |
| The verdict must be | Not Regressed, or Improved. |
| Drop in pass rate that the gate allows (points) | 0 to 20, one decimal. 2.0 means a version may pass 2.0 points lower. |
| Evidence at most this old (days) | 1 to 365. Leave it empty to accept evidence of any age. |
| A second person approves each move | See Gate and approvals. |
| Who approves | Shown when the box above is on. A member or an admin, or An admin. |
| A rollback needs approval too | Shown when A second person approves each move is on. The help text reads "A rollback is an emergency path. It needs no approval unless you turn this on." See Rollback. |
| A CI key can move this label | A CI key moves the label only when the gate passes. For production the box is off and cannot be turned on, and the help text reads "A key never moves production. A person does. Only a person moves production." The CI key class is held for the beta, so the box has no effect now. |
| Notify these channels when the label moves | Up to 5 channels. Add channels in Settings → Notifications — see Channels. |
The dialog shows the rule in words before you save it. A saved rule applies to the next move. Remove the rule deletes a saved rule. The label then follows its default: the default rule for production and staging, and no rule for any other label.
If you turn the gate of production off, the dialog warns you first: "Production moves with no check. Code that pulls production gets any version a member saves a label for." Click Turn the gate off to confirm.