Retry and decrypt-and-retry for recorded failures (Review Flow PR 5) - #7479
Draft
EthanHealy01 wants to merge 1 commit into
Draft
Retry and decrypt-and-retry for recorded failures (Review Flow PR 5)#7479EthanHealy01 wants to merge 1 commit into
EthanHealy01 wants to merge 1 commit into
Conversation
EthanHealy01
force-pushed
the
feature/failure-notifications
branch
2 times, most recently
from
August 13, 2026 01:35
dff3d86 to
9c2fa39
Compare
EthanHealy01
force-pushed
the
feature/policy-decrypt-retry
branch
from
August 13, 2026 01:46
801bd5b to
dd5ddaa
Compare
EthanHealy01
force-pushed
the
feature/policy-decrypt-retry
branch
from
August 13, 2026 15:27
dd5ddaa to
41772a5
Compare
EthanHealy01
force-pushed
the
feature/failure-notifications
branch
2 times, most recently
from
August 13, 2026 21:29
29d124e to
ae906e7
Compare
…rying All resolution of a recorded failure lives here, on top of the bell that surfaces it: - The retry stash: what a failed tool run would need to run again (endpoint, parameters, file ids), kept client-side with password-shaped fields stripped at any depth and a depth-bounded walk that fails closed. - Editor retry and decrypt-and-retry: re-open the failed tool, or unlock a password-protected document and re-run it in place. - Server policy retry: an attended policy failure is re-run with the password the user supplies, exactly once per click. The action slot model arrives with them. Slots rank an action as the row's resolution, its runner-up, or overflow, which is only a question worth asking once a kind has a resolution to rank: the bell alone offers viewing and dismissal, in declaration order. promoteActions turns those slots into the row's primary and secondary buttons and reports what it withheld. A build without this PR still shows every failure; the server declares RETRY and DECRYPT_AND_RETRY there and a client with no handler for them skips them.
EthanHealy01
force-pushed
the
feature/policy-decrypt-retry
branch
from
August 13, 2026 21:31
41772a5 to
5fb095b
Compare
Contributor
🚀 V2 Auto-Deployment Complete!🔗 Direct Test URL (non-SSL) http://54.175.155.236:7479 🧩 Admin portal included - try it at http://54.175.155.236:7479/portal. This deployment will be automatically cleaned up when the PR is closed. 🔄 Auto-deployed for approved V2 contributors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review Flow PR 5. Stacked on #7478. All resolution of a recorded failure lives here: Retry and Decrypt and retry, for editor failures and policy failures alike. #7478 surfaces failures and offers viewing and dismissal; this PR adds the buttons that fix them.
What's added
The retry stash (
notificationRetry.ts). When a tool run fails,useToolOperationstashes what a retry needs — endpoint, parameters, file ids — in its own IndexedDB database, keyed on the failing document. Capped at 25 records, oldest evicted first. Password-shaped fields are stripped at any depth on the way in, and the walk is depth-bounded so a pathological or cyclic object fails closed rather than storing a subtree it never examined.Retryon an editor failure opens the failed tool with the document selected, so the user sees the settings before it runs again.Decrypt and retryon an editor failure. The row reveals a password field. On submit it re-runs the stashed operation with the password added, adopts the result into the workbench, and reports the row resolved.RetryandDecrypt and retryon a policy failure. The unlock goes throughPOST /api/v1/security/remove-password, the result is adopted, and the stored policy re-runs on it server-side.A policy-shaped retry target.
RetryTargetis a discriminated union: the tool arm comes from the stash, the policy arm is derived from the notification itself (policyIdplus the document reference), so no stash is needed for a policy failure.Run registration. A policy re-run is recorded with the run store, so it polls to terminal, imports its output honouring the policy's
outputMode, and continues the rest of the upload chain rather than running one policy in isolation.The action slot model.
FailureActionSlotranks each offer as the row'sRESOLUTION,SECONDARYorOVERFLOW, andpromoteActionsturns those into the row's primary and secondary buttons plus the reason for anything withheld. It arrives with this PR because ranking is only a question worth asking once a kind has a resolution to rank — the bell alone offers viewing and dismissal, in declaration order.Behaviour
derivedFromToolso the upload auto-run does not also fire on it, which would bill the customer twice.Not included
Unattended failures (folder, S3, webhook) still cannot be retried: no browser holds the document. Those actions stay disabled with a reason. Re-running from the source needs a ledger requeue transition that does not exist yet.
ToolType.customtools (Convert, OCR) have no single endpoint to re-submit to, so they get no Retry.How to test
Needs a proprietary or SaaS build with login enabled, and a stored policy that will fail on a locked document.
task dev:all, then sign in.POST /api/v1/policies/{id}/runfor the retry. Two would mean the adopted document also triggered the upload policy.stirling-pdf-retry) for what you typed. It should appear only in the one unlock request body.stirling-pdf-retry: the stashed parameters contain no password-shaped field.Migration
None.