Skip to content

test(studio): proteger referencias Music con voces Speech guardadas - #283

Merged
IAnMove merged 4 commits into
developmentfrom
cursor/critical-bug-management-22fb
Sep 9, 2026
Merged

test(studio): proteger referencias Music con voces Speech guardadas#283
IAnMove merged 4 commits into
developmentfrom
cursor/critical-bug-management-22fb

Conversation

@cursor

@cursor cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

Resumen ejecutivo

Qué cambia

Protege la referencia elegida en Music cuando Speech conserva voces en su propio borrador. El PR se actualiza sobre development, donde #280 ya separa las referencias por pestaña. El diff final añade pruebas; el código de producto coincide con development.

Para qué sirve

La propuesta anterior infería el origen de una referencia a partir del contador de voces Speech. Con voces guardadas, podía borrar una referencia Music válida o convertir una selección incompleta en un envío sin referencia. Se elimina esa heurística y se comprueba la solución explícita ya integrada.

Impacto para el usuario

La referencia musical mantiene su archivo y workspace fuente, y aparece en la presentación previa al envío. Una selección incompleta sigue siendo un error visible. Las voces Speech quedan disponibles al regresar a esa pestaña.

Riesgo

  • Bajo
  • Medio
  • Alto

Estado

  • En desarrollo
  • Listo para revisión
  • Requiere migración o acción manual

Summary

Music references must not be classified by the hidden Speech voice count. This branch includes current development and removes the obsolete count-based sanitizer from the original proposal. The explicit tab reference ownership landed in #280; no production delta remains against development.

Overview

The added admission test keeps two Speech voices in memory and supplies Music's own canonical reference from another workspace. It verifies reference resolution, the visible one-reference ACK before POST, one correlated queued receipt, exact lyrics/caption and unchanged source parameters/voice state. A second regression keeps an incomplete Music selector invalid instead of converting it into unconditioned generation.

Detailed changes

Backend

No delta against development. Native command schemas and workers are unchanged.

UI and Wizard

The final diff adds two admission/presentation regressions and direct-builder rejection assertions. It uses the integrated audio tab isolation; no alternative form sanitizer is introduced.

Data, provenance and compatibility

The reference URL retains its original workspace. Literal lyrics and caption survive. The original params and saved Speech voices are unchanged. Direct MCP/Wizard commands still reject active TTS metadata and missing references.

Files and ownership

  • ui/tests/studioMusicCommandPresentation.test.tsx: valid-reference ACK/admission and incomplete-reference rejection.
  • ui/tests/musicGenerationCommands.test.ts: closed-builder rejection controls.

Validation

  • Date (UTC): 2026-09-09
  • Base SHA: 06f8ea246fde9487b97c1d4dd1199f898dda5c6e (development)
  • Head SHA: a4756399e56ffdc8328825c72412a923ca428b44
  • Validation scope: full local UI checks plus directed regressions; no new model inference.

The full local check and browser used 46bc5e27; the final commit a4756399 only triggers CI after retargeting. Both have the same Git tree b94ace77d8e1d919dcddd8c9c86d76c5042fb6d4.

Both new regressions fail with the original PR sanitizer after updating its base: it replaces the valid URL with null and the incomplete selector with an empty string. Both pass after removing that sanitizer. Original failure log retained locally.

  • Directed UI: 111 passed across Music commands/presentation, audio reference state and Wizard action tests (including fix(wizard): no cancelar ni generar ante preguntas de stop o de etiqueta #282).
  • Full UI: 1,445 passed.
  • i18n, ESLint, TypeScript, build and bundle budget pass (324,763 / 327,680 bytes gzip).
  • git diff --check.
  • Code-health against exact development base: PASS, +0 production LOC / +70 test LOC / no complexity increase. No baselines or budgets changed.
  • CI for this HEAD: 3,022 Python passed / 9 skipped; 1,445 UI passed; 26 Chromium E2E passed and 5 Windows Speech E2E passed with real H.264/AAC export.
  • Browser smoke PASS: one real Speech voice upload, Speech → Music → Speech retains its file/voice, Music prepares one typed command without Speech conditioning. That request was intercepted before admission; zero new jobs/inferences. Navigation/intro additionally checked at desktop1500 and mobile390, no horizontal document overflow or browser exceptions. A first harness pass incorrectly required explicit zero instead of allowing an omitted inactive TTS count; retained as FAIL, then fixed without product changes. Music-reference preservation itself is proven by the DOM/admission regression, not a new native generation.

CI and review

  • CI of this HEAD: SUCCESS, run 34408558581, including CI required.
  • Independent QA: pending; Luna workers have exhausted their quota. An implementer review is not independent approval.
  • Current Cursor checks: InternalBugBot SUCCESS; Find critical bugs SUCCESS. Check completion is reported separately from an independent review. Earlier review of 70ebf84f does not cover this HEAD.
  • No remote merge or publication by this review.

Notes and limitations

This PR protects the integrated reference behavior. Full text/duration drafts per Audio tab and restored upload labels remain separate work. The admission tests use a simulated API/receipt and a real DOM; they do not claim newly generated media.

Añadir una voz en Speech deja audio_prompt_type (y Load Settings puede restaurar audio_guide) en el formulario compartido. El comando cerrado de música fallaba o usaba el clon TTS como referencia ACE. Neutralizar ese residuo antes del builder.

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

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown
Author

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_77fd9d09-9a30-4a10-86a6-7b231478986b)

@IAnMove IAnMove changed the title fix(studio): no enviar residuos de Speech en generation.music test(studio): proteger referencias Music con voces Speech guardadas Sep 9, 2026
@IAnMove
IAnMove changed the base branch from feat/shared-tool-commands to development September 9, 2026 21:43
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 2 file(s); +70/-0

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

Findings

  • low — UI changed — rebuild before merge
    Run cd ui && npm run build (CI already does this). Pinokio Update rebuilds for end users; keep ui/dist untracked.

Changed files

  • modified: ui/tests/musicGenerationCommands.test.ts, ui/tests/studioMusicCommandPresentation.test.tsx

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 9, 2026

Copy link
Copy Markdown

Code health

Quality score: 58.6/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% 56.1 +0.0
File concentration 25% 66.4 +0.0
Oversized-file debt 20% 42.3 +0.0
Modularity 10% 82.9 +0.0

Change vs PR base: +0.0 points.

Metric Value
Production LOC 282,563
Production files 853
Test LOC 111,772
Functions measured 18,628
Functions complexity ≥ 15 865
Maximum complexity 674
Policy code-health-policy-v1
HEAD bf715f02d5c125ab0cdcbeacfb13ad0a693e02ea
Base 06f8ea246fde9487b97c1d4dd1199f898dda5c6e
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:7221 generate_video
379 ui/src/stores/useStore.ts:4118 Async method 'startGeneration'
355 app/_launch_runtime.py:23653 _run_generation
308 app/wgp.py:12363 generate_video_tab
264 ui/src/stores/useStore.ts:8663 Async method 'loadSettingsFromOutput'
262 ui/src/components/Sidebar/SceneAnimatorPanel.tsx:496 Function 'SceneAnimatorPanel'
258 app/services/director/planners/short_film.py:3433 ShortFilmPlanner._plan_story_driven
248 app/services/director_pipeline.py:13607 _run_video_generation
245 app/services/director_pipeline.py:7712 _run_pipeline
233 ui/src/features/agent/agentActions.ts:1152 Function 'parseAction'
226 app/services/director_pipeline.py:6541 update_comic_preview
225 ui/src/features/agent/agentActions.ts:2927 Async function 'executeAgentActions'

Trend vs baseline

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

Ratchet 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