Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/development/LOCAL_VALIDATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@ bash scripts/run_real_media_smoke.sh
El wrapper fuerza `RUN_EXTERNAL_PROVIDER_TESTS=0`; cualquier ejecución real
requiere la confirmación explícita. Los artefactos y tiempos deben anotarse en
`comunicaciones/review.md` (fuera de Git).

Para probar únicamente ACE-Step y no renderizar el videoclip:

```bash
NIGHTLY_MEDIA_SCOPE=song \
RUN_GPU_TESTS=1 HOCUSPOCUS_SMOKE_CONFIRM=GENERATE_REAL_MEDIA \
HOCUSPOCUS_SMOKE_BASE_URL=http://127.0.0.1:42003 \
bash scripts/run_real_media_smoke.sh
```

El valor `all` (por defecto) continúa con análisis, planificación y videoclip.
13 changes: 13 additions & 0 deletions scripts/nightly_wizard_smoke.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function smokeProject(projectId, cueId, now) {

export async function runMediaSmoke({
baseUrl, workspace = 'nightly-smoke', runGpu = false, runExternal = false, confirm,
mediaScope = 'all',
fetchImpl = globalThis.fetch, timeoutMs = 6 * 60 * 60 * 1000, pollIntervalMs = 5_000,
} = {}) {
const root = validateSmokeOptIn({ runGpu, runExternal, baseUrl, confirm })
Expand Down Expand Up @@ -192,6 +193,17 @@ export async function runMediaSmoke({
library: { ...saved, activeId: projectId, projects: { ...saved.projects, [projectId]: project } },
}, controller.signal)

if (mediaScope === 'song') {
return {
workspace,
identifiers: {
projectIds: [projectId], cueIds: [cueId], outputIds: [filename],
taskIds: [song.task_id || startedSong.task_id].filter(Boolean), pipelineIds: [],
},
songStatus: song.status, pipelineStatus: 'not_requested', semantic,
}
}

const analysis = await requestJson(fetchImpl, root, 'POST', '/api/v1/audio/analyze', {
audio_path: audioPath, transcribe: true, extract_vocals: true, lyrics_hint: cue.lyrics, workspace,
}, controller.signal)
Expand Down Expand Up @@ -241,6 +253,7 @@ if (invokedPath === new URL(import.meta.url).pathname) {
workspace: process.env.HOCUSPOCUS_SMOKE_WORKSPACE || 'nightly-smoke',
runGpu: process.env.RUN_GPU_TESTS === '1', runExternal: process.env.RUN_EXTERNAL_PROVIDER_TESTS === '1',
confirm: process.env.HOCUSPOCUS_SMOKE_CONFIRM,
mediaScope: process.env.NIGHTLY_MEDIA_SCOPE || 'all',
timeoutMs: Number(process.env.NIGHTLY_SMOKE_TIMEOUT_MS || 6 * 60 * 60 * 1000),
})
process.stdout.write(`SMOKE_RESULT ${JSON.stringify(result)}\n`)
Expand Down
1 change: 1 addition & 0 deletions scripts/run_real_media_smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ fi
# Level 8 is deliberately local for music: ACE-Step, never MiniMax Music.
export RUN_EXTERNAL_PROVIDER_TESTS=0
export NIGHTLY_LEVELS=8
export NIGHTLY_MEDIA_SCOPE="${NIGHTLY_MEDIA_SCOPE:-all}"
exec "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts/nightly_wizard_validation.sh" "$@"
13 changes: 13 additions & 0 deletions scripts/validate_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ echo '[local] Python contracts'
"$ROOT/tests/test_tools_upscale_contract.py" \
"$ROOT/tests/test_architecture_contracts.py"

echo '[local] code-health ratchet against origin/main'
BASE_SHA="$(git -C "$ROOT" merge-base HEAD origin/main 2>/dev/null || true)"
if [[ -n "$BASE_SHA" ]]; then
BASE_DIR="$(mktemp -d "${TMPDIR:-/tmp}/hocus-health.XXXXXX")"
trap 'git -C "$ROOT" worktree remove --force "$BASE_DIR" >/dev/null 2>&1 || true' EXIT
git -C "$ROOT" worktree add --detach "$BASE_DIR" "$BASE_SHA" >/dev/null
ln -s "$UI/node_modules" "$BASE_DIR/ui/node_modules" 2>/dev/null || true
(cd "$BASE_DIR" && python scripts/code_health.py --json) > "$BASE_DIR/code-health-base.json"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Baseline scan uses system Python

Medium Severity

Baseline generation calls python from PATH while the rest of the script uses $PYTHON (app/env/bin/python). If python is missing or is Python 2, the new ratchet aborts even when the project interpreter works.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 17d1300. Configure here.

"$PYTHON" "$ROOT/scripts/code_health.py" --check --baseline "$BASE_DIR/code-health-base.json" >/dev/null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ratchet failures hide diagnostics

Low Severity

--check stdout is discarded, so a failed ratchet is only a silent non-zero exit after the step banner. The budget that was exceeded is not shown, and the baseline file is removed with the worktree.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 17d1300. Configure here.

trap - EXIT
git -C "$ROOT" worktree remove --force "$BASE_DIR" >/dev/null 2>&1 || true
fi

echo '[local] UI tests, lint and build'
(cd "$UI" && npm test && npm run lint -- --max-warnings=0 && npm run build)

Expand Down