Process Discovery — 03 On-Demand Producer Inventory Fix (LIVE)
03 — On-Demand Producer Inventory Fix (Workstream B) — LIVE
3.1 The exact blind spot
v_axis_process_inventory (v1) builds its DOT rows in a dotp CTE with:
FROM dot_tools d
WHERE d.trigger_type = ANY (ARRAY['cron','event','dual','on-deploy'])
on-demand is excluded. All 18 KG producers (the C·ấp B on-demand half) are dropped; only the 18 cron/dual verifiers survive. The process axis showed half the KG automation. Confirmed live: KG = 18 on-demand + 18 cron/dual, all paired.
3.2 The fix — v_axis_process_inventory_v2 (companion, LIVE)
A new additive view; v1 is left untouched (its 60-row count contract is consumed by AX-PROCESS pivots PIV-340..353 and the RP UI — changing it in place would be a silent contract break).
Design choices, each tied to a macro constraint:
- No blind spot →
dot_baseincludes all literal-DOT_tools regardless oftrigger_type. - No inflation → DOTs are collapsed by pair:
pair_group = LEAST(code, paired_dot)when paired, elsecode; one process row per pair (component_count = 2). A producer/verifier pair is one process, not two. - Roles exposed →
has_producer(anyon-demandmember),has_verifier(anycron/dual/event/on-deploymember),member_components(the DOT codes in the pair). - Honest classification → DOT pairs stay
TYPE_1_DOT_CONTAINED; workflows/pipelines keep their v1 types. dot_toolsnot mutated.
3.3 Live read-back (independent MCP channel)
| metric | value |
|---|---|
v_axis_process_inventory (v1) |
60 (unchanged) |
v_axis_process_inventory_v2 |
46 |
v2 dot-process rows (source_object='dot_tools') |
43 pair-groups |
v2 rows exposing a producer (has_producer) |
28 |
| KG pair-groups | 18, all pair_complete (producer and verifier present) |
Reading: KG now contributes 18 process rows (same as v1's verifier-count — no inflation), but each row now shows its producer as a visible member (has_producer=true) — blind spot removed. v2's 46 < v1's 60 because pairing collapses two DOTs into one process and the universe is restricted to literal-DOT_ (the discovery engine's universe), where v1 counted every cron/dual DOT individually.
3.4 Safety
- Additive (
CREATE OR REPLACE VIEWonly); birth-free (birth_registry1,158,148 before == after); rehearsed BEGIN/ROLLBACK net-zero then committed; DROP-reversible (/tmp/01_views_v2_rollback.sql, stagedcontabo:/tmp). - v1 untouched → zero downstream pivot/UI breakage. RP can adopt v2 when ready (doc 09).
3.5 Honest caveat (no silent cap)
The discovery universe is literal-DOT_ tools. ~200 DOT…-prefixed tools with no underscore family token (carrying the backfilled last_executed) are not covered by either inventory or the discovery engine. This is a naming-convention coverage gap, surfaced here rather than hidden; closing it is a candidate for a later macro (normalise DOT codes or relax the family-split rule).