KB-183E

07 — Step 5: SB-2 Build Results — COMMITTED (Phase-1 Test-Mode Build, 2026-06-02)

3 min read Revision 1
one-roof-governancephase1test-mode-buildsb-2ownership2026-06-02

07 — Step 5: SB-2 Build Results — COMMITTED

sql/sb2_ddl.sql, sql/sb2_rollback.sql. Source: impl-index doc 17 (contract) + doc 19 (literal DDL). FK codes verified live.

7.1 Objects committed

  • governance_responsibility_scope (PK scope_code; default_owner_hintgovernance_registry(code); status). Seeded 6 law-defined scopes (the legitimate reference content): policy/health/execution/render/approval/audit with default-owner hints (GOV-COUNCIL/GOV-SIV/GOV-DOT/GOV-MOUT).
  • governance_object_ownership (20-col, trigger-less): id bigserial PK; scope→responsibility_scope FK; owner_kind CHECK ∈ {accountable,supporting,delegated,exception}; owner_gov_codegovernance_registry(code) FK; self-FK supersedes_id; lifecycle_status CHECK; chk_delegated_ttl (delegated ⇒ effective_to mandatory); dates/approval/audit/source refs. Partial-unique uq_gov_obj_accountable = one active accountable owner per (object_type,object_ref,scope). +2 lookup indexes. Empty at build (no owner assignments — those require SB-1 handlers + approval).
  • v_object_effective_owner (direct-ownership resolution form).

7.2 Rehearsal — 5 canonical negative tests all PASS

dup-accountable (unique), phantom-owner FK, bad-scope FK, bad-kind CHECK, delegated-TTL CHECK. Plus: governance_relations entry==exit (8→8 — the live agency↔law edges, their CHECKs and triggers were never touched, confirming no migration risk). Smoke anchor row resolved through the view; post-rollback both tables NULL, relations 8.

7.3 Commit + verify

COMMIT: scopes=6, ownership=0 rows, relations=8 (untouched), view present. Independent verify identical. No governance_relations ALTER, no trigger on the new tables (forbidden actions avoided), no out-of-scope mutation.

7.4 Deferred enhancement (documented)

The recursive owner-link inheritance walk + v_object_owner_gap (governed-object inventory LEFT JOIN effective-owner) — exact recursive SQL is in doc 17 §4-5 / the later SB-2 owner-line rehearsal, not retrieved at literal fidelity here. The committed v_object_effective_owner is the correct direct-ownership v1; inheritance is an additive view-replacement follow-up.

7.5 Verdict

SB-2 = BUILT + VERIFIED. Ownership storage substrate live; owner rows empty/fail-closed (no handler, no approval).

Back to Knowledge Hub knowledge/dev/reports/architecture/one-roof-phase1-test-mode-build-2026-06-02/07-step5-sb2-build-results.md