Skip to content

fix(review): preserve recovered takes and stale-video guards - #406

Merged
IAnMove merged 8 commits into
developmentfrom
cursor/critical-bug-management-48e0
Sep 12, 2026
Merged

fix(review): preserve recovered takes and stale-video guards#406
IAnMove merged 8 commits into
developmentfrom
cursor/critical-bug-management-48e0

Conversation

@cursor

@cursor cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Guardar notas, seleccionar una toma o aprobarla conserva ahora el historial que Director recupera de los metadatos de los vídeos. Antes, la pantalla mostraba tomas recuperadas que el guardado rechazaba o hacía desaparecer.

save_review carga la misma proyección que la lectura del pipeline, dentro del bloqueo existente, y persiste las decisiones sobre ese estado. Mantiene la comprobación de workspace, el bloqueo de producción activa y la escritura atómica.

Incluye íntegramente #409 y #410, detectado por la automatización de Cursor durante esta revisión: recuperar la toma seleccionada no debe borrar video_stale después de regenerar la imagen inicial. El control de Rejoin se aplica tanto a los vídeos normales como a MiniMax H3 y H3 Legacy, con segmentos o una toma seleccionada. Esta corrección evita que el nuevo guardado persista como actual una toma obsoleta.

Cobertura adicional para conservar IDs y datos previos, rechazar una toma perteneciente a otra producción, evitar escrituras parciales al fallar un lote con historial recuperado y conservar la marca de vídeo obsoleto en lectura, notas y Rejoin. Las pruebas de #406, #409 y #410 se mantienen juntas. Los cuatro casos H3 comprueban que no se concatena ni se modifica el checkpoint cuando el vídeo está obsoleto.

Validación local: 83 pruebas de tests/test_director_review.py, tests/test_director_cancellation.py y tests/test_director_h3_workflow_edits.py correctas, compilación Python, guard de repositorio y git diff --check correctos. El caso de selección obsoleta falla antes del arreglo de #409. Las pruebas usan archivos temporales, metadatos y concatenación simulados; no generan vídeo.

Base actualizada a development (60e867a6), que ya incluye #404. HEAD final b8e3019041fd250b90fa858f203fd79330a48f26. Ratchet local correcto contra esa base. Todas las GitHub Actions del HEAD final correctas, incluido CI required, E2E Chromium y speech Windows: CI del HEAD. Las dos automatizaciones de Cursor finalizaron correctamente. El check formal opcional Independent QA sigue neutral, no certificado. Preparado para integrar; no mezclado en development.

cursoragent and others added 2 commits September 12, 2026 14:29
save_review read the raw pipeline checkpoint, so historical takes that
GET backfills from sidecars could not be selected and a successful save
replaced the dashboard with a file that omitted that history.

Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
@IAnMove
IAnMove changed the base branch from fix/integration-audit-20260912 to development September 12, 2026 18:19
@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 5 file(s); +218/-19; 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/director_pipeline.py, app/services/director_review.py, tests/test_director_cancellation.py, tests/test_director_h3_workflow_edits.py, tests/test_director_review.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.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown

Code health

Quality score: 63.8/100

Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.

Component Weight Current Change
Cyclomatic health 45% 59.2 +0.0
File concentration 25% 73.7 +0.0
Oversized-file debt 20% 49.4 +0.0
Modularity 10% 88.3 +0.0

Change vs PR base: +0.0 points.

Metric Value
Production LOC 313,657
Production files 1,052
Test LOC 128,002
Functions measured 21,367
Functions complexity ≥ 15 906
Maximum complexity 674
Policy code-health-policy-v1
HEAD 06625e4036714f87169054255b3b19b88b8ed94f
Base 60e867a6aae832d5b56c5ebd44b99867bda55b26
UI measurement complete

Markdown, JSON catalogs and tests are out of this table. Only app/ runtime + ui/src TS/JS count.

Most complex functions

Complexity Where
674 app/wgp.py:7230 generate_video
382 ui/src/stores/useStore.ts:4129 Async method 'startGeneration'
355 app/_launch_runtime.py:23674 _run_generation
308 app/wgp.py:12372 generate_video_tab
269 ui/src/components/Sidebar/SceneAnimatorPanel.tsx:508 Function 'SceneAnimatorPanel'
264 ui/src/stores/useStore.ts:8684 Async method 'loadSettingsFromOutput'
258 app/services/director/planners/short_film.py:3433 ShortFilmPlanner._plan_story_driven
248 app/services/director_pipeline.py:13616 _run_video_generation
245 app/services/director_pipeline.py:7716 _run_pipeline
233 ui/src/features/agent/agentActions.ts:1152 Function 'parseAction'
226 app/services/director_pipeline.py:6545 update_comic_preview
225 ui/src/features/agent/agentActions.ts:2998 Async function 'executeAgentActions'

Trend vs baseline

Metric Δ
Production LOC +7
Test LOC +192
Functions ≥ 15 +0
Maximum complexity +0

Warnings

  • production LOC increased by +7
  • hotspot app/services/director_pipeline.py increased by +4 lines

Ratchet passed.

Backfill used a Studio selection as playback authority and also cleared
video_stale. After an image rerun the selected take no longer matches the
new start frame, but load, prompt edits, and review persist then let Rejoin
assemble that outdated video.

Keep the selection for playback and leave video_stale for callers that
gate export.

Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
@IAnMove
IAnMove marked this pull request as ready for review September 12, 2026 18:34
@IAnMove
IAnMove marked this pull request as draft September 12, 2026 18:42
IAnMove and others added 2 commits September 12, 2026 20:43
…tale-selected' into codex/review-pr406-20260912

# Conflicts:
#	tests/test_director_review.py
Rejoin gated video_stale only on the non-H3 path. MiniMax H3 productions
still assembled playable segments or a Studio selection after the start
image changed, so the joined movie no longer matched the current frame.

Raise the same stale-clip error before the H3 branch.

Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
@IAnMove IAnMove changed the title Fix review persist dropping sidecar-recovered takes fix(review): preserve recovered takes and stale-video guards Sep 12, 2026
@IAnMove
IAnMove marked this pull request as ready for review September 12, 2026 18:52
…3-stale-rejoin' into codex/review-pr406-20260912
@IAnMove
IAnMove marked this pull request as draft September 12, 2026 18:54
@IAnMove
IAnMove marked this pull request as ready for review September 12, 2026 19:00
@IAnMove
IAnMove merged commit 4d278cb into development Sep 12, 2026
15 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