← Files KaTeX Error FixerARCHIVED FILE
skills/math-content-integrity/scripts/math-contract-fixtures.json
9.42 KB · Oct 5, 2026 · 18:35 UTC
[
{
"id": "currency-basic",
"regressionKind": "known-false-positive",
"sourceReference": "Regression fixture: literal-currency control class",
"sourceEvidence": "The approved source marks 84 as a literal price.",
"input": "The fee is $84.",
"expected": "valid",
"issues": [],
"segments": [
{
"type": "text",
"value": "The fee is "
},
{
"type": "currency",
"value": "$84"
},
{
"type": "text",
"value": "."
}
]
},
{
"id": "inline-inequality",
"regressionKind": "known-defect",
"sourceReference": "Regression fixture: currency-versus-math misclassification class",
"sourceEvidence": "The approved source provides an explicit inline equation.",
"input": "Assume \\(0 < z < 10\\).",
"expected": "valid",
"issues": [],
"segments": [
{
"type": "text",
"value": "Assume "
},
{
"type": "math-inline",
"latex": "0 < z < 10"
},
{
"type": "text",
"value": "."
}
]
},
{
"id": "numeric-math",
"regressionKind": "known-defect",
"sourceReference": "Regression fixture: numeric-expression misclassification class",
"sourceEvidence": "The approved source typesets the numeric sequence as an inline expression.",
"input": "The ordered values are \\(28, 20\\).",
"expected": "valid",
"issues": [],
"segments": [
{
"type": "text",
"value": "The ordered values are "
},
{
"type": "math-inline",
"latex": "28, 20"
},
{
"type": "text",
"value": "."
}
]
},
{
"id": "mixed-currency-math",
"regressionKind": "known-defect",
"sourceReference": "Regression fixture: mixed currency and math class",
"sourceEvidence": "The approved source identifies the price as currency and the inequality as math.",
"input": "At $7,000, solve \\(2x - 6y > 12\\).",
"expected": "valid",
"issues": [],
"segments": [
{
"type": "text",
"value": "At "
},
{
"type": "currency",
"value": "$7,000"
},
{
"type": "text",
"value": ", solve "
},
{
"type": "math-inline",
"latex": "2x - 6y > 12"
},
{
"type": "text",
"value": "."
}
]
},
{
"id": "display-math",
"regressionKind": "synthetic",
"sourceReference": "Synthetic structured display-math baseline",
"sourceEvidence": "The approved source contains one structured display equation block.",
"input": "\\[x^2+y^2=25\\]",
"expected": "valid",
"issues": [],
"segments": [
{
"type": "math-block",
"latex": "x^2+y^2=25"
}
]
},
{
"id": "currency-inside-explicit-math",
"regressionKind": "known-defect",
"sourceReference": "Regression fixture: escaped currency inside math class",
"sourceEvidence": "The approved source provides one explicit inline expression containing a currency unit.",
"input": "\\(3.699\\ \\text{\\$/oz}\\)",
"expected": "valid",
"issues": [],
"segments": [
{
"type": "math-inline",
"latex": "3.699\\ \\text{\\$/oz}"
}
]
},
{
"id": "ambiguous-single-number",
"regressionKind": "synthetic",
"sourceReference": "Synthetic unresolved legacy-dollar scenario",
"sourceEvidence": "Only a flat legacy string is available; no approved source classification was supplied.",
"input": "The value is $5$.",
"expected": "invalid",
"issues": [
{
"type": "ambiguous-dollar",
"reason": "Source context is required to distinguish currency from math."
}
],
"segments": [
{
"type": "unresolved",
"value": "$5$",
"reason": "Source context is required to distinguish currency from math."
}
]
},
{
"id": "unmatched-dollar",
"regressionKind": "known-defect",
"sourceReference": "Regression fixture: unmatched delimiter class",
"sourceEvidence": "The flat legacy string contains an unmatched dollar sign and the approved source is unavailable.",
"input": "The pool is $x feet wide.",
"expected": "invalid",
"issues": [
{
"type": "unmatched-dollar",
"reason": "The delimiter cannot be resolved without the approved source."
}
],
"segments": [
{
"type": "unresolved",
"value": "$x",
"reason": "Unmatched delimiter requires source comparison."
}
]
},
{
"id": "bare-tex",
"regressionKind": "known-defect",
"sourceReference": "Regression fixture: bare TeX source-authoring class",
"sourceEvidence": "The extracted prose contains a TeX command outside an explicit math segment.",
"input": "The area is 8 \\cdot 7.",
"expected": "invalid",
"issues": [
{
"type": "bare-tex",
"reason": "A TeX command appears in prose."
}
],
"segments": [
{
"type": "unresolved",
"value": "\\cdot",
"reason": "Compare with the approved source before classifying it."
}
]
},
{
"id": "structured-block-omission",
"regressionKind": "known-defect",
"sourceReference": "Regression fixture: structured prompt-block omission class",
"sourceEvidence": "The canonical source contains two structured blocks while the rendered projection contains one.",
"input": "Structured prompt projection",
"expected": "invalid",
"issues": [
{
"type": "structured-block-omission",
"reason": "Rendered structured-block count differs from the source."
}
],
"sourceBlockCount": 2,
"generatedBlockCount": 2,
"renderedBlockCount": 1,
"segments": [
{
"type": "unresolved",
"value": "promptBlocks",
"reason": "One structured block is missing from the rendered projection."
}
]
},
{
"id": "malformed-latex",
"regressionKind": "synthetic",
"sourceReference": "Synthetic hard-failure LaTeX validation scenario",
"sourceEvidence": "The canonical typed math segment is syntactically incomplete.",
"input": "\\(\\frac{1}{\\)",
"expected": "invalid",
"issues": [
{
"type": "malformed-latex",
"reason": "A hard-failure KaTeX validation gate must reject the expression."
}
],
"segments": [
{
"type": "math-inline",
"latex": "\\frac{1}{"
}
]
},
{
"id": "generated-drift",
"regressionKind": "synthetic",
"sourceReference": "Synthetic canonical-to-generated drift scenario",
"sourceEvidence": "The generator's declared source and emitted artifact hashes differ from the expected projection.",
"input": "Generated artifact comparison",
"expected": "invalid",
"issues": [
{
"type": "generated-drift",
"reason": "The generated artifact does not reproduce the canonical source projection."
}
],
"sourceProjectionHash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"generatedProjectionHash": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"segments": [
{
"type": "text",
"value": "Generated artifact comparison"
}
]
},
{
"id": "rendered-count-mismatch",
"regressionKind": "synthetic",
"sourceReference": "Synthetic expected-expression versus rendered-root mismatch scenario",
"sourceEvidence": "The typed source declares one expression while the browser observation contains no KaTeX root.",
"input": "\\(x+1\\)",
"expected": "invalid",
"issues": [
{
"type": "rendered-count-mismatch",
"reason": "Expected math-expression count differs from rendered KaTeX-root count."
}
],
"expectedMathExpressionCount": 1,
"renderedKatexRootCount": 0,
"segments": [
{
"type": "math-inline",
"latex": "x+1"
}
]
},
{
"id": "production-artifact-drift",
"regressionKind": "synthetic",
"sourceReference": "Synthetic verified-source versus packaged-artifact drift scenario",
"sourceEvidence": "A student math data file changed by one byte during production packaging.",
"input": "Production artifact comparison",
"expected": "invalid",
"issues": [
{
"type": "artifact-drift",
"reason": "The packaged artifact does not match the verified source bytes or semantic projection."
}
],
"sourceProjectionHash": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"artifactProjectionHash": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
"segments": [
{
"type": "text",
"value": "Production artifact comparison"
}
]
},
{
"id": "raw-browser-math-syntax",
"regressionKind": "synthetic",
"sourceReference": "Synthetic learner-visible raw-math scenario",
"sourceEvidence": "The typed projection contains one math expression, but the browser exposes its source delimiters instead of a KaTeX root.",
"input": "The answer is $x+2$.",
"expected": "invalid",
"issues": [
{
"type": "raw-browser-math-syntax",
"reason": "Learner-visible text contains raw math delimiters outside a KaTeX root."
}
],
"expectedMathExpressionCount": 1,
"renderedKatexRootCount": 0,
"segments": [
{
"type": "math-inline",
"latex": "x+2"
}
]
}
]
SHA-256: 46750b37f3f35366104c43ebe10f73add5586b88d1df230fc0ca671b74fcc01e