07 — Governance Row-Onboarding Bridge (P5)
07 — Governance Row-Onboarding Bridge (P5)
File: sql/05_governance_row_bridge.sql (sha256 91d08d58…da8191). Author-mode, read-only views.
Live finding (the gap)
v_governance_object_inventory has exactly one object_type (COLLECTION-grain): 35 collection objects, owner_gap=210 (= 35 × 6 scopes). governance_object_ownership rows = 0, ospa = 0 (gate CLOSED), candidates = 0, rulesets = 0, no governance_scan_run/governance_scan_cursor tables. Therefore a born governance object that is a ROW (a DOT tool, a pivot, an iu command) never enters inventory or owner-gap today. Critically: even once dot-pivot-update is born+registered, it would produce no governance gap — silent. That is gap G3/G9.
Bridge (answers the macro's required questions)
- Does a born governance object enter inventory? Not today →
v_governance_row_object_inventorymakes it so (object_type in {dot_tool_row, pivot_row, iu_command_row}, object_ref = entity_code, requires_owner = true, born flag). - Does owner-gap detect it? Not today →
v_governance_row_object_gapmirrorsv_object_owner_gapat row grain;gap_classin {BORN_BUT_UNOWNED, UNBORN_AND_UNOWNED} keyed ongovernance_object_ownership(object_type, object_ref, lifecycle_status='active'). - Does candidate_state record it? Not today (candidates=0) →
v_governance_row_candidateproposes BORN_BUT_UNOWNED rows; actual insert intogovernance_candidate_stateis owner/scanner action, deliberately NOT done while the gate is closed. - Do scan_run/cursor paths work? Tables absent in prod (clone-only) → documented; bridge does not depend on them.
- Are DOT rows treated as governance objects? Now yes, via the bridge.
- Does
dot-pivot-updateproduce a gap if born/registered but ownerless? With the bridge: yes — it would surface asBORN_BUT_UNOWNED. Today (unborn, unregistered) it surfaces asUNBORN_AND_UNOWNED— the strongest possible "do not use" signal.
Activation boundary
Views are inert/read-only. Moving a row from gap → owned requires the governance gate OPEN (ospa ≥ 1), which is a human L2/L4 ratification outside this macro and outside Agent authority. The bridge makes the debt visible; it does not (and must not) self-onboard.
Rollback
Drop in reverse: view v_governance_row_candidate, view v_governance_row_object_gap, view v_governance_row_object_inventory. Exact in sql/99_rollback_all.sql.