KB-68DB

Gate-Resolution SQL — Human-Gate Verification (read-only, run after L2+L4)

3 min read Revision 1
one-roofphase1sqlhuman-verificationread-onlyospa-gate2026-06-02

-- ============================================================================ -- HUMAN-GATE VERIFICATION (read-only). Run AFTER the human completes L2+L4. -- ALL must pass before the commit-ready seed may be executed. -- query_pg-safe (single SELECT each). -- ============================================================================

-- G1. The sovereign machine-checkable gate. MUST be >= 1. SELECT count(*) AS ospa FROM os_proposal_approvals;

-- G2. The auth-model approval request must exist and be approved (L2 quorum). SELECT code, status, action, proposed_action_code, reviewed_by, reviewed_at FROM approval_requests WHERE code = 'APR-BOOT-AUTHMODEL-1';

-- G3. The approval must carry recorded votes (L2). Expect quorum: >=1 president-human + >=2 ai_council, 0 rejects. -- apr_approvals columns: id, apr_id, approver, approver_type, decision, rationale, created_at. -- apr_id links to the approval_requests row (confirm linkage shape live if in doubt). SELECT a.approver_type, a.decision, count(*) FROM apr_approvals a JOIN approval_requests r ON r.id = a.apr_id WHERE r.code = 'APR-BOOT-AUTHMODEL-1' GROUP BY a.approver_type, a.decision ORDER BY a.approver_type, a.decision;

-- G4. Coverage substrate unchanged and still honest (gap must still be 210 before seed). SELECT (SELECT count() FROM v_governance_object_inventory) AS inventory, -- expect 35 (SELECT count() FROM v_governance_object_containment) AS containment, -- expect 35 (SELECT count() FROM governance_responsibility_scope WHERE status='active') AS active_scopes, -- expect 6 (SELECT count() FROM v_object_owner_gap) AS gap, -- expect 210 (SELECT count(*) FROM governance_object_ownership) AS ownership; -- expect 0

-- GO CONDITION: proceed with commit_ready_f6_ownership_seed.sql ONLY IF -- G1 ospa >= 1 AND G2 status='approved' AND G3 shows quorum / 0 rejects -- AND G4 inventory=35, containment=35, active_scopes=6, gap=210, ownership=0. -- If any fail: DO NOT COMMIT.

Back to Knowledge Hub knowledge/dev/reports/architecture/one-roof-phase1-coverage-gate-resolution-and-ownership-seed-decision-2026-06-02/sql/human_verification.sql