KB-CB4E

GPT Direction — Production DDL/Collection Readiness Probe

3 min read Revision 1
gptdirectionprobeproduction-ddlcollectionsp9dieu38

GPT Direction — Production DDL/Collection Readiness Probe

Date: 2026-04-28

Verdict

A small read-only probe is required before patching the Production DDL/Collection Gate Design v0.2.

Reason: several inputs are factual and risky to assume: exact G6 function inventory, existing public fn_tac_* whitelist, canonical DDL bundle source, seed schema qualification, and Directus collection registration API shape for existing PostgreSQL tables.

Direction to Opus

Dispatch a low-effort read-only probe before further design decisions.

Scope

  • Read-only only.
  • No production DDL.
  • No Directus collection creation.
  • No seed/insert/update/delete.
  • No role/policy/permission/token mutation.
  • No G8B/G11/P9.

Checks

  1. Exact G6 DDL inventory

    • Read G6 run #4 action log and G6 package/bundle evidence.
    • Confirm exact 14 table names.
    • Confirm exact 6 function names and 6 trigger names.
    • Confirm counts: FK, UNIQUE, CHECK, indexes.
  2. Existing public fn_tac_* baseline

    • On VPS/directus DB, read-only query current public fn_tac_* functions.
    • Confirm public.fn_tac_log_checker_issue exists and should be whitelisted.
    • Confirm no unexpected production tac_* tables/functions/triggers already exist.
  3. Canonical DDL bundle source

    • Verify whether /tmp/g6_run4.../ddl/g6_execution_bundle.sql still exists.
    • If exists, compute hash and compare with action log.
    • Regardless, identify what KB source can regenerate/canonicalize the production DDL candidate.
    • Do not create or modify files unless explicitly doc-only KB draft later.
  4. Seed schema qualification

    • Inspect 8 seed files in KB.
    • Confirm whether they are schema-qualified to p9_g6_dryrun.
    • List exact retargeting needed for production (p9_g6_dryrunpublic).
  5. Directus collection registration shape

    • Read-only inspect Directus 11.5.1 API/docs/current metadata.
    • Determine if existing PostgreSQL tables can be registered via API after they exist.
    • Determine required payload fields for POST /collections for an existing table.
    • Do not create a test collection.
  6. Output recommendation

    • Report whether Production DDL/Collection Gate Design v0.2 can be patched directly.
    • List blockers or unknowns.

Effort

Low, unless Directus collection registration shape requires extra doc lookup; then medium is acceptable.

Output path

knowledge/dev/laws/dieu38-trien-khai/reports/p9-production-ddl-collection-readiness-probe-2026-04-28.md

Stop condition

After uploading report, stop for GPT/User review.