--- id: "0124" title: "EPIC: dag_engine cleanup (registry.db huerfana + Mantine drift + --migrate-only)" status: pendiente type: epic domain: - apps-infra scope: app priority: media depends: [] blocks: [] related: - "0121a" created: 2026-05-19 updated: 2026-05-19 tags: [dag_engine, cleanup, technical-debt] --- # 0124 — dag_engine cleanup Origen: detectado lateral durante `fn-recopilador design-e2e apps/dag_engine` en issue 0121a. ## Sub-tareas ### 0124a — Borrar `registry.db` huerfana en `apps/dag_engine/` Archivo `apps/dag_engine/registry.db` (262 KB) viola `db_locations.md` ("registry.db SOLO en raiz"). Ya fue borrado el 2026-05-16 y reaparecio — investigar como se regenera (probable bug en path resolution de un test/CLI subcmd o un launcher). Acceptance: - [ ] Borrar `apps/dag_engine/registry.db`. - [ ] Identificar y arreglar el origen (grep el codigo de dag_engine por paths relativos a registry.db sin `FN_REGISTRY_ROOT`). - [ ] Test idempotente: borrar + ejecutar dag_engine + verificar que NO reaparece. ### 0124b — Arreglar `pnpm build` del frontend (Mantine API drift) Errores en `StepTimeline.tsx:49` + `main.tsx:1`. Probable culpa: actualizacion de Mantine v9 que cambio API. Bloquea `dag_engine` frontend embebido (`//go:embed all:frontend/dist`). Acceptance: - [ ] `cd apps/dag_engine/frontend && pnpm install --frozen-lockfile && pnpm build` exit 0. - [ ] `dist/` se regenera + es embebible por el backend Go. - [ ] Bumpar version del app via `/version`. ### 0124c — Añadir flag `--migrate-only` al binario Permite gate idempotente de migrations en `e2e_checks` sin usar `list` como proxy. Tambien util para deploys. Acceptance: - [ ] `./dag_engine --migrate-only --db /tmp/x.db` aplica migrations + exit 0 + NO arranca server ni jobs. - [ ] Idempotente (segunda invocacion no falla). - [ ] Documentado en `app.md` (`subcommands:` block o equivalente). ## DoD epic - 3 sub-tareas cerradas con sus tests verdes. - `fn doctor` sobre dag_engine devuelve verde. - Bump version (`/version apps/dag_engine minor`). - Propuesta `dag_engine.yaml` del issue 0121a actualizada: promover `build_frontend` de warning a critical + reemplazar proxy `list` por `--migrate-only` en check `migrations_apply`.