Skip to content

test: validar localmente y separar smoke real - #132

Merged
IAnMove merged 1 commit into
mainfrom
feat/local-validation-split-smoke-tools
Sep 4, 2026
Merged

test: validar localmente y separar smoke real#132
IAnMove merged 1 commit into
mainfrom
feat/local-validation-split-smoke-tools

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Completa los bloques 2, 3 y 4 tras mergear Tools: replica code-health contra origin/main en validación local, añade scopes song/all para smoke real ACE/H3 y documenta que las generaciones reales son manuales. Validado localmente: 10 Python, 605 UI, build/lint y 7 E2E simulados.


Note

Low Risk
Changes are limited to local validation scripts and developer docs; no runtime API or auth paths are modified.

Overview
Extends local pre-push validation with a code-health ratchet against origin/main: validate_local.sh checks out the merge-base in a temporary worktree, records baseline metrics via code_health.py, and fails if the current branch regresses versus that baseline.

For manual real-media smoke, adds NIGHTLY_MEDIA_SCOPE (all default, song for ACE-Step only). runMediaSmoke returns after song generation and library update when scope is song, skipping audio analysis, structure planning, and the director videoclip pipeline; the shell wrapper forwards the env var and LOCAL_VALIDATION.md documents the song-only flow.

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

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 4 file(s); +38/-0; docs, repo scripts / CI

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: docs/development/LOCAL_VALIDATION.md, scripts/nightly_wizard_smoke.mjs, scripts/run_real_media_smoke.sh, scripts/validate_local.sh

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

Copy link
Copy Markdown

Code health

Quality score: 49.0/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% 52.2 +0.0
File concentration 25% 53.6 +0.0
Oversized-file debt 20% 29.3 +0.0
Modularity 10% 62.4 +0.0

Change vs PR base: +0.0 points.

Metric Value
Production LOC 241,256
Production files 531
Test LOC 69,994
Functions measured 15,077
Functions complexity ≥ 15 784
Maximum complexity 667

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

Most complex functions

Complexity Where
667 app/wgp.py:7164 generate_video
374 ui/src/stores/useStore.ts:4021 Async method 'startGeneration'
355 app/_launch_runtime.py:23773 _run_generation
308 app/wgp.py:12281 generate_video_tab
271 ui/src/components/Sidebar/SceneAnimatorPanel.tsx:474 Function 'SceneAnimatorPanel'
266 ui/src/stores/useStore.ts:8563 Async method 'loadSettingsFromOutput'
258 app/services/director/planners/short_film.py:3433 ShortFilmPlanner._plan_story_driven
248 app/services/director_pipeline.py:13735 _run_video_generation
245 app/services/director_pipeline.py:7860 _run_pipeline
243 ui/src/features/agent/agentActions.ts:1109 Function 'parseAction'
226 app/services/director_pipeline.py:6689 update_comic_preview
225 ui/src/features/agent/agentActions.ts:2766 Async function 'executeAgentActions'

Trend vs baseline

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

Ratchet passed.

@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.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Baseline scan uses system Python
    • The baseline worktree scan now invokes $PYTHON like the rest of validate_local.sh, so a missing or Python 2 system python no longer aborts a working venv.

Create PR

Or push these changes by commenting:

@cursor push 1fec4af6dd
Preview (1fec4af6dd)
diff --git a/scripts/validate_local.sh b/scripts/validate_local.sh
--- a/scripts/validate_local.sh
+++ b/scripts/validate_local.sh
@@ -19,7 +19,7 @@
   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"
+  (cd "$BASE_DIR" && "$PYTHON" scripts/code_health.py --json) > "$BASE_DIR/code-health-base.json"
   "$PYTHON" "$ROOT/scripts/code_health.py" --check --baseline "$BASE_DIR/code-health-base.json" >/dev/null
   trap - EXIT
   git -C "$ROOT" worktree remove --force "$BASE_DIR" >/dev/null 2>&1 || true

You can send follow-ups to the cloud agent here.

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

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

Comment thread scripts/validate_local.sh
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.

Comment thread scripts/validate_local.sh
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"
"$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.

@IAnMove
IAnMove merged commit 31c0a42 into main Sep 4, 2026
6 checks passed
@IAnMove
IAnMove deleted the feat/local-validation-split-smoke-tools branch September 5, 2026 11:52
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