Prod readiness
Merged
AD
1mo ago+3253+3253+0123456789012345678901234567890123456789-703-703-012345678901234567890123456789
Pull Request
Resumen de cambios
Describe brevemente qué se ha modificado y por qué.
Tipo de cambio
- Nueva funcionalidad (feature)
- Corrección de error (bug fix)
- Mejora de rendimiento
- Refactorización
- Documentación
- Otro
Módulos afectados
-
massive_core/data_assimilation/— EnKF, filtro EnKF disperso -
massive_core/network_inference/— Reconstrucción de red (DE, CG) -
massive_core/numerics/— Steppers, estabilidad, motor multicapa disperso -
massive_core/physics/— Perturbación, mecánica estadística -
tests/— Pruebas unitarias -
frontend/— UI, generated types -
README.md/README_ES.md— Documentación -
massive_engine.py— Motor principal
Checklist
- Las pruebas existentes siguen pasando (
pytest tests/) - Se han añadido pruebas para nueva funcionalidad
- No se han roto APIs públicas legacy
- La documentación se ha actualizado
- Se ha seguido el protocolo de seguridad de
docs/architecture/safety_protocol.md
Notas de integración
Si este PR toca el motor principal (massive_engine.py) o el frontend, especificar cambios en las rutas de la API o la UI.
Summary by cubic
Gets the MASSIVE codebase ready for production: removes label leakage from the CfC residual corrector, vectorizes the hottest simulation path (17.4× faster, bit-identical output), removes dead code, and fixes several tooling and config defects found in a full audit.
Bug fixes
- The residual corrector no longer interpolates toward ground truth; a quality gate disqualifies the shipped model (walk-forward R² = -18.7, 8.2× worse than persistence), which now returns
disqualifiedviacorrection_sourceand ignores theactual=parameter. benchmark_scalability.pyread uninitialized memory in its per-agent loop; N=1M now finishes in 19.4s instead of effectively never.- Fixed
FactbookContextdefaulting to a nonexistent data file, mypy config resolution, the verify harness calling systemblack/ruffinstead of the pinned venv versions, and aCfCRoutersingleton race condition. - torch imports in tests are now guarded so the suite collects without PyTorch installed.
Cleanup and additions
- Removed dead code:
social_connectors.py(332 lines),massive_core/neural_physics/, and duplicatemypy.ini/configs/mypy.ini— anything importing these breaks. - Added
make benchmark-all(baselines, backtests, CfC walk-forward, PVU) and made benchmark/calibration output paths configurable via env vars instead of hardcoded/tmp. - Added the
compare_arms.pystance-classification comparison (lexicon, LLM, Von, Jev arms) and audit/calibration reports underdocs/andreports/.