erplibre/script/analyse
Mathieu Benoit 0fdfeaa9ce [FIX] migration state: open the quality screen in its own process
Pressing « k » crashed with « asyncio.run() cannot be called from a
running event loop ». `suspend()` hands the terminal over but does NOT
stop the loop, and `app.run()` calls `asyncio.run()` underneath. A
subprocess has its own loop and paints the terminal it was given.

My test asserted that suspend() was CALLED, and that structure was
correct — the launch inside it was not. Structure is not behaviour, and
the test that would have caught this is the one that presses the key.
It exists now, and a guard refuses the nested start with a sentence
instead of forty lines of traceback.

The screen module also lost its shebang: it has no main, so the line
claimed something that was not true, and the permission rule was right
to say so.

--- FR ---

[FIX] état de migration : ouvrir l'écran de qualité dans son processus

« k » plantait sur « asyncio.run() cannot be called from a running event
loop ». `suspend()` rend le terminal mais n'arrête PAS la boucle, et
`app.run()` appelle `asyncio.run()` en dessous. Un sous-processus a sa
propre boucle.

Mon test vérifiait que suspend() était APPELÉ — et cette structure était
juste ; c'est le lancement à l'intérieur qui ne l'était pas. La structure
n'est pas le comportement, et le test qui aurait attrapé cela est celui
qui presse la touche. Il existe désormais, et un garde-fou refuse le
lancement imbriqué par une phrase plutôt que par quarante lignes de trace.

Le module d'écran perd aussi son shebang : sans `main`, cette ligne
annonçait une intention qui n'existait pas.

Assisted-by: Claude Opus 5
2026-08-22 07:23:59 -04:00
..
shell [FIX] script: make the analysis and migration tools executable 2026-08-22 07:23:59 -04:00
analyse_custom_field.py [FIX] script: make the analysis and migration tools executable 2026-08-22 07:23:59 -04:00
analyse_diff_tui.py [FIX] script: make the analysis and migration tools executable 2026-08-22 07:23:59 -04:00
analyse_schema_size.py [FIX] script: make the analysis and migration tools executable 2026-08-22 07:23:59 -04:00
analyse_view_custom.py [FIX] script: make the analysis and migration tools executable 2026-08-22 07:23:59 -04:00
check_migration_quality.py [ADD] analyse: what a migration gained and lost, step by step 2026-08-22 07:23:59 -04:00
check_migration_quality_tui.py [FIX] migration state: open the quality screen in its own process 2026-08-22 07:23:59 -04:00
lib_analyse.py [FIX] script: make the analysis and migration tools executable 2026-08-22 07:23:59 -04:00