Screen what an incident agent may do alone
Your task
An alert fires at 3 a.m., and an agent starts gathering context before the on-call engineer is awake. It proposes actions as it goes, and a screen decides what happens to each one.
Write screen_incident_actions(actions): the rule every proposal from your agent passes through.
actions(list of str): the proposed actions, each writtenkind;target;evidence, for example"rollback;checkout-api;4".evidenceis how many linked pieces of evidence (graphs, log lines, deploys) back the action.- Return one decision per action, in input order:
"auto"(run it now),"confirm"(a person approves it with one click),"suppress"(do not show it) or"block".
Rules, for each action:
- Split on
;. If there are not exactly 3 fields:"block". - Trim whitespace from both ends of all 3 fields, and lowercase the kind. If the target is then empty:
"block". - If the evidence is not one or more digits, 0 to 9 only:
"block". - Then the kind decides:
publish,deleteorpurge:"block", however much evidence it has.read,gatherorquery:"auto".draftorannotate:"auto"with evidence of 1 or more,"suppress"with 0.restart,rollback,scaleorfailover:"confirm"with evidence of 1 or more,"suppress"with 0.- any other kind:
"block".
Then, in a sentence or two: would you ever let it run a rollback without a person? Defend your answer.
Examples
screen_incident_actions(actions: list[str]) -> list[str]Example 1
Input
screen_incident_actions(["read;deploy-history;3", "draft;incident-timeline;2", "rollback;checkout-api;4"])Output
["auto", "auto", "confirm"]Example 2
Input
screen_incident_actions(["draft;hypothesis-list;0", "publish;status-page;5"])Output
["suppress", "block"]Example 3
Input
screen_incident_actions([])Output
[]