v3.22.4: the proactive-drain pending exemption
The runner's unexpected-pending-command guard fired for any non-expect step,
so a proactive-drain after a step that answered 91XX failed with
"unexpected proactive command pending (SW 91XX) - add an expect step or a
status action" - contradicting the drain's own doc ("consume whatever the
card announces") and the v3.22.2 RAM recipe ("an expect or a proactive-drain").
The guard now exempts a proactive-drain step: its STATUS poll re-announces
the unfetched command, fetches and answers it, and the drain's final-SW and
pending handling is unchanged (a still-pending card is handed to the next
step, an idle card passes). No pending-length plumbing: STATUS-first keeps
the drain's attempts/log semantics and tolerates a card that dropped the
command. The guard note now names the drain instead of the misleading
"status action" (a status action in that position also trips the guard).
Docs: the drain section in test-scripts.md, api.md's action list and the
help EN/RU drain bullet. Tests: 839 frontend + 819 Python; sw cache
simple-v408.
This commit is contained in:
@@ -319,7 +319,12 @@ IMS registration, the form's choice otherwise) - a hand-written step without
|
||||
|
||||
Consume whatever the card announces and leave it idle - at the start, in the
|
||||
middle or at the end of a script (a leftover command from a previous run must
|
||||
not derail the next step). Each round polls STATUS; a `91XX` answer fetches
|
||||
not derail the next step). The drain is also the tool for a command **the
|
||||
previous step left pending** (`91XX`): the runner's *unexpected proactive
|
||||
command pending* guard does not apply to it - its STATUS poll re-announces
|
||||
the unfetched command - so a `scp80`/`menu-select` step that answers `91XX`
|
||||
can be followed directly by a drain. Each round polls STATUS; a `91XX`
|
||||
answer fetches
|
||||
the command and answers it (the first command with `first`, the rest with
|
||||
`respond` - both `{"result": …}` like an expectation's response). The loop
|
||||
ends when STATUS answers `9000` (idle), a non-`91XX` SW appears or `attempts`
|
||||
|
||||
Reference in New Issue
Block a user