Pure helper that resets a 'Generated' asset back to 'Pending' on its matching
Assets.Generate request when RegenerationCount < maxRegenerations.
Allowed only when:
spec.Assets.Approved contains an entry with Key === assetKey and Provenance === 'Generated', and
spec.Assets.Generate contains a request with Key === assetKey whose (RegenerationCount ?? 0) < maxRegenerations.
When allowed, removes the generated asset (and any <assetKey>-still companion generated asset)
from Assets.Approved, sets the request's Status to 'Pending', clears BlockedReason,
and increments RegenerationCount.
Pure helper that resets a
'Generated'asset back to'Pending'on its matchingAssets.Generaterequest whenRegenerationCount < maxRegenerations.Allowed only when:
spec.Assets.Approvedcontains an entry withKey === assetKeyandProvenance === 'Generated', andspec.Assets.Generatecontains a request withKey === assetKeywhose(RegenerationCount ?? 0) < maxRegenerations.When allowed, removes the generated asset (and any
<assetKey>-stillcompanion generated asset) fromAssets.Approved, sets the request'sStatusto'Pending', clearsBlockedReason, and incrementsRegenerationCount.