MechaCat02
6ec034fb1d
refactor(apply): unify divergence detection and drop the plan-path N+1
...
Review #3 (LOW). `divergence_preview` (plan path) compared parent slugs
case-sensitively from its own `get_by_slug`, while the apply path
(`reconcile_group_structure_tx`) compares resolved parent ids. On a mixed-case
parent slug the two could disagree — `pic plan` reporting `diverged` while
`pic apply` hard-errors "parent does not exist".
`resolve_existing_group_ids` becomes `load_existing_groups`, returning the full
`Group` rows it already loads; `plan_tree` derives the id map from them and
passes the map to `divergence_preview`, which now reads each node's own row
without a per-node `get_by_slug` (kills the N+1), resolves an in-tree parent's
slug from the same map, and compares parent slugs case-insensitively so the
preview agrees with the apply path's id-based check.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-07 21:49:05 +02:00
..
2026-06-01 21:46:45 +02:00
2026-05-25 19:30:25 +02:00
2026-05-27 19:27:52 +02:00
2026-06-12 18:12:54 +02:00
2026-05-26 22:21:37 +02:00
2026-06-12 18:12:54 +02:00
2026-06-25 20:10:20 +02:00
2026-07-01 19:32:20 +02:00
2026-05-25 21:03:05 +02:00
2026-05-27 22:00:04 +02:00
2026-06-24 19:59:00 +02:00
2026-06-24 19:59:00 +02:00
2026-06-12 17:15:09 +02:00
2026-06-06 12:10:32 +02:00
2026-06-06 18:03:51 +02:00
2026-06-07 20:50:25 +02:00
2026-06-07 20:09:31 +02:00
2026-06-05 23:17:24 +02:00
2026-06-06 12:04:09 +02:00
2026-07-07 21:47:59 +02:00
2026-07-07 21:49:05 +02:00
2026-07-01 21:47:27 +02:00
2026-06-12 18:37:34 +02:00
2026-05-27 19:27:52 +02:00
2026-06-12 19:08:31 +02:00
2026-06-05 23:15:47 +02:00
2026-07-02 22:08:21 +02:00
2026-06-24 22:00:32 +02:00
2026-06-26 07:07:04 +02:00
2026-07-01 21:34:14 +02:00
2026-06-01 21:46:45 +02:00
2026-06-01 22:17:25 +02:00
2026-06-09 18:34:42 +02:00
2026-06-13 15:01:04 +02:00
2026-07-02 22:33:11 +02:00
2026-06-02 19:55:14 +02:00
2026-06-30 07:33:39 +02:00
2026-06-10 21:22:15 +02:00
2026-06-12 18:38:28 +02:00
2026-06-24 19:06:52 +02:00
2026-06-29 20:31:14 +02:00
2026-06-12 18:38:28 +02:00
2026-06-30 19:46:39 +02:00
2026-06-11 20:24:55 +02:00
2026-06-30 20:04:09 +02:00
2026-06-06 15:02:21 +02:00
2026-07-01 21:22:07 +02:00
2026-06-30 19:19:48 +02:00
2026-07-01 21:17:12 +02:00
2026-07-01 21:17:12 +02:00
2026-07-01 21:17:12 +02:00
2026-07-01 21:17:12 +02:00
2026-07-01 21:17:12 +02:00
2026-07-01 21:17:12 +02:00
2026-06-24 19:59:00 +02:00
2026-07-02 21:48:59 +02:00
2026-07-02 22:08:21 +02:00
2026-07-02 22:08:21 +02:00
2026-07-01 21:17:12 +02:00
2026-07-07 20:23:10 +02:00
2026-06-29 19:32:34 +02:00
2026-07-07 07:49:52 +02:00
2026-06-10 21:03:10 +02:00
2026-06-26 07:17:33 +02:00
2026-06-13 15:01:04 +02:00
2026-06-01 21:29:59 +02:00
2026-06-10 21:22:15 +02:00
2026-07-06 21:26:10 +02:00
2026-06-13 15:01:04 +02:00
2026-06-11 20:42:51 +02:00
2026-07-02 22:33:11 +02:00
2026-05-23 00:31:08 +02:00
2026-06-29 20:07:59 +02:00
2026-07-01 20:33:09 +02:00
2026-06-06 19:08:21 +02:00
2026-06-01 22:01:42 +02:00
2026-07-06 21:26:10 +02:00
2026-07-06 21:26:10 +02:00
2026-07-02 21:48:59 +02:00
2026-07-02 21:48:59 +02:00
2026-06-07 20:16:33 +02:00
2026-06-07 20:00:36 +02:00
2026-06-09 20:03:10 +02:00
2026-06-12 20:43:18 +02:00
2026-06-25 21:11:59 +02:00
2026-07-01 19:34:22 +02:00
2026-07-01 20:07:06 +02:00
2026-05-23 16:26:12 +02:00
2026-05-22 23:16:32 +02:00
2026-06-24 22:00:32 +02:00
2026-06-24 22:13:00 +02:00
2026-06-24 21:48:33 +02:00
2026-06-03 20:23:18 +02:00
2026-07-01 20:04:32 +02:00
2026-06-06 15:00:47 +02:00
2026-06-24 19:59:00 +02:00
2026-06-06 19:08:21 +02:00
2026-07-02 22:33:11 +02:00
2026-07-02 21:30:32 +02:00
2026-06-07 20:50:25 +02:00
2026-06-13 09:59:24 +02:00
2026-06-24 21:11:46 +02:00
2026-06-24 21:11:46 +02:00
2026-06-24 20:59:23 +02:00