Skip to content

fix(3d): no borrar el GLB si falla el sidecar de provenance - #83

Merged
IAnMove merged 1 commit into
mainfrom
cursor/critical-bug-management-088f
Sep 2, 2026
Merged

fix(3d): no borrar el GLB si falla el sidecar de provenance#83
IAnMove merged 1 commit into
mainfrom
cursor/critical-bug-management-088f

Conversation

@cursor

@cursor cursor Bot commented Sep 2, 2026

Copy link
Copy Markdown

Bug e impacto

Tras un Hunyuan3D o Rig exitoso, publish_generation_sidecar() vive en el mismo try que, ante cualquier excepción, marca el job como failed y llama a _cleanup_partial_output(). Eso borra el GLB ya escrito.

Escenario concreto: el worker termina y el mesh cabe en disco, pero el .meta.json no (disco lleno, error de validación del manifest v1, fallo de I/O). El usuario pierde horas de GPU y ve un job fallido aunque el artefacto existió.

Esta ruta empeoró al añadir el writer de asset-manifest v1 justo después de la generación.

Causa

_run_job_serialized en model3d_service.py y rig_service.py trata el fallo de metadatos como fallo de generación. MiniMax Image ya no hace esto: escribe el archivo y el sidecar va aparte.

Fix

Cuando el worker sale 0 y el archivo existe, la generación queda committed. Un error al publicar el sidecar se registra y el job sigue completed. _cleanup_partial_output solo corre si el mesh no llegó a committed (fallo real o cancelación).

Validación

.venv/bin/python -m pytest tests/test_model3d_rig_task_identity.py -q
# 4 passed

Los tests nuevos mockean publish_generation_sidecar para que lance AssetManifestError y comprueban que el GLB permanece y el job queda completed.

Open in Web View Automation 

Tras Hunyuan3D o Rig, publish_generation_sidecar vivía en el mismo try
que borra la salida ante cualquier excepción. Un fallo de disco o de
validación del manifest v1 marcaba el job como failed y eliminaba un
artefacto GPU ya escrito. El mesh se considera committed al salir el
worker; el sidecar ya no puede destruirlo.

Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 3 file(s); +157/-47; backend services

Automated review from scripts/analyze_pr.py. This is a heuristic pass (no LLM) so humans still own the merge decision.

Findings

  • No heuristic issues. Still run the CI checklist below.

Changed files

  • modified: app/services/model3d_service.py, app/services/rig_service.py, tests/test_model3d_rig_task_identity.py

CONTRIBUTING checklist

  • python scripts/verify_clean_repo.py
  • python -m compileall -q app/services app/launch.py scripts
  • cd ui && npm run build if the UI changed
  • No weights, CivitAI sidecars, or generated guides
  • Stays local-first (no required accounts / telemetry)

Posted by the repo PR review workflow. Re-runs on each push to the PR.

@IAnMove
IAnMove marked this pull request as ready for review September 2, 2026 12:13
@IAnMove

IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner

@cursor review

@cursor

cursor Bot commented Sep 2, 2026

Copy link
Copy Markdown
Author

Bugbot couldn't run — GitHub account mismatch

The GitHub account linked to your Cursor account does not match the PR author.

Please ensure you're using the correct GitHub account, or run Bugbot from a team that covers this repository.

@IAnMove
IAnMove merged commit 0e7e485 into main Sep 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants