fix: tighten kokoro profile handling

This commit is contained in:
James Pine
2026-03-19 19:32:49 -07:00
parent a71011741d
commit d70b878b71
7 changed files with 618 additions and 91 deletions
+5 -8
View File
@@ -191,11 +191,12 @@ def _resolve_relative_paths(engine, tables: set[str]) -> None:
Idempotent: absolute paths are left untouched.
Strategy: paths like "data/generations/abc.wav" are rebased onto the
configured data directory. If the path starts with "data/", strip that
prefix and prepend get_data_dir(). Otherwise, try resolving relative to
CWD as a fallback.
configured data directory. If the path starts with "data/", strip that
prefix and prepend get_data_dir(). Otherwise, join the relative path
directly under get_data_dir().
"""
from pathlib import Path
from ..config import get_data_dir
data_dir = get_data_dir()
@@ -229,11 +230,7 @@ def _resolve_relative_paths(engine, tables: set[str]) -> None:
else:
rebased = data_dir / p
if rebased.exists():
resolved = rebased
else:
# Fallback: resolve relative to CWD
resolved = p.resolve()
resolved = rebased.resolve()
if resolved.exists():
conn.execute(