Skip to content

feat: provenance de carpeta vs Workspace en 3D y Director - #89

Merged
IAnMove merged 1 commit into
mainfrom
feat/provenance-3d-director
Sep 2, 2026
Merged

feat: provenance de carpeta vs Workspace en 3D y Director#89
IAnMove merged 1 commit into
mainfrom
feat/provenance-3d-director

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Objetivo

Aplica el contrato de dominio de #86 al flujo 3D + Director. PR cohesivo de writers de servicio (no _launch_runtime.py). +691/−23.

Contrato

  • workspace_id = ID opcional de colección Workspace. No se inventa a partir del nombre de un directorio.
  • output_folder = nombre de la carpeta de salida física (nunca una ruta absoluta del host).
  • El campo workspace de jobs/pipelines en este código es el nombre de carpeta → se pasa como output_folder=.
  • Iniciador = origin.actor / tool / capability. Actor ausente permanece unknown, nunca se inventa user.
  • Proveedor/modelo = generation.model, no origin.
  • Tras el mesh 3D/rig en disco, un fallo de sidecar no borra el GLB (publish_generation_sidecar_best_effort).
  • CommandContext: job_id, task_id, root_task_id, pipeline_id en correlaciones del sidecar → execution.*. El pipeline id de Director sigue forzando tool=director.

Writers tocados

  • app/services/model3d_service.py — Hunyuan3D: output_folder= + model_type/provider en params
  • app/services/rig_service.py — mismo patrón, tool=rig
  • app/services/director_pipeline.py_write_director_assembly_sidecar y persist_pipeline_output_timing
  • app/services/alternative_songs.pysave_sidecar / remount: carpeta vs colección real (workspace_…); copia IDs de pipeline Director

No se toca Studio generate, Wizard, Series Lab, Comics ni _launch_runtime.py.

Tests

  • tests/test_model3d_rig_task_identity.py — carpeta sin workspace_id, IDs en execution, GLB sobrevive si el publish interno lanza
  • tests/test_director_pipeline_timing.py — assembly/timing: output_folder, pipeline_id/job_id/task_id
  • tests/test_alternative_songs.py — folder-only, colección real distinta, IDs de Director en remount
  • tests/test_provenance_3d_director.py — writers vía helpers / sidecar parcheado
  • tests/test_asset_manifest.py y scripts/architecture_contracts.py — sin cambios de contrato

Local: 64 passed. python scripts/architecture_contracts.py ok.

No mezclar hasta CI verde.


Note

Medium Risk
Changes gallery manifest origin/execution fields across multiple production paths; incorrect prior workspace_id usage could affect downstream provenance consumers, but scope is metadata writers with broad test coverage and no auth or payment logic.

Overview
Aligns 3D, Rig, Director, and alternative-songs sidecar writers with the asset-manifest provenance contract: workspace_id is only an optional Workspace collection (workspace_…), and output_folder is the physical output directory basename (never a host path).

Hunyuan3D and rig jobs now publish with output_folder= derived from the job’s workspace string, plus model_type / provider on generation params. Director assembly and timing persistence do the same, and they record pipeline_id, job_id, task_id, and root_task_id on manifests for execution.* correlation.

Alternative songs resolves folder vs collection via _sidecar_location (folder names are not invented as collections; real collection IDs are preserved on re-save). Remount sidecars copy Director pipeline/task IDs and default remount provider to ffmpeg.

Tests are updated and test_provenance_3d_director.py adds end-to-end checks (absolute paths stripped, folder-only origin, provenance round-trip).

Reviewed by Cursor Bugbot for commit f7aad1e. Configure here.

Los writers de Hunyuan3D, Rig, Director y canciones alternativas pasan
output_folder para el directorio físico y no inventan workspace_id.
Los IDs de job/task/pipeline van a execution; el GLB se conserva si
falla el sidecar.
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: medium
Scope: 8 file(s); +691/-23; backend services

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

Findings

  • medium — Very large file change (tests/test_provenance_3d_director.py)
    tests/test_provenance_3d_director.py adds 406 lines. Consider splitting the PR.

Changed files

  • added: tests/test_provenance_3d_director.py
  • modified: app/services/alternative_songs.py, app/services/director_pipeline.py, app/services/model3d_service.py, app/services/rig_service.py, tests/test_alternative_songs.py, tests/test_director_pipeline_timing.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 commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f7aad1e. Configure here.

@IAnMove
IAnMove merged commit a68809f into main Sep 2, 2026
5 checks passed
@IAnMove
IAnMove deleted the feat/provenance-3d-director branch September 5, 2026 11:53
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.

1 participant