KB-26AA

P3D B3-F1c-c dot_config Policy Seed (COMPILED, NOT EXECUTED)

3 min read Revision 1

P3D — B3-F1c-c dot_config Policy Seed (COMPILED)

Date: 2026-05-13 Mode: COMPILE-ONLY. NOT EXECUTED. candidate_cadence_requires_review: true Phase 5 probe result: no existing policy.birth_full_scan% keys (0 rows).


Probed precedent (live)

  • dot_config schema: key TEXT NOT NULL, value TEXT NOT NULL, description TEXT NULL, updated_at TIMESTAMPTZ NOT NULL DEFAULT now().
  • Existing sibling policy (precedent): policy.birth_trigger.accepted_sibling_scope stores a JSON object as TEXT, with shape {"version":1,"source_review":"<KB path>","entries":[...]}.
  • No existing policy.birth_full_scan% row → cadence MUST be a candidate.

Compiled seed SQL (NOT EXECUTED)

-- =========================================================================
-- B3-F1c-c dot_config policy seed
-- DO NOT EXECUTE. Awaiting GPT review.
-- The Directus Flow seed (sibling artifact) MUST use the SAME cadence_cron
-- value approved here. No unsynchronized values.
-- =========================================================================

BEGIN;

-- 1. Enable flag — gates the Nuxt endpoint at runtime.
INSERT INTO dot_config (key, value, description, updated_at)
VALUES (
  'policy.birth_full_scan.enabled',
  '{"version":1,"source_review":"knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-b3f1c-c-third-pass-approved-for-agent-probe-compile-2026-05-13.md","value":true}',
  'B3-F1c-c master switch for birth_onboarding_full_scan scheduled job. When value=false, Nuxt endpoint returns {status:"disabled"} without invoking PG fn.',
  CURRENT_TIMESTAMP
)
ON CONFLICT (key) DO NOTHING;

-- 2. Cadence — CANDIDATE value requires GPT/user review.
INSERT INTO dot_config (key, value, description, updated_at)
VALUES (
  'policy.birth_full_scan.cadence_cron',
  '{"version":1,"source_review":"knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-b3f1c-c-third-pass-approved-for-agent-probe-compile-2026-05-13.md","value":"0 */6 * * *","candidate_cadence_requires_review":true}',
  'B3-F1c-c cron schedule for birth_onboarding_full_scan. CANDIDATE — must be approved by GPT/user before Directus Flow becomes active. Directus Flow seed MUST match this value.',
  CURRENT_TIMESTAMP
)
ON CONFLICT (key) DO NOTHING;

COMMIT;

Notes

  • dot_config has no PK declared in the probed columns, but the existing usage with ON CONFLICT (key) DO NOTHING assumes key is unique. Verify the live constraint before execution — if no unique index on key, the seed must be rewritten as an UPSERT pattern using DELETE ... WHERE key=...; INSERT ... inside a single transaction.
  • Both value strings are JSON literals stored as TEXT — matches the live policy.birth_trigger.accepted_sibling_scope precedent.

B3-F1c-c Scheduler Artifacts | COMPILE-ONLY | 2026-05-13

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/artifacts/p3d-birth-system-b3f1c-c-dot-config-policy-seed.sql.md