Skip to content

fix(sfx): un intent_id distinto por clip en queue_sfx_pack - #285

Merged
IAnMove merged 1 commit into
feat/shared-tool-commandsfrom
cursor/critical-bug-management-1839
Sep 9, 2026
Merged

fix(sfx): un intent_id distinto por clip en queue_sfx_pack#285
IAnMove merged 1 commit into
feat/shared-tool-commandsfrom
cursor/critical-bug-management-1839

Conversation

@cursor

@cursor cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

Resumen ejecutivo

Qué cambia

queue_sfx_pack ya no reutiliza el commandId del Wizard como intent_id de generation.sfx para todos los clips. Cada clip admite su propia intención.

Para qué sirve

Un pack de 2+ efectos fallaba o repetía el primer recibo porque el contrato cerrado trata intent_id como idempotencia de un solo trabajo.

Impacto para el usuario

En Wizard, «genera estos 3 SFX» encola tres trabajos distintos. El segundo clip ya no recibe 409 ni reproduce el primero.

Riesgo

  • Bajo
  • Medio
  • Alto

Estado

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

Summary

Wizard runRegisteredCapability mints one commandId for the queue_sfx_pack capability. That same id was forwarded as GenerationSubmissionContext.commandId into every startGeneration call. prepareStudioSfxSubmission then used it as generation.sfx intent_id.

Backend admission (TaskCommandConflict / intent_conflict) treats a reused intent_id as:

  • 409 when the next clip has a different prompt
  • a silent replay of the first receipt when the prompt matches

Concrete trigger: Wizard «genera un pack de SFX: hit, whoosh, coin» with confirm=true. Clip 1 queues. Clip 2+ 409s or replays clip 1.

The pack-level Wizard envelope keeps its own command id. Each clip now gets a fresh generation.sfx intent via newSfxGenerationIntentId().

Overview

  1. User asks Wizard to queue several SFX clips and confirms.
  2. queueSfxPack still opens Studio → Audio → SFX and applies each clip.
  3. Each startGeneration now receives a unique commandId.
  4. Distinct prompts enqueue distinct tasks; identical prompts no longer replay the first receipt.

Detailed changes

Backend

No server contract change. Admission already required unique intents for distinct payloads.

UI and Wizard

  • actions.ts: sfxClipSubmissionContext replaces the pack commandId per clip and keeps actor/capability/workflow provenance.

Data, provenance and compatibility

Wizard pack envelope commandId is unchanged. Clip provenance command_id is now the per-clip intent, which matches the durable receipt.

Files and ownership

  • ui/src/features/studio/actions.ts — mint one generation.sfx intent per clip
  • ui/tests/studioSfxAction.test.mjs — 3-clip pack with a shared Wizard commandId
  • Left untouched: SFX prompt leftover (MMAudio_prompt ?? prompt), Speech ACE residue (inverse of fix(studio): no enviar residuos de Speech en generation.music #283), legacy /api/v1/tools/upscale scope check

Validation

  • Date (UTC): 2026-09-09

  • Base SHA: 0220c80 (feat/shared-tool-commands)

  • Head SHA: abccd28

  • Validation scope: focused

  • python scripts/verify_clean_repo.py

  • python -m compileall

  • Focused Python tests: N/A (UI-only change)

  • cd ui && npm run i18n:check

  • UI tests: npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/studioSfxAction.test.mjs7 passed

  • cd ui && npm run lint -- --max-warnings=0

  • cd ui && npm run build

  • git diff --check — clean

  • E2E/smoke checks: N/A (no live GPU pack run)

Code quality

  • Score: pending CI
  • Complexity trend: pending CI
  • Production LOC trend: pending CI
  • Regression versus main: pending CI
  • Ratchet: pending CI

CI and review

  • CI of this HEAD: pending

  • Independent agent review of this HEAD: pending

  • Human merge click (operational, not code review): pending

  • Reviewed at current HEAD

  • Earlier review; HEAD has changed since (stale)

  • Pending

  • Unavailable

Coste de la tarea

  • Tests simulados: 0 tokens externos
  • Tests reales: N/A
  • Llamadas LLM externas: 0
  • Tokens de prompt: N/A
  • Tokens de respuesta: N/A
  • Tokens totales: N/A
  • Generaciones de imágenes/audio/vídeo: 0
  • Tiempo transcurrido: N/A
  • Proveedores/modelos: N/A

Notes and limitations

The Wizard pack remains one capability with one envelope. Only the durable generation.sfx intent is unique per clip. Direct Studio Generate (single clip) is unchanged.

Follow-up work

Checklist

  • The executive summary is understandable without reading the code.
  • The detailed Summary/Overview has not been removed or shortened.
  • Tests and their actual results are recorded.
  • Generated assets, secrets and local-only files are not committed.
  • Required CI and Cursor/Bugbot review are complete, or the PR is clearly marked as waiting for them.
Open in Web View Automation 

Wizard queue_sfx_pack reused one capability commandId as every clip's
generation.sfx intent_id. Distinct prompts then 409'd after the first
clip; identical prompts silently replayed the first receipt.

Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
@IAnMove
IAnMove merged commit 9f78d1d into feat/shared-tool-commands Sep 9, 2026
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