The logic the Fate is being spent on.
The action context; context.scope.priorTestResult is the
original sohl.entity.result.SuccessTestResult being fated (absent
when invoked with no card to amend — then only the Fate test is rolled).
Resolves once the Fate test, any consumption, and the re-post complete. A no-op (with a warning) when Fate is unavailable, and a silent return when the player dismisses the Fate roll or a required choice.
Spend Fate on a test: roll a Fate test and apply its post-roll success-level bump to the original test — the die is never re-rolled (#854).
The flow, all at the player's behest (the card's Fate button or the sheet cell is the human trigger):
fateMasteryLevel(its own success test, resolved by getFateDescTable); its result posts nothing here — this function posts a single Fate card describing the resolved path.isSuccess. A critical success prompts the player's spend (+2) / keep (+1) choice.context.scope.priorTestResult(serialized on the Fate button, revived on click).