pub enum Decision {
Allow,
Deny(String),
Blocked(String),
}Expand description
The decision an approver hands back for one pending call.
Two ways to say no, and the difference is load-bearing rather than
cosmetic. The learning miner keys on the exact string "Denied by the user:" to find corrections worth learning from, so a refusal that no
human made must not wear that label. Blocked is the machine’s no — a
permission mode, a policy, a remote prompt nobody answered — and the loop
renders it as "Blocked by policy:", joining "Blocked by a hook:" in
the family of refusals the miner ignores.
Without the split, a read-only run’s refusals and a 2am approval nobody was
awake to answer both become training data attributed to a user who never
spoke. It is the same mistake as mining a publish’s changed path as a voice
correction, and it was live in ModeApprover until a Slack approver needed
to express “nobody answered” and found there was no way to.
Variants§
Allow
Deny(String)
A human said no. The reason is passed to the model so it can pick another approach — and it is mined as a correction.
Blocked(String)
Machine policy said no, and no human was consulted. Never mined.