KB-746E

Opus Review — B3-F1c-a Probe PARTIAL — Decisions Needed

3 min read Revision 1
p3dbirth-systemb3f1cfull-scanreviewpartial

Opus Review — B3-F1c-a Full-Scan Probe + Compile PARTIAL — Decisions Needed

Date: 2026-05-13


Agent compliance: PASS

Probe thorough, function compiled from rev3 logic, rollback has negative-assertion guard, zero mutation. PARTIAL = correct status because scheduling requires non-SQL companion.

3 key findings

1. pg_cron = CLOSED

Neither installed nor available in PG 16.13 image. Not a viable path without image rebuild.

2. system_health_checks = definition registry, not results table

Has: code, name, jurisdiction, check_kind, executor_type, threshold_config, severity_on_fail, is_active. Does NOT have: status, result, details_json, checked_at. Per-run summary cannot INSERT here. Function returns JSONB summary instead — gap details go to system_issues via existing helper.

This is a design fact: system_health_checks stores WHAT to check, not CHECK RESULTS. Results live in the function return value + system_issues rows.

3. Directus Flows = only proven automatic scheduler

5+ active scheduled flows already running (DOT-REG Count Refresh, Health Check, Permission Regression, etc.) via trigger='schedule' + chained HTTP request to Nuxt. This is the live automatic mechanism.

What's ready now

fn_birth_onboarding_full_scan() — compiled, conflict-free, reuses rev3 logic. Can be CREATE'd in PG via B3-F1c-b. Callable manually or via any scheduler.

What needs separate design

Directus Flow + Nuxt endpoint to call the function automatically every 6h. This is a Nuxt/Directus task, not a PG DDL task. Separate follow-up.

GPT decisions needed

  1. Approve B3-F1c-b function creation? (CREATE FUNCTION only — scheduling is separate)
  2. Accept DIRECTUS_FLOW as scheduling path? (Nuxt endpoint design = separate session)
  3. Accept system_health_checks = definition-only? (Results via JSONB return + system_issues)

Proposed sequence

B3-F1c-b: CREATE FUNCTION fn_birth_onboarding_full_scan() — PG DDL only
B3-F1c-c: Directus Flow + Nuxt endpoint design — separate session
After both: full-scan runs automatically every 6h → B3-F COMPLETE

Alternatively: function can be called manually SELECT fn_birth_onboarding_full_scan() while Directus Flow is designed. Not 100% auto, but function exists and works.


b3f1c_probe = PARTIAL_ACCEPTED
function_ready = true
scheduling_ready = false (needs Directus Flow design)
next_action = GPT_DECIDE → B3F1CB_FUNCTION_CREATE

Opus Review | B3-F1c-a PARTIAL | 2026-05-13

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/opus-review-b3f1c-full-scan-probe-partial-decisions-needed-2026-05-13.md