From 0899ac98093518849b937ee90bf788f395ba714b Mon Sep 17 00:00:00 2001 From: x01dc Date: Mon, 13 Jul 2026 16:55:03 +0200 Subject: [PATCH] docs(flomni): record sim-validation results for the at_each_angle hook Notes what was actually exercised against the live sim (registration/ list/unregister, per-job param snapshot including the reset-to-None case, the hook firing during a real tomo_queue_execute() run, and the unregistered-hook incomplete/resume path) and the scan_repeat retry bug found and fixed along the way. Co-Authored-By: Claude Sonnet 5 --- .../AI_docs/TOMO_QUEUE_COMMAND_JOBS_PLAN.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/AI_docs/TOMO_QUEUE_COMMAND_JOBS_PLAN.md b/csaxs_bec/bec_ipython_client/plugins/flomni/AI_docs/TOMO_QUEUE_COMMAND_JOBS_PLAN.md index bbe269c..9479b32 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/AI_docs/TOMO_QUEUE_COMMAND_JOBS_PLAN.md +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/AI_docs/TOMO_QUEUE_COMMAND_JOBS_PLAN.md @@ -10,7 +10,9 @@ blank params table. Sim-tested: `omny_e2e_tests/test_tomo_queue_command_jobs.py` movement was exercised against `ftray` (sim-testable stand-in), not `mokev`/`idgap` (real front-end only — see §10). A CLI-level `tomo_queue_move(index, new_index)` has since been added alongside `tomo_queue_add`/`_delete`/`_clear`, enforcing the same -running-job floor as §6.4. **Step 3 (the `TomoQueueDialog` GUI work) has a first +running-job floor as §6.4. A curated, session-only `at_each_angle_hook` registry +(§3.4) has been added and sim-validated — see §3.4's "Sim-validated" note; CLI-only, +no GUI widget yet. **Step 3 (the `TomoQueueDialog` GUI work) has a first iteration built** — the command-job builder dialog (§6.5), command-job-aware queue rendering, the status-keyed delete/clear guards from §6.3, a "Sort queue…" mode for mid-run reorder of pending/incomplete rows (§6.4 — up/down buttons, not drag-and-drop, @@ -317,6 +319,19 @@ registry, same spirit as `_TOMO_QUEUE_ACTIONS` but distinct from it — operator-facing writeup (what a hook function looks like, how to register/activate/ unregister/list one). +**Sim-validated** (against the live simulated flOMNI, not just mocked): registration/ +list/unregister bookkeeping; the params snapshot carrying `at_each_angle_hook` per +job (and correctly resetting to `None` for the next one); the hook actually firing +during a real `tomo_queue_execute()` run; an unregistered hook's job ending up +`incomplete` and resuming cleanly once the hook is re-registered. Found and fixed one +real bug in the process, unrelated to the hook logic itself: `_tomo_scan_at_angle` is +wrapped in `@scan_repeat(max_repeats=10, default=True)`, which retried the new +`FlomniError` (unregistered hook) 10 times before giving up with a generic +`TooManyScanRestarts` — the actual error message never reached the operator. Fixed +with an `exc_handler` that skips the retry for any `FlomniError` (see the +`_retry_unless_flomni_error` docstring in `flomni.py`); this benefits every other +`FlomniError` the method can raise, not just the hook-registry one. + --- ## 4. New / changed CLI methods (`flomni.py`)