F4.8: determinismo + garantía panic-free en rugus-core#86
Merged
Conversation
- Garantía panic-free: rugus-core gana un gate de lints (deny clippy::unwrap_used/ expect_used/panic/todo/unimplemented/unreachable, exento en `cfg(test)`) que falla CI (-D warnings) si se introduce un punto de pánico EXPLÍCITO. El core ya estaba limpio; esto lo blinda hacia el futuro empujando a manejo explícito de errores (Option/Errno). Los pánicos implícitos (índice/overflow) se acotan por invariantes de MAX_TASKS/bandas y en release (overflow-checks=off) hacen wrap. - Determinismo: nuevo módulo `determinism_tests` en rugus-host-tests (3 tests): (1) dos schedulers idénticos operados igual generan trazas de planificación byte-idénticas (planificación = función pura del estado + reloj explícito, sin RNG/reloj implícito); (2) la rotación round-robin es cíclica de periodo exacto = nº de tareas listas (sin deriva, sirve cada tarea una vez); (3) la preempción por rodaja es determinista entre ejecuciones. Sustenta el análisis de latencia: el peor caso de pick/preempt_tick es un barrido O(MAX_TASKS) sin recursión ni espera no acotada. Sin cambio de comportamiento en firmware (solo atributo de lint + tests host), no requiere reflash. host-tests 32 OK (29→+3). clippy (×2 targets) + doc limpios. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
rugus-coregana un gate de lints (denyclippy::unwrap_used/expect_used/panic/todo/unimplemented/unreachable, exento encfg(test)) que falla CI si se introduce un punto de pánico explícito. El core ya estaba limpio; esto lo blinda hacia el futuro. Los pánicos implícitos (índice/overflow) se acotan por invariantes deMAX_TASKS/bandas y en release (overflow-checks=off) hacen wrap.determinism_tests(3 tests): planificación byte-idéntica entre ejecuciones idénticas (función pura del estado + reloj explícito), round-robin cíclico de periodo exacto = nº de tareas listas, y preempción por rodaja determinista. Sustenta el análisis de latencia (peor casopick/preempt_tick= barrido O(MAX_TASKS), sin recursión ni espera no acotada).Validación
Test plan
🤖 Generated with Claude Code