fn project_template_launch_row(
conn: &Connection,
root: &LegacyInstance,
) -> Result<bool, String>Expand description
Create the consolidated row for a template-launch chain whose head has
no db_agents row yet — the “Phase 3a stamped, db_agents partially
populated” upgrade shape (codex P1 on #3075). Without this the UPDATE
below affects zero rows, the migration is still recorded applied, and
the chain’s session/status is unreachable once readers flip. Frozen
copy of the consolidate pass-3 / dual-write head-INSERT column mapping
as of v29, INSERT OR IGNORE so it can never clobber a row that
appeared in between. Ok(false) when the definition itself is gone —
nothing to project against (the legacy FK cascade would have removed
such an instance; if it survived it is an orphan).