Found during the #491/#492 review sweep: backend-ts/src/run/employee-profile.ts uses listOutcomesForEmployee(externalId, 1) as "the latest outcome" (and the same scan at line ~127 for history). Like MCP check_compliance before #491 (and CDS before #470, the compliance API before #399), the newest row wins with no check that its run reached a terminal status — so the employee profile can render a mid-run partial result as the subject's current state, which silently becomes wrong if the run FAILs.
Lower stakes than the fixed surfaces (frontend operator view, not an AI client or a public contract), and the history listing arguably should show everything. But the "latest/current" cell is a latest-answer read and should come from listLatestFinalizedOutcomePerMeasure like the other three surfaces.
Found during the #491/#492 review sweep:
backend-ts/src/run/employee-profile.tsuseslistOutcomesForEmployee(externalId, 1)as "the latest outcome" (and the same scan at line ~127 for history). Like MCPcheck_compliancebefore #491 (and CDS before #470, the compliance API before #399), the newest row wins with no check that its run reached a terminal status — so the employee profile can render a mid-run partial result as the subject's current state, which silently becomes wrong if the run FAILs.Lower stakes than the fixed surfaces (frontend operator view, not an AI client or a public contract), and the history listing arguably should show everything. But the "latest/current" cell is a latest-answer read and should come from
listLatestFinalizedOutcomePerMeasurelike the other three surfaces.