KB-1F1A

D36 NVSZ Macro A — 02 Live Survey

4 min read Revision 1
d36live-surveymacro-a2026-05-25

D36 NVSZ Macro A — 02 Live Survey

Captured at: 2026-05-25 12:40 UTC (pre-apply baseline)

Environment

Item Value
Database directus
Container postgres (image postgres:16, up 5 weeks healthy)
PG version 16.13
Apply-channel user workflow_admin via local Unix socket (pg_hba local all all trust)
Read user (this MCP) context_pack_readonly
Schema for staging iu_core (will be created by Macro A — confirmed not present pre-apply)

Docker containers (10 total)

incomex-agent-data, incomex-claude-kb, incomex-claude-mcp, incomex-directus, incomex-nginx, incomex-nuxt, incomex-qdrant, pg-restore-test-20260520T031054Z, postgres, uptime-kuma. All healthy except pg-restore-test (no health check defined).

Pre-apply counters

Counter Value
information_unit 175
iu_lifecycle_log 146
iu_vector_sync_point 152
knowledge_documents 4272
dot_iu_command_catalog 26
birth_registry 750,964
collection_registry 166
entity_species 41
species_collection_map 162
event_type_registry 26
public.tables (BASE) 267
public.views 51
public.routines 496
iu_core.* 0 (schema absent)

Schema reality vs memory expectation

  • Live DB is directus inside container postgres (memory entry [[feedback-channel-memory-drifts-verify-live]] vindicated again).
  • Existing iu_core_* tables (iu_core_retention_policy, etc.) live in public schema with iu_core_ table-name prefix — not in a real iu_core schema. Macro A creates the schema as additive substrate.
  • "Species table" is entity_species, not species.
  • Gate table is tac_birth_gate_config with mode CHECK in {block,warn}.
  • collection_registry."group" is FK to collection_groups(code) — 9 valid codes (GRP-AI|BUSINESS|CMS|GOVERNANCE|JUNCTION|LOG|REGISTRY|SYSTEM|WORKFLOW).

Existing gates with iu_core.* checker_id (pre-apply)

Zero. The 3 D36 gates are new (staging_writes_enabled, staging_cleanup_enabled, no_vector_staging_excluded).

Existing vector tables

Table/View Purpose
iu_vector_sync_point SQL-side ledger of which IU rows have been embedded
v_iu_vector_sync_status observability
iu_qdrant_collection_registry logical Qdrant collection registry
v_iu_qdrant_collection_active observability

The staging tables do not participate in any of these. No FK relation, no INSERT trigger that would route into them.

Qdrant

Running at incomex-qdrant:6333. Requires API key — not used in this macro for write. Probe deferred to external runner (V6 of healthcheck).

Backup taken

Stage Path Size (B) sha256
pre-apply /tmp/d36_macroA_pre_20260525T124058Z.schema.sql 1,229,181 57fbae483215898226d5f7a6cb07a4fb2cd10b75a0210d6275415d8df6737bd9

Function/trigger counts (pre)

Pattern Count
fn_iu_% 87
trg_iu_% 18

(Macro A adds +5 fn (in iu_core schema, not counted under fn_iu_% since they are iu_core.fn_iu_staging_* not public.fn_iu_*); +0 trigger.)

Channel verification

$ ssh contabo "docker exec postgres psql -U workflow_admin -d directus -c '…'"
current_user=workflow_admin, current_database=directus, pg_version=PG16.13

Trust socket confirmed alive at start of macro. No GRANT-style channel block.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-d36-no-vector-staging-zone-macro-a-substrate-birth-dot-healthcheck/02-live-survey.md