Skip to content

Discovery, transfer error, cancel and offer-before-supervising scenarios - #557

Merged
chrysh merged 4 commits into
OpenPRoT:ocp-global-demo-wipfrom
9elements:followup-itest
Oct 10, 2026
Merged

chrysh merged 4 commits into
OpenPRoT:ocp-global-demo-wipfrom
9elements:followup-itest

Conversation

@chrysh

@chrysh chrysh commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Four additions to the QEMU integration test suite, bringing it to eleven
scenarios and twenty-two targets.

  • Type 0 discovery. The agent asks GetPLDMTypes, GetPLDMVersion and
    GetPLDMCommands before it offers anything, and checks the reported
    version and command set against what it goes on to use. The start-order
    retry moves to GetPLDMTypes, which is now the first request it sends.
  • pldm_update/transfer_error. The agent answers one
    RequestFirmwareData with an error completion code, so what goes wrong is
    the answer to one request rather than the image. The device aborts the
    transfer and nothing is activated.
  • pldm_update/cancel_mid_transfer. The agent withdraws two chunks
    in. The device says so and waits; the machine drops what was staged,
    settles in Ready and acknowledges, and only then does the device let the
    session go.
  • pldm_update/offer_before_supervising. The offer reaches a RoT that
    is supervising nothing, and is refused as busy rather than on policy.
    The two are different answers to the device, and the refusing scenario
    next door covers the other one.

Each negative was checked by arranging the opposite: the version floor
raised to 1.4.0, the error injection removed, the acknowledgement
withheld, the refusal turned off. Check that offer_before_supervising
asserts the reason (Busy, not PolicyViolation), not just the refusal.

@chrysh chrysh changed the title Discovery, a commit timeout and a transfer error Discovery, transfer error, cancel and offer-before-supervising scenarios Oct 10, 2026
@chrysh
chrysh force-pushed the followup-itest branch 2 times, most recently from 2d53479 to 76edbf2 Compare October 10, 2026 20:17
The test agent sent QueryDeviceIdentifiers first and assumed the device
spoke firmware update 1.3.0. It now asks: GetPLDMTypes for both halves of
the protocol, GetPLDMVersion for the firmware-update version, and
GetPLDMCommands for that version's command set, checked against the ten
commands the sequence uses in either direction.

The start-order retry moves to GetPLDMTypes, which is now the first
request the agent sends.

Assisted-by: Claude Opus 5
A communication failure had no scenario: every negative so far arranged a
bad image or a refusal. The agent now answers one RequestFirmwareData with
an error completion code, so what goes wrong is the answer to one request
rather than the image. The device aborts the transfer.

The device names the failure by counting chunks: it asked for one more
than it was given, nothing was activated, and its own content check never
fired. A run that ends any other way fails the scenario rather than
passing it.

Assisted-by: Claude Opus 5
The cancel arc had no scenario: the state machine answers
`Event::UpdateCancelled` by dropping what was staged, and nothing drove
it. The agent now sends CancelUpdate two chunks in, far enough that the
device is transferring rather than still answering the offer.

The device reports `Cancelled` and waits there. It is not running the
update at that point, so it serves the RoT's channel from the same call
that is waiting, which is what the other decision points already do. The
RoT drops the job, settles in Ready and acknowledges, and only then does
the device let the session go.

Not a failure, so the scenario does not pass on one: nothing was
activated and the acknowledgement has to have arrived. Checked by
withholding it, which fails the run at the device.

Assisted-by: Claude Opus 5
The gate that refuses an update while the machine is not supervised had
no scenario. The device now offers one to a RoT that never powered on its
chain, and the RoT answers Busy.

Busy rather than a policy violation, because the two are different
answers to the device: one says not now, the other says not this image.
The refusing scenario next door covers the second, so this one asserts
the reason rather than the refusal.

`accept_update` returns the reason it refuses with instead of a bool, so
the reason is decided where the cause is known rather than at the call
site.

Assisted-by: Claude Opus 5
@chrysh
chrysh merged commit f604054 into OpenPRoT:ocp-global-demo-wip Oct 10, 2026
5 checks passed
@chrysh
chrysh deleted the followup-itest branch October 10, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant