KB-DAD8

04 — Candidate Merge/Split Logic (anti-explosion)

3 min read Revision 1

04 — Candidate Merge/Split Logic

Goal: 143 raw orphan objects (and 80 dedup'd host entrypoints) must NOT become 80–143 fake "workflows". They were collapsed into 17 coherent clusters, of which only 6 are genuinely new managed processes.

Grouping keys used

  • invoked target / basename familypg-backup, qdrant-backup, *backup-to-gdrive, dot-kb-* all fold into WPC-BACKUP-DR (cron line + the .sh it calls = ONE candidate, two entrypoints, not two).
  • functional family — all permission/route/config guards → WPC-PERM-GUARD; all health/connectivity probes → WPC-HEALTH-MON.
  • DOT familydot-nrm-{discover,sync,verify,lifecycle} → one WPC-DOT-NRM (DOT implementation of an existing process, not 4 processes).
  • shared librarycron-env.sh is sourced by many cron jobs → WPC-CRON-ENV-HELPER, classified COMPONENT / NOT_PROCESS (it is not itself a process).
  • DB functionauto_apply_approval() + fn_expire_stale_approvals() → WPC-APPROVAL-LIFECYCLE.

Duplicate / noise suppression (explicit, not silent)

  • *.pre-fix-*, *.pre-s174, *.pre-phase-c-*, *.pre-claude-toolslist-*, *.retired, *.anchorsWPC-NOISE-QUARANTINE (BACKUP_OR_NOISE). 3 such objects reached the operational orphan queue; the snapshot held more but the queue had already excluded most.
  • A cron line calling a script AND the script file itself are linked as two members (roles ENTRYPOINT + IMPLEMENTATION) of the SAME candidate — counted once at candidate level.

Merge/split recommendations surfaced as actions

v_process_axis_candidate_action_queue_v3 exposes MERGE_CANDIDATES and SPLIT_CANDIDATE buttons on the relevant candidates (all PROCESS_CANDIDATE + DOT/COMPONENT), so an operator can further merge (e.g. fold WPC-MONITOR-BOOTSTRAP into WPC-BACKUP-DR) or split (e.g. separate qdrant from pg backup) under preview, fail-closed.

Result

80 raw host entrypoints / 143 objects → 17 clusters → 6 new process candidates. No candidate explosion; OS timers (29) and noise (3) are explicitly bucketed out, not counted as processes.

Back to Knowledge Hub knowledge/dev/reports/architecture/workflow-orphan-remediation-process-candidate-rp-assignment-ui-content-canon-gate-2026-06-04/04-candidate-merge-split-logic.md