The contract's canonical evidence_json shape includes a why_flagged block, but the TS engine persists expressionResults only. deriveWhyFlagged (backend-ts/src/case/case-detail-read-model.ts:90, applied at :175) adds why_flagged at read time, and that file's docblock says so explicitly at :4-6 ("the TS engine stores expressionResults, not a why_flagged block"). backend-ts/src/case/case-outreach.ts:164-167 documents the same from the other side — renderContext routes through toCaseDetail before computing a due date precisely because "the raw stored outcome evidence has no why_flagged block".
An always-loaded contract doc that misstates the persistence boundary will keep producing the error PR #462's review caught: two proposals in that PR described the due-date inputs as persisted per outcome, taken in good faith from §5.
The fix belongs in its own change, since the file is an always-loaded contract extract and editing it changes what every session believes about the data model.
The contract's canonical
evidence_jsonshape includes awhy_flaggedblock, but the TS engine persistsexpressionResultsonly.deriveWhyFlagged(backend-ts/src/case/case-detail-read-model.ts:90, applied at:175) addswhy_flaggedat read time, and that file's docblock says so explicitly at:4-6("the TS engine stores expressionResults, not a why_flagged block").backend-ts/src/case/case-outreach.ts:164-167documents the same from the other side —renderContextroutes throughtoCaseDetailbefore computing a due date precisely because "the raw stored outcome evidence has no why_flagged block".An always-loaded contract doc that misstates the persistence boundary will keep producing the error PR #462's review caught: two proposals in that PR described the due-date inputs as persisted per outcome, taken in good faith from §5.
The fix belongs in its own change, since the file is an always-loaded contract extract and editing it changes what every session believes about the data model.