- Narrow runtime guarantee to physical exclusion of private evaluation data from live-quiz. - Mandate recursive Pydantic extra='forbid' across all nested public-contract models. - Specify context-isolated post-hoc evaluation boundary following successful terminal publication. - Clarify that prompt semantic quality and cross-question clues are authoring QA concerns. - Explicitly reject automated semantic leakage pipelines and artificial navigation restrictions. - Reconcile ADR-0004 problem statement, consequences, and threat model.
5.0 KiB
5.0 KiB
ADR-0004: Physical Separation of Questionnaire and Rubric
- Status: Accepted
- Date: 2026-11-10
Context
A core pedagogical invariant of the assessment model is the blind pass: the learner must demonstrate unassisted performance against an invariant standard without receiving private evaluation criteria while completing the assessment. We needed an architectural mechanism to prevent private evaluation data from entering the learner-facing runtime.
Decision
Enforce complete physical and structural decoupling of the assessment specification at the filesystem and contract levels into two distinct artifacts:
questionnaire.json: The public presentation contract containing question IDs, markdown prompts, diagrams, options, and code stubs. Passed directly tolive-quiz.rubric.json: The private evaluation contract containing expected answers, observable criteria (Complete/Partial/Insufficient), failure mode diagnoses, and misconception signatures. Retained outsidelive-quizand supplied exclusively to the post-hoc evaluator after terminal publication.
flowchart TD
QD["Quiz Designer"]
QD --> Q["questionnaire.json"]
QD --> R["rubric.json"]
Q --> LQ["live-quiz"]
LQ --> A["attempt.json"]
R --> E["Evaluator"]
A --> E
E --> EV["evaluation.json"]
style R stroke:#d97706
Architectural Safeguards & Boundaries
- Physical Runtime Separation:
questionnaire.jsonis the only assessment-definition artifact accepted bylive-quiz. No supported CLI option, configuration parameter, API, or runtime code path allowsrubric.jsonor its contents to enter the engine. Private evaluation data is never transmitted to the browser or exposed in the learner-facing tutoring context before assessment conclusion. - Recursive Structural Contract Separation & Pydantic Inheritance:
The public and private specifications are maintained as separate Pydantic models. Because Pydantic v2 does not automatically propagate
model_config = ConfigDict(extra="forbid")across nestedBaseModelboundaries, root-level configuration alone is insufficient. Every public-contract model at every nesting depth (including root questionnaire, question models, option objects, and input blocks) must explicitly inherit from a shared strict base model (e.g.StrictBaseModel) configured withextra="forbid"or declareextra="forbid"directly. Contract test suites must enforce negative validation tests asserting that unexpected evaluation properties are rejected at multiple nesting levels. - Context-Isolated Post-Hoc Evaluation:
quiz-evaluatoroperates purely asf(\text{rubric.json}, \text{attempt.json}) \to \text{evaluation.json}and receivesrubric.jsonandattempt.jsononly after successful terminal publication. The evaluator receives zero conversational history, tutor notes, or learner-profile context. The Tutor subsequently usesevaluation.jsonduring the debrief. - Ergonomic Presentation & Explicit Non-Goals:
live-quizretains its standard one-question-at-a-time presentation for cognitive ergonomics, but does not impose navigation locking or anti-backtracking mechanisms solely for security. Furthermore, the system explicitly rejects automated LLM-based semantic leakage detection or cross-question answer-leakage graph analysis; semantic prompt quality remains an authoring responsibility.
Alternatives Considered
- Single Unified Assessment JSON with Runtime Filtering: Rejected. Passing a single file containing both questions and answer keys creates a severe risk of accidental solution leakage through permissive API routes, serialization bugs, or client-side inspection.
- Automated Semantic Leakage Detection Pipelines: Rejected. Introduces substantial LLM latency and coordination overhead for a personal formative assessment tool where prompt clarity is an authoring design concern.
Consequences
- Positive: Physical exclusion of the private rubric artifact from the engine and structural rejection of undeclared evaluation properties in the public questionnaire; the runtime cannot expose private rubric data it never receives through browser DevTools, API inspection, or network monitoring (though this does not prevent semantically equivalent information from appearing in public questionnaire content); clean, testable separation between assessment execution and post-hoc grading.
- Engineering Guarantee & Scope Boundary: Physical separation guarantees that the
live-quizruntime does not receive or expose private evaluation data. It does not guarantee that public questionnaire content authored by an LLM or human is semantically free of answers, clues, or cross-question leakage. Host-level inspection of local files or process memory remains outside the formative assessment threat model.