{
 "use_case": "oral-assessment",
 "title": "Oral assessment: a synthetic statistics viva with a leading question",
 "about": "A short synthetic intro-statistics viva in which the student gives partly correct answers and agrees with a leading question from the examiner (that a p-value is the probability the null is true). The scorer must score all six rubric criteria with cited lines, give low marks where the answers are wrong or vague, flag the leading question, and seal a signed draft; an examiner's review with one override must verify, and an edited override reason must be caught.",
 "licence": "Synthetic: a viva script written for Decosa (no real student or examiner) and the built-in intro-statistics rubric. Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {
   "file": "inputs/rubric-intro-stats-viva.json",
   "what": "The rubric: questions, and per criterion the text of each level (0 to 3) and key terms. Your own rubric must have the same shape (GET /oral/rubrics/intro-stats-viva)."
  },
  {
   "file": "inputs/viva-transcript.json",
   "what": "The transcript as a list of {role: examiner|candidate, text}, one line per turn. Your own transcripts can also be plain text with Examiner:/Student: prefixes (send it as \"transcript\")."
  }
 ],
 "steps": [
  {
   "id": "score",
   "method": "POST",
   "path": "/oral/score",
   "timeout": 240,
   "body": {
    "rubric": {
     "$file": "inputs/rubric-intro-stats-viva.json"
    },
    "lines": {
     "$file": "inputs/viva-transcript.json"
    },
    "stream": false,
    "title": "Rehearsal: intro statistics viva, partial answers"
   }
  },
  {
   "id": "review",
   "method": "POST",
   "path": "/oral/review",
   "body": {
    "draft": {
     "$ref": "score.draft.record"
    },
    "examiner": "Rehearsal examiner (fictional)",
    "decisions": [
     {
      "criterion": "q1-definition",
      "action": "confirm"
     },
     {
      "criterion": "q1-misreading",
      "action": "confirm"
     },
     {
      "criterion": "q2-interpretation",
      "action": "confirm"
     },
     {
      "criterion": "q2-width",
      "action": "confirm"
     },
     {
      "criterion": "q3-confounding",
      "action": "confirm"
     },
     {
      "criterion": "q3-design",
      "action": "override",
      "level": 2,
      "reason": "Rehearsal: the examiner reads the longer study as a design proposal and gives a 2."
     }
    ]
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/oral/verify",
   "auth": false,
   "body": {
    "bundle": {
     "$ref": "review.bundle"
    }
   }
  },
  {
   "id": "tampered",
   "method": "POST",
   "path": "/oral/verify",
   "auth": false,
   "body": {
    "bundle": {
     "$ref": "review.bundle"
    }
   },
   "tamper": {
    "at": "bundle.review.entries[kind=decision,action=override].text",
    "set": "Edited after signing."
   }
  }
 ],
 "checks": [
  {
   "says": "all 6 rubric criteria get a draft score",
   "path": "score.draft.summary.scored",
   "equals": 6
  },
  {
   "says": "the wrong p-value definition scores 0 or 1",
   "path": "score.draft.scores[criterion=q1-definition][0].level",
   "in": [
    0,
    1
   ]
  },
  {
   "says": "agreeing with the misreading (the null is probably true) scores 0 or 1",
   "path": "score.draft.scores[criterion=q1-misreading][0].level",
   "in": [
    0,
    1
   ]
  },
  {
   "says": "the vague 'bigger study' design scores 0 or 1",
   "path": "score.draft.scores[criterion=q3-design][0].level",
   "in": [
    0,
    1
   ]
  },
  {
   "says": "the interval-width score cites the student's answer (line 6)",
   "path": "score.draft.scores[criterion=q2-width][0].evidence.n",
   "any_equals": 6
  },
  {
   "says": "the interval-width answer (larger sample, narrower interval) scores 2 or 3",
   "path": "score.draft.scores[criterion=q2-width][0].level",
   "in": [
    2,
    3
   ]
  },
  {
   "says": "the examiner's leading question at line 3 is flagged",
   "path": "score.ready.leading[n=3]",
   "count_min": 1
  },
  {
   "says": "the signed draft record passes the server's own check",
   "path": "score.draft.record_check.ok",
   "equals": true
  },
  {
   "says": "the review bundle (draft + examiner decisions, one override) verifies",
   "path": "verify.ok",
   "equals": true
  },
  {
   "says": "a bundle with the override reason edited no longer verifies",
   "path": "tampered.ok",
   "equals": false
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed"
  }
 ]
}
