refactor: simplify DAG definition persistence (#2552)