teleo-infrastructure/docs/reports/leo-working-state-20260709/leo-db-loading-diagram-20260709T214741Z.svg
twentyOne2x ae00beeb3b
Some checks are pending
CI / lint-and-test (push) Waiting to run
Document Working Leo DB identity provenance
- Map VPS Hermes, Forgejo, SOUL rendering, and document-artifact boundaries.

- Expand Cory-style benchmark for identity render, decision matrix, and source refs.

- Retain live-readback diagrams/reports and focused test coverage.

`docs/reports/leo-working-state-20260709/current-truth-index.md`
`docs/reports/leo-working-state-20260709/leo-db-loading-diagram-20260709T214741Z.mmd`
`docs/reports/leo-working-state-20260709/leo-db-loading-diagram-20260709T214741Z.svg`
`docs/reports/leo-working-state-20260709/leo-db-provenance-report-20260709T214741Z.md`
`docs/reports/leo-working-state-20260709/leo-db-state-21-forgejo-load-agent-loop.svg`
`docs/reports/leo-working-state-20260709/leo-db-state-22-identity-render-matrix-artifacts.svg`
`docs/reports/leo-working-state-20260709/vps-hermes-db-mapping-20260709.md`
`docs/reports/leo-working-state-20260709/working-leo-current-state-20260709.md`
`docs/reports/leo-working-state-20260709/working-leo-open-ended-benchmark-spec.json`
`scripts/working_leo_open_ended_benchmark.py`
`tests/test_working_leo_open_ended_benchmark.py`
2026-07-09 23:59:42 +02:00

122 lines
6.7 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1480" height="980" viewBox="0 0 1480 980" role="img" aria-labelledby="title desc">
<title id="title">Leo / Teleo DB provenance and loading path</title>
<desc id="desc">Diagram separating Forgejo repo provenance, Docker Postgres canonical tables, staging proposals, approval apply path, and Leo self-update loop.</desc>
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L0,6 L9,3 z" fill="#1f2937"/>
</marker>
<style>
.bg { fill: #fbfbf8; }
.band { fill: #ffffff; stroke: #d0d7de; stroke-width: 2; rx: 10; }
.bandTitle { font: 700 18px Arial, sans-serif; fill: #111827; }
.box { fill: #f8fafc; stroke: #475569; stroke-width: 2; rx: 8; }
.boxRepo { fill: #eef6ff; stroke: #2563eb; }
.boxDb { fill: #ecfdf5; stroke: #059669; }
.boxStage { fill: #fff7ed; stroke: #ea580c; }
.boxApply { fill: #f5f3ff; stroke: #7c3aed; }
.boxUnknown { fill: #fef2f2; stroke: #dc2626; stroke-dasharray: 6 5; }
.label { font: 700 15px Arial, sans-serif; fill: #0f172a; }
.small { font: 13px Arial, sans-serif; fill: #334155; }
.tiny { font: 12px Arial, sans-serif; fill: #475569; }
.edge { stroke: #1f2937; stroke-width: 2.2; fill: none; marker-end: url(#arrow); }
.edgeDashed { stroke: #64748b; stroke-width: 2; stroke-dasharray: 7 5; fill: none; marker-end: url(#arrow); }
.note { font: 13px Arial, sans-serif; fill: #7f1d1d; }
</style>
</defs>
<rect class="bg" width="1480" height="980"/>
<text x="48" y="52" style="font:700 28px Arial, sans-serif; fill:#111827;">Leo / Teleo DB Provenance And Loading Path</text>
<text x="48" y="82" class="small">Confirmed current state: Docker Postgres is canonical. Forgejo is proven for repo/code and legacy file-KB workflow; direct initial DB bootstrap from Forgejo is not proven.</text>
<rect x="40" y="120" width="410" height="270" class="band"/>
<text x="64" y="152" class="bandTitle">Repo / Forgejo / Deployment</text>
<rect x="70" y="180" width="340" height="68" class="box boxRepo"/>
<text x="90" y="207" class="label">Forgejo / Git remotes</text>
<text x="90" y="229" class="small">code, legacy file-KB PR flow, mirrors</text>
<rect x="70" y="282" width="340" height="76" class="box boxRepo"/>
<text x="90" y="309" class="label">deploy/auto-deploy.sh</text>
<text x="90" y="331" class="small">fetch main, syntax-check, rsync runtime dirs</text>
<text x="90" y="349" class="tiny">restarts changed services only</text>
<rect x="520" y="120" width="430" height="348" class="band"/>
<text x="544" y="152" class="bandTitle">Docker Postgres Canonical DB</text>
<rect x="560" y="180" width="350" height="68" class="box boxDb"/>
<text x="580" y="207" class="label">teleo-pg container</text>
<text x="580" y="229" class="small">VPS 77.42.65.182, database teleo</text>
<rect x="560" y="282" width="350" height="92" class="box boxDb"/>
<text x="580" y="309" class="label">canonical public.*</text>
<text x="580" y="331" class="small">claims, sources, claim_evidence, claim_edges</text>
<text x="580" y="350" class="small">strategies, strategy_nodes, anchors</text>
<rect x="560" y="396" width="350" height="48" class="box boxUnknown"/>
<text x="580" y="425" class="label">Initial DB bootstrap: unknown</text>
<rect x="1015" y="120" width="420" height="348" class="band"/>
<text x="1039" y="152" class="bandTitle">Staging / Review / Apply</text>
<rect x="1055" y="180" width="340" height="82" class="box boxStage"/>
<text x="1075" y="207" class="label">kb_stage.*</text>
<text x="1075" y="229" class="small">kb_proposals, pending proposals</text>
<text x="1075" y="247" class="small">staged/import tables and transform summaries</text>
<rect x="1055" y="296" width="340" height="72" class="box boxApply"/>
<text x="1075" y="323" class="label">reviewer/operator approval</text>
<text x="1075" y="345" class="small">pending_review -&gt; approved</text>
<rect x="1055" y="396" width="340" height="48" class="box boxApply"/>
<text x="1075" y="425" class="label">guarded apply -&gt; applied readback</text>
<rect x="145" y="540" width="1190" height="330" class="band"/>
<text x="169" y="572" class="bandTitle">Current KB Loading And Leo Self-Update Loop</text>
<rect x="190" y="620" width="190" height="70" class="box boxApply"/>
<text x="210" y="648" class="label">Leo / user request</text>
<text x="210" y="670" class="small">question, correction, strategy change</text>
<rect x="430" y="620" width="210" height="70" class="box boxApply"/>
<text x="450" y="648" class="label">teleo-kb bridge</text>
<text x="450" y="670" class="small">reads canonical, stages proposals</text>
<rect x="690" y="620" width="210" height="70" class="box boxStage"/>
<text x="710" y="648" class="label">kb_stage.kb_proposals</text>
<text x="710" y="670" class="small">pending_review, payload jsonb</text>
<rect x="950" y="620" width="210" height="70" class="box boxApply"/>
<text x="970" y="648" class="label">approval + apply</text>
<text x="970" y="670" class="small">strict apply_payload or packet</text>
<rect x="550" y="760" width="380" height="70" class="box boxDb"/>
<text x="570" y="788" class="label">canonical state changes</text>
<text x="570" y="810" class="small">public.* rows, strategies/nodes, applied ledger</text>
<rect x="980" y="760" width="280" height="70" class="box boxDb"/>
<text x="1000" y="788" class="label">render/context refresh</text>
<text x="1000" y="810" class="small">Leo reads new self from DB</text>
<path d="M410 214 H560" class="edge"/>
<path d="M240 248 V282" class="edge"/>
<path d="M410 320 C475 320 480 214 560 214" class="edge"/>
<path d="M910 214 H1055" class="edgeDashed"/>
<path d="M735 248 V282" class="edge"/>
<path d="M910 328 H1055" class="edgeDashed"/>
<path d="M1225 262 V296" class="edge"/>
<path d="M1225 368 V396" class="edge"/>
<path d="M1055 420 H910 V350" class="edge"/>
<path d="M380 655 H430" class="edge"/>
<path d="M640 655 H690" class="edge"/>
<path d="M900 655 H950" class="edge"/>
<path d="M1055 690 C1055 742 930 742 860 760" class="edge"/>
<path d="M930 795 H980" class="edge"/>
<path d="M1120 760 C1120 535 790 520 740 282" class="edgeDashed"/>
<path d="M740 374 C730 470 515 540 535 620" class="edgeDashed"/>
<text x="940" y="240" class="tiny">code/workflow provenance</text>
<text x="938" y="354" class="tiny">proposals are not canonical</text>
<text x="584" y="430" class="note">Need bootstrap log/import run to prove origin.</text>
<text x="190" y="900" class="small">Rule: approved is not applied. Canonical proof requires public.* row readback plus kb_stage ledger status = applied.</text>
</svg>