KB-28DD
FIX5 03 Remove Legacy Planner v2
2 min read Revision 1
qt001fix5plannerrepoint
03 — Remove Legacy Planner v2 from the Authoritative Path
Native fact planner replaces plan_v2; every authoritative caller repointed.
fn_qt001_plan_v5(collection): native per-collection FACT planner (src_rows, existing_births, expected_delta, collision_count, unresolvable, divergence, apply_safe) computed from the governed identity/policy resolvers (fn_birth_policy_decision,fn_birth_resolve_identity) + birth_registry. Facts only; apply AUTHORITY is downstream (rule-engine + readiness + signoff + capability), never this function's flags. NO reference to plan_v2.fn_qt001_plan_all_v5(): iterates plan_v5 (no plan_all/plan_v2).- Repointed (CREATE OR REPLACE, FIX4 bodies captured for rollback): writer
fn_dot_birth_qt001_apply(first stmt now plan_v5; execute path checks legacy guard + readiness v8 + fingerprint v5 + signoff v5); driversp_dot_birth_qt001_apply(plan_v5; batch/runaway fromqt001_runtime_config, no magic literals);fn_qt001_refresh_plan_snapshot→plan_all_v5; builderfn_qt001_build_plan_registry→fingerprint v5 + signals v5 + blocked_reason v5, NULL-strict checksum, content-addressed plan_id,pg_advisory_xact_lockserialization, rejects invalid fingerprint; tier wrapperfn_qt001_machine_tier→v5;fn_qt001_machine_blocked_reason→v5 inputs.
Guards: v_qt001_no_legacy_planner_guard (roots_reaching_planner_v2=0, roots_reaching_legacy=0, pass=true), v_qt001_planner_v2_sentinel_only_guard (plan_v2 exists, classified legacy, roots_reaching=0, pass=true), v_qt001_writer_authoritative_repoint_status_v5 (writer uses plan_v5/readiness_v8/fingerprint_v5/signoff_v5; driver uses plan_v5; pass=true). plan_v2 retained as frozen sentinel (not dropped, unreachable). Tier dist unchanged vs FIX4: TIER2 7 / TIER3 6 / BLOCKED 6 / INELIGIBLE 55 / TIER1 0.