KB-277A

03 — First Dry-Run Scope (smallest useful: 3 governed collections, ≤3 gap rows, read-only/rollback-only; NOT executed; 2026-06-02)

5 min read Revision 1
one-roof-governancephase1operational-readinessdry-run-scoperead-onlyrollback-onlycollection-grainno-emit2026-06-02

03 — First Dry-Run Scope (smallest useful)

Defines the smallest dry-run that proves the coverage path end-to-end without activating anything. This is the scope spec; the dry-run is NOT executed by this mission.

3.1 Dry-run goal (one sentence)

Prove that the inventory seam → v_object_owner_gap → owner-resolution path produces a correct, bounded, zero-row-impact coverage verdict over a tiny known subset — read-only / rollback-only, no emit, no worker loop, no persisted candidates.

3.2 Object subset (minimal)

Parameter Value Rationale
Source collection_registry bounded ledger (168 rows total)
Filter governance_role='governed' AND coverage_status='BIRTH_REQUIRED' the 35 truly-in-scope governed collections
Dry-run subset 3 collections (lexically first 3 of the 35, or operator-named) smallest set that exercises owner / gap / inherited / direct without being trivial
Object grain excluded from the first dry-run avoids the 1.08M birth_registry source entirely

The collection-grain inventory over 3 collections yields ≤3 inventory rows, ≤3 gap rows. There is no path to row explosion.

3.3 Expected max rows

Surface Expected max Hard ceiling (abort if exceeded)
v_governance_object_inventory (during rehearsal only) 3 38 (all governed)
v_object_owner_gap 3 38
v_object_effective_owner ≤ 3 × 6 scopes = 18 228
candidate_scan_run 0 persisted (rollback) 1 (rehearsal, rolled back)
governance_candidate_* 0 persisted 0
event_outbox governance 0 0 (any >0 = immediate abort)
system_issues 0 0

3.4 Time budget

5 seconds total (the query_pg statement_timeout is the natural cap). The dry-run is a handful of bounded SELECTs inside one BEGIN … ROLLBACK. No loop, no sleep, no polling.

3.5 Execution discipline (rollback-only)

  • Channel: ssh contabo → docker exec -i postgres psql -U workflow_admin -d directus, single BEGIN … ROLLBACK (the proven test-mode discipline). The MCP query_pg channel stays the read-only verifier.
  • No COMMIT. The seam wiring (doc 02) is CREATE OR REPLACEd inside the transaction and rolled back; the seams return to WHERE false on ROLLBACK (DDL is transactional). The dry-run thus leaves the substrate exactly as found.
  • No worker loop — the scanner logic runs once, inline, as SQL; gov_worker_cursor is read (or seeded-then-rolled-back), never advanced persistently.
  • No persistent candidate population — any governance_candidate_* insert is a rehearsal insert inside the rolled-back transaction, exactly as the SB-10/SB-2 builds did.

3.6 Read-only variant (preferred first pass)

A pure read-only dry-run is possible and is the recommended first pass before any rollback-only rehearsal:

  1. query_pg the proposed Seam-A SELECT expression directly (not as a view) over the 3 collections.
  2. LEFT JOIN against v_object_effective_owner (currently 0 rows ⇒ all 3 show as gaps — the correct inert result).
  3. Confirm counts ≤ ceilings; confirm 0 emit / 0 issues.

This proves the logic with zero DDL and zero transaction — the safest possible first step.

3.7 What the dry-run must demonstrate

  1. Inventory seam yields exactly the 3 expected collections.
  2. Gap view flags the correct subset (all 3, since ownership is empty).
  3. Owner-resolution returns 0 owners (empty ownership) — i.e. the path is wired and honestly reports under-coverage, not a false PASS.
  4. Zero governance emit, zero system_issues, zero persisted candidate/owner rows, idle_in_transaction=0 after.
  5. Entry==exit: seams back to WHERE false, all counts unchanged.

3.8 Dry-run scope verdict

CLEAR AND MINIMAL. 3 collections, ≤3 gap rows, ≤5s, read-only first then rollback-only, no emit, no worker, no persisted candidates. The dry-run proves the coverage path without crossing inert→active and without touching the 1.08M object tail.

Back to Knowledge Hub knowledge/dev/reports/architecture/one-roof-phase1-operational-readiness-activation-boundary-2026-06-02/03-first-dry-run-scope.md