Fix release CI ratchet and Bugbot integration findings - #418
Merged
Conversation
PR Review — Loreframe StudioRisk: low Automated review from Findings
Changed files
CONTRIBUTING checklist
Posted by the repo PR review workflow. Re-runs on each push to the PR. |
Code healthQuality score: 64.5/100Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.
Change vs PR base: +0.0 points.
Markdown, JSON catalogs and tests are out of this table. Only Most complex functions
Trend vs baseline
Warnings
Ratchet passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen ejecutivo
Qué cambia
Corrige los dos hallazgos de Bugbot de #354: las escenas guardadas conservan su workspace en la URL y se retiran notas/parches temporales de integración. Repara los cuatro aumentos de complejidad detectados por CI.
Para qué sirve
El PR de publicación acumulaba 290 commits y aplicaba un presupuesto de cambio individual a toda la integración. Ahora las publicaciones verifican ese mismo presupuesto en cada integración y conservan todos los controles locales sobre el resultado completo frente a main.
Impacto para el usuario
Las escenas vuelven a abrirse desde su carpeta correcta aunque cambie el workspace activo. La publicación puede verificar sus cambios acumulados sin borrar funcionalidades ni ocultar deuda.
Riesgo
Estado
Summary
Follow-up to #354, based on development
65dfca3fb5cf24dfc8ec2af059058e10c75c7a27.The failing CI run stopped at the code-health ratchet: +30,150 production LOC, +34 complex functions and four per-file complexity regressions relative to main. Python shards and Linux/Windows E2E passed, but the ratchet prevented UI tests/lint/build from running. The 205 new production files account for 28,954 LOC; generated images, catalogs, tests and handoffs were already excluded.
The replacement release gate checks LOC and complex-function-count growth at every exact first-parent transition using the existing budgets. All other rules still compare the final candidate with the exact main base. No baseline, exception file or numeric threshold is changed. Full cumulative deltas and historical local findings remain visible.
Overview
Ordinary feature PRs, forks and ordinary pushes retain the existing ratchet. Release mode requires canonical repository identity, development → main metadata, complete history, contiguous ancestry, an unchanged main/merge-base tree, and an exact candidate/source tree match. It independently reconstructs historical metrics from Git blobs and checks agreement with full endpoint measurements.
The ensuing canonical push to main can use the same verification only for a two-parent merge whose first parent is the push
before, whose second-parent tree equals the published tree, and whose second parent belongs to freshly fetched development history. Fast-forward/squash, changed-tree and unrelated-parent cases keep ordinary checks.Detailed changes
Backend
POST /api/v1/scenesresolves its workspace once and includes it in the saved file URL, including requests that use the active workspace implicitly.UI and Wizard
Data, provenance and compatibility
scripts.test, unused by direct measurement, may differ. Install/lifecycle hooks remain protected inputs.code-health-integration.json.Files and ownership
Backend URL fix and regression test; four UI complexity reductions; existing code-health wrapper plus the release verifier and adversarial tests; CI activation/evidence; documentation and temporary-artifact cleanup. Work is isolated in a fresh worktree.
Validation
65dfca3fb5cf24dfc8ec2af059058e10c75c7a275a5a069e99f6ccf31916ab110811f4786003edc6.Passed locally:
python -m pytest -q tests/test_validate_local_wrapper.py tests/test_code_health.py tests/test_development_branch_policy.py tests/test_core_runtime.py tests/test_ci_required.py: 117 passed.cd ui && npm test: 1,813 passed, 0 skipped.npm run i18n:check,npm run lint -- --max-warnings=0,npm run build,npm run budget: passed; entry JS gzip 191,735 / 327,680 bytes.python scripts/verify_clean_repo.py,python -m compileall -q app/services app/launch.py app/core_runtime.py scripts,python scripts/check_documentation_links.py,git diff --check: passed.Release replay passed at the exact current HEAD against main
b2cdd1a56650ff7f5561735a8a31a4d5e4d4a942: 81 verified first-parent transitions (78 existing integrations plus this fix’s three commits). Initial history audit reproduced CI's exact endpoint metrics over the original 78 integrations. Every cumulative budget passed; #349 introduced two local hotspot regressions which this PR repairs at the final tree. Adversarial tests cover missing/gapped history, endpoint mismatch, policy/input drift, intermediate aggregate failures, current hotspots, fork provenance, Unicode paths, and rejected publication merge shapes.Code quality
Current CI code-health report: score 64.5/100, +0.0 vs development, 317,162 production LOC, 914 complex functions, maximum 674. Ordinary ratchet passed. The separately verified release report retains +30,175 LOC and +35 complex functions vs main and passes all 81 per-integration growth budgets plus every final local limit.
CI and review
CI required.review_ci_fixfor5a5a069e99f6ccf31916ab110811f4786003edc6; repository provenance, Unicode history paths, install-hook fingerprints and publication merge fixtures were reviewed and fixed. The implementer ran the final 81-transition replay.Independent QAevidence check: skipped; not counted as approval.Coste de la tarea
Notes and limitations
The running Pinokio application and installed models were not restarted or changed. No real media generation is claimed. Changing measurement inputs or publishing a main tree that differs from the merge-base requires a separately reviewed path; release verification fails closed. #354 itself will retain its old check results until these changes are integrated and that PR reruns.
Follow-up work
Complete Cursor/Bugbot review, then integrate this fix through the normal development review. Publication of development into main remains a separate merge action.
Checklist
Note
Medium Risk
Changes CI release policy and scene file URL semantics; incorrect integration detection or workspace handling could block merges or break scene loading across workspaces.
Overview
Adds a release-only code-health gate for verified
development→mainPRs (and matching merge pushes): production LOC and high-complexity function growth must pass the existing budgets at every first-parent integration, while all other ratchet rules still compare the final tree to main. Newcode_health_integration.pyreconstructs metrics from Git blobs, writescode-health-integration.json, and CI passes branch/repo SHAs plus still runs UI test/lint/build after a failed ratchet when deps install.Backend:
POST /api/v1/scenesresolves workspace once (defaulting to active) and returns file URLs with?workspace=…so scenes load from the correct folder after switching workspace.UI maintainability: World SFX defaults move to a table; explosion/runtime animation splits into
animateMaterials/animateParticles; cutout dialogue beat grouping is extracted; Series voice fields use a singleprofileobject—lowering ESLint complexity on four hotspots.Housekeeping: Removes tracked agent handoffs, draft
PR_BODY.md, and unappliedINTEGRATION*.patchfiles; extends.gitignoreand documents speech-analysis caching inVIDEO3D_SPEECH.md.Reviewed by Cursor Bugbot for commit 5a5a069. Configure here.