Aller au contenu

set_source_duplicate_merge_plan

AUTHOR (or clear) the merge plan for one duplicate group, addressed by its shared source_value (Source Health duplicates). This is how the sonenta-source-health agent records the CONSOLIDATION it proposes and the dev accepted: which keys collapse onto which canonical, and what to do with whatever still shares the text. merge_plan = {clusters:[{canonical_key_uuid, redundant_key_uuids:[...]}], survivor_outcome:'allowed'|'differentiate'} - or null/omit to CLEAR the plan. Saving a plan sets the group's status to to_fix. After authoring, the agent repoints t() usages, trashes the redundant keys (delete_keys_bulk), marks each cluster applied (mark_cluster_applied), and finally set_duplicate_status(resolved). Author only a plan the dev accepted - never decide a merge silently.

NomTypeDescription
project_uuidstringoptionnelProject UUID. Required when multiple projects are configured (SONENTA_PROJECTS); defaults to the single configured project otherwise.
source_valuestringrequisThe shared source-language value identifying the duplicate group (from list_source_duplicates).
merge_planobject \nulloptionnel
files_modifiedarrayoptionnelOptional audit trail of the t() repoints you made while resolving this group: each {path (required), line?, found_key, replacement_key, occurrences?}. found_key = the key string that WAS in the code at this spot (the old, redundant one); replacement_key = the canonical you repointed it to (an existing survivor, OR the new_key from apply_new_key_cluster). Accepted on every resolution path and MERGED (union + dedup by the full normalized entry) - record edits at whatever step you make them and they accumulate; omit to preserve the existing list. Always pass the STRUCTURED field, never just a note.
{
"tool": "set_source_duplicate_merge_plan",
"arguments": {
"source_value": "<source_value>"
}
}