KB-5BA5

07 — Scanner for New Objects / Groups (birth_onboarding reuse)

4 min read Revision 1
architecturescannernew-objectsbirth-onboardingorphanunmonitoreddieu-19dieu-232026-05-31

title: 07 — Scanner for New Objects / Groups date: 2026-05-31

07 — New-Object Scanner

Registries-Pivot must auto-detect new species, collections, object groups, DOTs, UI surfaces, and new workflow/task/form/report objects, and surface anything that appears without a known registry/list/pivot as orphan/unmonitored with a registration path.

Detection sources (all verified live)

source what it surfaces live count
birth_registry every born object (universal counter) 980,221
meta_catalog registered categories + counts 169
collection_registry collections (PIV-009)
table_registry UI tables (PIV-002)
pivot_definitions declared pivots 37
species_collection_map / entity_species species & their collections 164 / 42
dot_tools (PIV-007) DOTs 309
ui_pages (PIV-008) pages/routes
IU/KG (where relevant) IU-bound objects

Reuse anchor — the scanner already exists

  • fn_birth_onboarding_full_scan (+ fn_birth_onboarding_full_scan_hc) — the Side-A onboarding scan; REUSE as the new-object detector.
  • fn_refresh_orphan_col / _dot / _species (+ triggers) — keep meta_catalog.orphan_count current per dimension; REUSE.
  • check_registry_coverage — coverage rollup; REUSE.
  • Đ23 §4.2 inverse-check — the rule that turns "appears but not registered" into a HIGH issue; REUSE.

Algorithm (design; read-only-feasible)

scan_new_objects():
  # A. New PG tables (unregistered)
  unregistered := information_schema.tables(public, exclude directus_*, v_*)  MINUS  meta_catalog.source_location
  # B. New collections / species / DOTs / pages without a pivot
  for reg in (collection_registry, entity_species, dot_tools, ui_pages, workflows, tasks):
      uncovered := reg rows whose code/level has no is_active pivot mapping
  # C. New groups: species/collection/label groups with no grouping label
  ungrouped := groups in species_collection_map / collection_groups with children_count > max_ungrouped_threshold and no taxonomy label
  classify each finding:
      no registry            → UNREGISTERED  (Đ23)  → system_issues('thiếu_mã_định_danh' or onboarding)
      registered, no scanner → UNMONITORED   (Đ23)  → system_issues('collection_onboarding_gap')
      registered, no pivot   → PIVOT_MISSING        → propose pivot row (never Nuxt count)
      group, no label        → LABEL_MISSING        → system_issues('label_missing') [propose]
  surface every finding on Registries-Pivot (visible, with next_action), never hide.

Surface behaviour

A newly appeared object that has no known registry/list/pivot is shown visibly on the reflection screen with verification_status = unverified, warning_flags = [orphan|unmonitored|pivot_missing], and next_action = register | onboard | propose_pivot | propose_label. The count for such a node is rendered as PIVOT_MISSING, never a fabricated number (Đ28).

Verdict

REUSE — the detection functions exist; the work is to route their output onto the surface and into system_issues per doc 06, plus propose the missing pivots. No new scanner engine. This session ran the accounting rehearsal read-only (doc 02) and did not execute fn_birth_onboarding_full_scan (it may write) — that run is deferred to an approved window.

Back to Knowledge Hub knowledge/dev/reports/architecture/registries-pivot-os-agency-count-integrity-orphan-phantom-label-pin-rehearsal-2026-05-31/07-new-object-scanner.md