fix: resolve all audit findings — e2e coverage, feature system hardening, visual baselines

- Add 8 new E2E specs for AI tools (upscale, enhance-faces, colorize,
  restore-photo, erase-object, smart-crop, passport-photo, red-eye-removal)
  closing all HIGH/MEDIUM coverage gaps from the test matrix audit
- Fix ensureAiDirs() crash on non-Docker environments by gating on
  isDockerEnvironment() — prevents ENOENT when /data doesn't exist
- Bump torch 2.6.0→2.7.0 and torchvision 0.21.0→0.22.0 in feature
  manifest for broader Python version compatibility
- Add Python 3.14 version guard warning in install_feature.py
- Remove duplicate torchvision shims from upscale.py and enhance_faces.py
  (dispatcher.py already handles this at startup)
- Remove orphaned tools.batch i18n key and dead pipeline-builder filter
- Regenerate 4 visual regression baselines for current UI state
- Add data-testid to passport-photo generate button for E2E testability
This commit is contained in:
ashim-hq
2026-04-20 18:47:59 +08:00
parent e7eea34080
commit f67a03bb36
20 changed files with 911 additions and 61 deletions
+1
View File
@@ -38,6 +38,7 @@ export function getManifestPath(): string {
// ── Directory setup ─────────────────────────────────────────────────────
export function ensureAiDirs(): void {
if (!isDockerEnvironment()) return;
mkdirSync(join(AI_DIR, "venv"), { recursive: true });
mkdirSync(MODELS_DIR, { recursive: true });
mkdirSync(join(AI_DIR, "pip-cache"), { recursive: true });
@@ -858,6 +858,7 @@ export function PassportPhotoSettings() {
{analyzeResult && !generating && !generateResult && (
<button
type="button"
data-testid="passport-photo-generate"
onClick={handleGenerate}
disabled={generating}
className="w-full py-2.5 rounded-lg bg-primary text-primary-foreground font-medium disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"
@@ -27,7 +27,7 @@ import { getSettingsSummary } from "./pipeline-step-summary";
/** Tools that can be used as pipeline steps (excludes pipeline/batch/multi-file tools). */
const PIPELINE_TOOLS_BASE = TOOLS.filter(
(t) => !["pipeline", "batch", "compare", "find-duplicates", "collage", "compose"].includes(t.id),
(t) => !["pipeline", "compare", "find-duplicates", "collage", "compose"].includes(t.id),
);
interface PipelineBuilderProps {