06 — Orphan / Phantom / Unmanaged / Unmonitored / Ghost Policy
title: 06 — Orphan / Phantom / Unmanaged / Unmonitored / Ghost Policy date: 2026-05-31
06 — Orphan / Phantom / Unmanaged Policy
Each concept: definition · detection · pivot dimension · severity · cleanup trigger · notification target. Reuse existing law where found; mark LAW_DEFINITION_GAP where not.
1. ORPHAN — real object, not visible/governed
- Def: Đ26 v3.9 / Đ19 — missing birth record OR missing the minimum required relationship set. Two live
system_issueshalves:thiếu_mã_định_danh(missing ID),thiếu_quan_hệ(missing relations). - Detection:
fn_birth_onboarding_full_scan(Side B) +fn_refresh_orphan_col/_dot/_species→meta_catalog.orphan_count(live Σ=161; CAT-DOT 140, CAT-COL 20, CAT-SPE 1). - Pivot dim: by composition_level & species. PIVOT_MISSING: PIV-30x orphan total.
- Severity: HIGH (Đ23). Cleanup: birth/registration (Side A). Notify:
system_issues('thiếu_quan_hệ'|'thiếu_mã_định_danh').
2. PHANTOM — counted/displayed, but no real object ⚠️ LAW_DEFINITION_GAP
- Status: no phantom law article. De-facto:
system_issues('apr_phantom_applied')(1) + the frontend-injected CAT-PHA (=7) computed by gap-math inhealth.get.ts(an Đ28 violation, not a SoT count). - Proposed operational def (PROPOSE): a phantom is a counted unit with no backing real row —
record_count > actual_count(the surplus = phantom). Inverse of orphan. - Detection:
record_count − actual_countwhere positive, per leaf; live phantom-side rows = 7. Nophantom_countcolumn → propose add (doc 05). - Pivot dim: composition_level/species. PIVOT_MISSING: PIV-30x phantom. Severity: HIGH (a phantom = a number that lies). Cleanup: recount (
refresh_meta_catalog_from_pivot) → if still phantom, investigate stale count / deleted-but-counted rows. Notify: proposesystem_issues('count_integrity_phantom').
3. UNMONITORED (UNMANAGED) — registered but no scanner watches it
- Def: Đ23 §4.2 — in
meta_catalogbut in no DOT-scan scope. Live anchorcollection_onboarding_gap(339 open). - Detection: meta_catalog ∖ (union of DOT scan scopes). Severity: MED→HIGH. Cleanup: onboard to a DOT/pivot. Notify:
system_issues('collection_onboarding_gap').
4. UNREGISTERED — real PG table not in any registry
- Def: Đ23 §4.2 — public table not in
meta_catalog, excl.directus_*/v_*. Detection:information_schema.tables∖meta_catalog.source_location. Severity: HIGH. Cleanup: birth/onboard. Notify: UNREGISTERED TABLE issue.
5. GHOST (cross-store) — exists in one store, deleted in SoT
- Def: OGV-0 — soft-deleted in PG but vector/Qdrant chunks remain. Detection: PG
deleted_at IS NOT NULL∧ vector point present → needs Qdrant read → DETECTION_DEFERRED (no Qdrant read this session). Notify:system_issues('kb_pg_sync_drift')(82 open, the live analogue). Named here so it is never conflated with phantom.
Nhầm chuồng (mis-stabled) — species/collection misassignment
Entity whose species_collection_map discriminator places it in the wrong collection, or whose composition_level disagrees with its species. Detection: join entity_species×species_collection_map×actual location. Severity: MED. Cleanup: re-classify. Notify: system_issues('sai_lệch_dữ_liệu'). Formal article = LAW_DEFINITION_GAP (propose folding under Đ24/Đ26/Đ29).
Scanner contract (new objects/groups — REUSE)
Auto-detect new species/collections/groups/DOTs/UI-surfaces/workflow-task-form-report from birth_registry, meta_catalog, collection_registry, table_registry, pivot_definitions, species_collection_map, IU/KG. An object that appears with no known registry/list/pivot is classified orphan/unmonitored, surfaced visibly (verification_status=unverified, warning_flags, next_action=register|onboard|propose_pivot), and its count rendered PIVOT_MISSING — never a fabricated number (Đ28). Engine = fn_birth_onboarding_full_scan (+_hc); not executed this session (may write).
Surface integration
Orphan/phantom/unmonitored/unregistered/ghost/drift become warning_flags[] on every node and child-summary counters (doc 03 §C), so the reflection screen shows the health of any layer without expanding it.
Round 4 One-Roof Governance Concept Patch (2026-06-01)
Concept-level, additive, no version bump, technical implementation DEFERRED. Concept canon:
knowledge/dev/design/one-roof-governance-concepts/(M-DEF-4, M-DEF-5, island clause, L-3).
Three orphan/anomaly layers — keep them distinct. This doc's anomalies are substrate / counting anomalies (birth-orphan, phantom, unmonitored, unregistered, ghost, drift). The One-Roof model adds a governance layer above them, and the two must not collide:
- Birth/registry orphan precedes governance (M-DEF-4). For an object not yet born/registered, the governance scanner does not raise
OWNER_GAP— it yields to the birth/orphan scanner (this doc's ORPHAN, Đ19/Đ26). One root cause = one issue (sharedcoalesce_key); governance is a layer above birth, never a duplicate of it. - Governance-orphan vs anarchic (M-DEF-5). A governance-orphan is a born+registered object missing a governance link. It is anarchic only if the missing link is authority-critical — owner, or (for mutating/high-risk objects) approval-path / rollback / DOT-authority / reconstruction-integrity. Missing a descriptive-only link (design_ref; audit on a read-only object) = orphan, not anarchic. 12 gap types: OWNER · CAPABILITY · APPROVAL_PATH · AUDIT · ROLLBACK · DOT_AUTHORITY · ISSUE_EVENT · LAW_REF · DESIGN_REF · LOCAL_GOVERNANCE_ISLAND · UNRATIFIED_EXCEPTION · GOVERNANCE_SCHEMA_DRIFT.
- Local-governance-island is a first-class anomaly (Canon doc 01 §5): a cluster defining its own owner/approval/lifecycle outside the roof. Dual detection channel: PG-detectable (no-owner-table, owner-constant-in-data) and CI-/source-only (local-approval-flag, owner-hardcoded-in-code, frontend-declared-owner). A PG-only scan misses islands hidden in code — both channels are required.
Phantom wording (L-3 — law-tier, flagged only). This doc's PHANTOM (record_count > actual_count, LAW_DEFINITION_GAP) is per-source-model: model-A = stale-actual write-race (not phantom); model-B = genuine record>actual (phantom). The definitive wording is a law-drift item (L-3), ratified at the law tier — not resolved here.
Blockers: none blocks this concept note; the governance-coverage scanner that would detect anarchic objects is a later tier (SB-8 coverage rows; SB-4 event/issue types). No scanner SQL/DOT/issue-registration designed here.