65 lines
3.9 KiB
XML
65 lines
3.9 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="1190" viewBox="0 0 720 1190" role="img" aria-labelledby="title desc">
|
|
<title id="title">Диагностика duplicate и replay учебного события</title>
|
|
<desc id="desc">Вертикальное дерево: проверка envelope, проверка consumer contract и schema version, lookup в ledger. Из веток выходят effect recorded, duplicate or replay suppressed и contract update required.</desc>
|
|
<defs>
|
|
<marker id="arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto">
|
|
<path d="M0,0 L12,6 L0,12 Z" fill="#4bc0c8"/>
|
|
</marker>
|
|
<marker id="warnarrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto">
|
|
<path d="M0,0 L12,6 L0,12 Z" fill="#e7aa55"/>
|
|
</marker>
|
|
<style>
|
|
.bg { fill: #0d1724; }
|
|
.panel { fill: #162437; stroke: #36516b; stroke-width: 2; }
|
|
.check { fill: #123d4b; stroke: #4bc0c8; stroke-width: 2; }
|
|
.ok { fill: #1d3b30; stroke: #77c893; stroke-width: 2; }
|
|
.warn { fill: #3b3030; stroke: #e7aa55; stroke-width: 2; }
|
|
.line { stroke: #4bc0c8; stroke-width: 4; fill: none; marker-end: url(#arrow); }
|
|
.warnline { stroke: #e7aa55; stroke-width: 4; fill: none; marker-end: url(#warnarrow); }
|
|
.title { fill: #f3fbff; font: 32px Arial, sans-serif; font-weight: 700; }
|
|
.label { fill: #d9edf6; font: 24px Arial, sans-serif; font-weight: 700; }
|
|
.body { fill: #a8bed0; font: 21px Arial, sans-serif; }
|
|
.code { fill: #92e3e8; font: 22px "SFMono-Regular", Consolas, monospace; }
|
|
</style>
|
|
</defs>
|
|
<rect class="bg" width="720" height="1190" rx="28"/>
|
|
<text class="title" x="48" y="62">Перед replay собираем evidence</text>
|
|
<text class="body" x="48" y="96">id · source · schema · contract · ledger</text>
|
|
|
|
<rect class="check" x="54" y="140" width="612" height="142" rx="18"/>
|
|
<text class="label" x="84" y="182">1. Envelope валиден?</text>
|
|
<text class="code" x="84" y="222">source · id · type · subject</text>
|
|
<text class="body" x="84" y="256">Нет → rejected envelope, без effect.</text>
|
|
|
|
<path class="line" d="M360 282 L360 354"/>
|
|
<rect class="check" x="54" y="370" width="612" height="148" rx="18"/>
|
|
<text class="label" x="84" y="412">2. Contract принимает schema?</text>
|
|
<text class="code" x="84" y="452">consumerId · schemaVersion</text>
|
|
<text class="body" x="84" y="486">Нет → contract update required.</text>
|
|
|
|
<path class="line" d="M360 518 L360 590"/>
|
|
<rect class="panel" x="54" y="606" width="612" height="138" rx="18"/>
|
|
<text class="label" x="84" y="648">3. Ledger уже содержит key?</text>
|
|
<text class="code" x="84" y="688">consumerId : source : id</text>
|
|
<text class="body" x="84" y="722">Проверяется до нового учебного result.</text>
|
|
|
|
<path class="line" d="M230 744 L230 816"/>
|
|
<rect class="ok" x="54" y="832" width="334" height="178" rx="18"/>
|
|
<text class="label" x="82" y="874">Нет ключа</text>
|
|
<text class="code" x="82" y="916">effect-recorded</text>
|
|
<text class="body" x="82" y="954">record resultVersion</text>
|
|
<text class="body" x="82" y="984">и input schema</text>
|
|
|
|
<path class="line" d="M490 744 L490 816"/>
|
|
<rect class="warn" x="420" y="832" width="246" height="178" rx="18"/>
|
|
<text class="label" x="446" y="874">Есть ключ</text>
|
|
<text class="code" x="446" y="916">suppress</text>
|
|
<text class="body" x="446" y="954">duplicate или</text>
|
|
<text class="body" x="446" y="984">controlled replay</text>
|
|
|
|
<path class="warnline" d="M652 444 C704 444 704 1092 602 1092"/>
|
|
<rect class="warn" x="54" y="1052" width="612" height="92" rx="18"/>
|
|
<text class="label" x="84" y="1090">Unknown schema: effect запрещён</text>
|
|
<text class="body" x="84" y="1122">Сохраняем причину для contract update.</text>
|
|
</svg>
|