Skip to content

Fd doc updates - #17

Closed
CourtneyDrant wants to merge 4 commits into
OpenPRoT:mainfrom
CourtneyDrant:FD-doc-updates
Closed

Fd doc updates#17
CourtneyDrant wants to merge 4 commits into
OpenPRoT:mainfrom
CourtneyDrant:FD-doc-updates

Conversation

@CourtneyDrant

Copy link
Copy Markdown
Collaborator

No description provided.

CourtneyDrant and others added 4 commits July 15, 2026 19:54
Creates a cleaner interface for use in Open-Prot.
Follow-ups from the OpenPRoT#12 review that are pre-existing issues, kept out of
that PR so it can merge.

Stacked on OpenPRoT#12 (first commit here is its head); the diff below shows
OpenPRoT#12's changes until it merges — I'll rebase then and only the three
commits' changes remain.

- **T1 timeout cancel-path test**: drives `fd_progress` in Download with
a `TransferComplete` sent longer than T1 ago; asserts `Err(T1Timeout)`,
Idle state, and `DownloadTimeout` as the reason.
- **T1 hardening**: `saturating_sub` for the elapsed computation (no
underflow when the clock reads behind the timestamp), and a T1 refresh
after Verify/Apply progress so long-blocking `FdOps` work doesn't count
as UA silence and cancel a healthy update. Unlike caliptra-mcu-sw's
unconditional refresh, this one is gated on no request being in flight —
once `VerifyComplete`/`ApplyComplete` is sent, T1 measures the UA's
silence and keeps running (upstream re-arms T1 on every T2 resend, so a
UA that never answers `VerifyComplete` is never timed out).
- **Remove `handle_initiator_msg`**: generated a request and discarded
it, both branches returning `Ok(())`; superseded by
`generate_initiator_request`, no callers.

The poll-contract question (waiting and completed both surfacing as
`FdInitiatorModeError`) is intentionally not here — that's OpenPRoT#13.

---------

Signed-off-by: Christina Quast <christina.quast@9elements.com>
…t. Adjusted 'now' default to safer value of 0, disabling timestamps. Users will need to implement now using a counter from their environment.
@CourtneyDrant
CourtneyDrant deleted the FD-doc-updates branch August 27, 2026 22:39
@CourtneyDrant
CourtneyDrant restored the FD-doc-updates branch August 27, 2026 22:41
@CourtneyDrant
CourtneyDrant deleted the FD-doc-updates branch August 27, 2026 22:42
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.

2 participants