KB-1747

F-2 Rollback-Only Coverage Dry-Run — 04 Owner Resolution, Gap & Conflict

5 min read Revision 1
one-roofphase-1f2owner-resolutiongapconflictrecursive-inheritance

04 — Owner-Resolution, Gap & Conflict Results

Live output of S7–S12. The heart of F-2: a real recursive resolution producing direct + inherited + missing owner behavior, plus conflict detection. All inside the rolled-back transaction.

4.1 S7 — ownership seed (one row)

A single accountable, inherited-anchor ownership row:

('collection','approval_requests','policy','accountable','GOV-COUNCIL', is_inherited_anchor=true, 'active', approval_ref='APR-F2-DRY')

This single row is designed to produce all three owner outcomes the mission requires, via the recursive view + the containment edge from S2:

  • direct owner for approval_requests/policy (depth 0);
  • inherited owner for apr_action_types/policy (depth 1, climbing the containment edge through the inherited anchor);
  • missing owner for agents (no ownership, not in the containment tree).

4.2 S8 — owner resolution (expect direct + inherited)

    object_ref     | scope  | owner_gov_code | resolution | depth
-------------------+--------+----------------+------------+-------
 approval_requests | policy | GOV-COUNCIL    | direct     |     0
 apr_action_types  | policy | GOV-COUNCIL    | inherited  |     1
(2 rows)

Objective 3 (direct COVERED) and Objective 5 (inherited via recursive view) both met. The recursive v_object_effective_owner correctly:

  • resolves the direct owner at depth 0;
  • climbs the containment edge apr_action_types → approval_requests and inherits GOV-COUNCIL at depth 1, because the anchor row has is_inherited_anchor=true (anti-hiding M-DEF-7: inheritance only via flagged anchors).

Only policy resolves (the only scope with an owner); the other 5 scopes climb, find no owner anywhere, and produce no resolution row — correct.

4.3 S9 — gap AFTER ownership (expect 16)

    object_ref     | gaps
-------------------+------
 agents            |    6
 approval_requests |    5
 apr_action_types  |    5
(3 rows)
            gap_after = 16
  • agents6 gaps (all scopes uncovered): Objective 4 (missing owner → GAP) met.
  • approval_requests5 gaps (policy covered by direct owner; other 5 still gaps).
  • apr_action_types5 gaps (policy covered by inherited owner; other 5 still gaps).

18 → 16: the one direct + one inherited owner reduced the gap set by exactly 2. The gap view honors inheritance (it does not re-flag apr_action_types/policy even though that object has no direct owner) — the recursive coverage is correctly propagated.

4.4 S10 — covered proof

    object_ref     | scope  | verdict
-------------------+--------+---------
 approval_requests | policy | COVERED
 apr_action_types  | policy | COVERED
(2 rows)

The two object/scope pairs that fell out of the gap set: one direct, one inherited — exactly the 2-row reduction from §4.3.

4.5 S11/S12 — conflict detection (Objective 6)

  • S11 — v_object_owner_conflict on the real store = 0. No double accountable owners can exist because the partial-unique index uq_gov_obj_accountable prevents them (and N1 proves it rejects a second one).
  • S12 — detector predicate on an index-less probe table = 1 group. Two active accountable rows for the same (object, scope) inserted into a fixture _own_probe (no unique index) are caught by the GROUP BY … HAVING count(*)>1 predicate. This proves the conflict-detection logic works against legacy/out-of-band doubles, independent of the index that prevents new ones.
 conflicts | double_groups
-----------+---------------
         0 |             1

4.6 Owner/gap/conflict verdict

PASS. All three resolution modes (direct/inherited/missing) and conflict detection are proven live against real view objects and the real ownership store: direct depth-0, inherited depth-1 through the anchor, 6 honest gaps for the unowned object, gap honors inheritance (18→16), conflict prevented by index and still detectable by predicate. Nothing persisted (doc 06).

Back to Knowledge Hub knowledge/dev/reports/architecture/one-roof-phase1-coverage-dry-run-f2-rollback-only-2026-06-02/04-owner-resolution-gap-conflict-results.md