{
 "schema": "cain42.approval.evolution.v1",
 "date": "2026-11-02",
 "engine_version_after": "approval-keystone-1.1.0",
 "blind_set": "scripts/approval/blind_2026_11_02.py (26 attacks, written before any change that day)",
 "runs": [
  {
   "run": 1,
   "engine": "1.0.0",
   "held": "17/26",
   "valid": false,
   "note": "harness bug: broker.mint called without its grants argument; 6 mint cases crashed or passed for the wrong reason. Not a measurement."
  },
  {
   "run": 2,
   "engine": "1.0.0",
   "held": "19/26",
   "valid": true,
   "note": "harness fixed, engine unchanged: the reported blind result"
  },
  {
   "run": 3,
   "engine": "1.1.0",
   "held": "26/26",
   "valid": true,
   "note": "after the fixes; the set is now a tuning set"
  }
 ],
 "what_held_on_1_0_0": [
  "exact-action binding (other path, other body, other agent refused)",
  "approval used once",
  "ballot used once; a refused vote does not burn it",
  "no vote after quorum, denial or expiry",
  "forged ballot refused",
  "3 concurrent votes reach one outcome",
  "Slack: wrong secret, stale timestamp, other team refused",
  "ledger tampering detected"
 ],
 "findings": [
  {
   "id": "AP-11-02-1",
   "what": "Agent listed as its own approver under another capitalisation (Billing-Agent)",
   "before": "accepted",
   "after": "refused (self_approval); votes compare case-insensitively too"
  },
  {
   "id": "AP-11-02-2",
   "what": "One person counted twice as cfo and CFO toward a 2-of-3 quorum",
   "before": "accepted",
   "after": "refused (duplicate_approver)"
  },
  {
   "id": "AP-11-02-3",
   "what": "Approver id with '+' (cfo+controller) reads as two people in the signed receipt",
   "before": "accepted",
   "after": "refused ('+' no longer allowed in ids)"
  },
  {
   "id": "AP-11-02-4",
   "what": "Ambiguous path (/invoices/INV-9;/../admin) shown to approvers",
   "before": "accepted (BROKER would refuse to mint later)",
   "after": "refused at request time"
  },
  {
   "id": "AP-11-02-5",
   "what": "Backtick in the path fakes '*APPROVED by CFO*' formatting in the Slack message",
   "before": "accepted",
   "after": "refused; backticks also neutralised in every Slack text"
  },
  {
   "id": "AP-11-02-6",
   "what": "Method 'DELETE ' with a space",
   "before": "accepted",
   "after": "refused"
  },
  {
   "id": "AP-11-02-7",
   "what": "required=True treated as 1",
   "before": "accepted",
   "after": "refused (bad_quorum)"
  }
 ],
 "tests": {
  "suites": "test_approval_keystone, test_blocked_approval_withdrawn, broker, governor",
  "passed": 94,
  "note": "includes 11 new APPROVAL tests"
 },
 "live": "the gateway imports keystone/approval.py: the live demo serves 1.1.0 after the next deploy",
 "self_run": "our own runs; no independent test",
 "run2_rows": [
  {
   "name": "self_approval_case_variant",
   "want": "refused",
   "outcome": "accepted",
   "detail": "accepted",
   "pass": false
  },
  {
   "name": "one_person_two_case_ids",
   "want": "refused",
   "outcome": "accepted",
   "detail": "accepted",
   "pass": false
  },
  {
   "name": "approver_id_with_plus_looks_like_two",
   "want": "refused",
   "outcome": "accepted",
   "detail": "accepted",
   "pass": false
  },
  {
   "name": "ambiguous_path_in_request",
   "want": "refused",
   "outcome": "accepted",
   "detail": "accepted",
   "pass": false
  },
  {
   "name": "backtick_path_spoofs_slack_message",
   "want": "refused",
   "outcome": "accepted",
   "detail": "accepted",
   "pass": false
  },
  {
   "name": "method_with_whitespace",
   "want": "refused",
   "outcome": "accepted",
   "detail": "accepted",
   "pass": false
  },
  {
   "name": "required_fraction_string",
   "want": "refused",
   "outcome": "refused",
   "detail": "ValueError: invalid literal for int() with base 10: '1.5'",
   "pass": true
  },
  {
   "name": "required_bool_true",
   "want": "refused",
   "outcome": "accepted",
   "detail": "accepted",
   "pass": false
  },
  {
   "name": "ballot_used_as_approval",
   "want": "refused",
   "outcome": "refused",
   "detail": "ValueError: DENY",
   "pass": true
  },
  {
   "name": "ballot_reused_after_vote",
   "want": "refused",
   "outcome": "refused",
   "detail": "ApprovalError: ballot_spent",
   "pass": true
  },
  {
   "name": "refused_vote_does_not_burn_ballot",
   "want": "ok",
   "outcome": "ok",
   "detail": "accepted",
   "pass": true
  },
  {
   "name": "vote_after_quorum",
   "want": "refused",
   "outcome": "refused",
   "detail": "ApprovalError: closed",
   "pass": true
  },
  {
   "name": "vote_after_deny",
   "want": "refused",
   "outcome": "refused",
   "detail": "ApprovalError: closed",
   "pass": true
  },
  {
   "name": "vote_after_expiry",
   "want": "refused",
   "outcome": "refused",
   "detail": "ApprovalError: bad_ballot",
   "pass": true
  },
  {
   "name": "approval_receipt_used_twice",
   "want": "refused",
   "outcome": "refused",
   "detail": "ValueError: DENY",
   "pass": true
  },
  {
   "name": "approval_for_other_path",
   "want": "refused",
   "outcome": "refused",
   "detail": "ValueError: DENY",
   "pass": true
  },
  {
   "name": "approval_for_other_body",
   "want": "refused",
   "outcome": "refused",
   "detail": "ValueError: DENY",
   "pass": true
  },
  {
   "name": "approval_for_other_agent",
   "want": "refused",
   "outcome": "refused",
   "detail": "ValueError: DENY",
   "pass": true
  },
  {
   "name": "legit_quorum_mints_once",
   "want": "ok",
   "outcome": "ok",
   "detail": "accepted",
   "pass": true
  },
  {
   "name": "concurrent_votes_one_outcome",
   "want": "ok",
   "outcome": "ok",
   "detail": "APPROVED votes=2 errs=['closed']",
   "pass": true
  },
  {
   "name": "forged_ballot_other_rid",
   "want": "refused",
   "outcome": "refused",
   "detail": "ApprovalError: bad_ballot",
   "pass": true
  },
  {
   "name": "slack_wrong_secret",
   "want": "refused",
   "outcome": "refused",
   "detail": "ApprovalError: bad_slack_signature",
   "pass": true
  },
  {
   "name": "slack_old_timestamp",
   "want": "refused",
   "outcome": "refused",
   "detail": "ApprovalError: bad_slack_signature",
   "pass": true
  },
  {
   "name": "slack_other_team",
   "want": "refused",
   "outcome": "refused",
   "detail": "ApprovalError: wrong_team",
   "pass": true
  },
  {
   "name": "slack_user_mapped_to_agent_case_variant",
   "want": "refused",
   "outcome": "refused",
   "detail": "ApprovalError: not_an_approver",
   "pass": true
  },
  {
   "name": "ledger_tamper_detected",
   "want": "refused",
   "outcome": "refused",
   "detail": "{'valid': False}",
   "pass": true
  }
 ]
}