KB-7CF5
O8F implement F2/F3/GAP6 deploy+proof — 03-f2-live-text-sourcing-result
3 min read Revision 1
dieu44iu-cutterv0.6o8ff2live-text-sourcingdiscover
O8F Report 03 — F2 live-text sourcing result (G2)
- macro:
v0.6-o8f-implement-f2-f3-gap6-deploy-proof - date_utc: 2026-05-21 · gate: G2 — implement F2 · result: G2 PASS — F2 CLOSED
1. Change (localised to cutter_agent/orchestrator/discover.py)
LiveReadOnlyDiscoverer.source_unit_texts(doc_prefix):
NEW read-only method — SELECT iu.canonical_address, iu.sort_order,
coalesce(uv.title,''), coalesce(uv.body,'') FROM public.information_unit iu
JOIN public.unit_version uv ON uv.id = iu.version_anchor_ref
AND uv.unit_id = iu.id WHERE canonical_address LIKE prefix
ORDER BY sort_order. Returns an ordered List[(title, body)].
Pure SELECT — the injected select_rows callable owns credentials.
LiveDryRunDiscoverer.__init__(unit_texts=...):
NEW optional param; _shadow_mark_rows uses the real (title, body) per row
index when present, else keeps the deterministic placeholder (fallback).
The synthetic O4-DRYRUN-SHADOW canonical_address is KEPT regardless so a
re-cut never collides with the already-cut live units.
LiveDryRunDiscoverer.from_live(source_live_text=True):
Calls source_unit_texts() inside try/except — any failure (privilege,
empty doc, fake select callable) falls back to the placeholder. No crash.
live_text_sourced_count + pin_live_context:
Records how many shadow rows carry genuine live text; pins
live_text_sourced_count / live_text_fully_sourced onto RunContext.
The dry-run simulator behaviour is preserved: InMemoryDiscoverer is
untouched; with no unit_texts the placeholder path is byte-equivalent to
the prior behaviour.
2. Tests — tests/test_orchestrator_o8f_f2_live_text.py (12 tests, all PASS)
source_unit_texts: ordered (title,body) pairs · read-only SELECT only ·
empty document -> empty list
shadow rows: real text propagates · placeholder fallback ·
partial (mixed real+placeholder) · shadow address kept
from_live: sources real text · falls back when sourcing raises ·
source_live_text=False skips · pins recorded
cutplan phase: cutplan_rows carry live-sourced body/title (no O4-SHADOW)
3. Real-DB read-only proof (VPS — PROOF-1)
units_sourced: 60 (= live ICX-CONST count)
units_with_real_body: 60 (genuine unit_version.body text)
units_with_real_title: 0 (live ICX-CONST rows have empty title — that
IS the real data; F2 sources what exists)
db_write: NONE — read-only SELECT, transaction rolled back
4. Verdict
f2_status: CLOSED — real unit_version body/title now sourced into the
discover/cutplan path; placeholder retained only as fallback;
real-DB read-only proof returned 60 genuine units.
g2: PASS