caelum0x 91fe8978d8 feat: enterprise + evidence depth — living evidence, verdict fragility, gated audit export, DSAR + legal hold
Evidence:
- Living Evidence Monitoring: deterministic cumulative meta-analysis (re-pool in time order, first-significant
  + would-a-new-study-flip); monitors + events (0069); backend/engines/pyalex citation-velocity (in-place);
  /api/evidence/living(+/assess) + /console/living-evidence
- Verdict Fragility: Walsh Fragility Index (exhaustive Fisher-exact reassignment) + meta leave-one-out
  robustness + required-information-size; /api/evidence/fragility + /console/fragility

Enterprise:
- Immutable audit export (Enterprise-tier gated): verifyChain + per-entry integrity proofs + export_hash;
  FIRST real requireFeature enforcement -> UpgradeRequired 402 with upgrade CTA; /api/enterprise/audit-export
- Data governance: legal holds (block retention purge) + DSAR export (no secrets/hashes) (0070);
  /api/governance/legal-hold + /api/governance/dsar + /console/governance/data

All numeric/verdict paths deterministic (no LLM); org-scoped; tsc + build green; 0069/0070 applied to Neon.
2026-07-11 03:25:07 +03:00

25 lines
919 B
TypeScript

// Deterministic flip-verdict badge. Colour is a pure function of the verdict — no
// LLM, no free text — so the same verdict always renders the same chip.
import type { FlipVerdict } from "./types";
const VERDICT_STYLE: Record<FlipVerdict, { label: string; cls: string }> = {
would_flip: { label: "Would flip", cls: "bg-red-50 text-red-800" },
strengthens: { label: "Strengthens", cls: "bg-emerald-50 text-emerald-800" },
weakens: { label: "Weakens", cls: "bg-amber-50 text-amber-800" },
no_change: { label: "No change", cls: "bg-ink/5 text-ink/60" },
insufficient_evidence: {
label: "Insufficient evidence",
cls: "bg-ink/5 text-ink/40",
},
};
export function FlipVerdictBadge({ verdict }: { verdict: FlipVerdict }) {
const style = VERDICT_STYLE[verdict];
return (
<span className={`rounded-full px-2 py-0.5 text-xs font-medium ${style.cls}`}>
{style.label}
</span>
);
}