Repository navigation
Conversation
DerekChia
force-pushed
the
fix/interrupted-action-retry
branch
from
October 10, 2026 10:16
97bd8bd to
a9fd06b
Compare
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.
Fixes #134.
User workflow
An owner approves a gated connected-service action and the server stops before the result is saved (crash, restart, deploy). Today that card shows "Running" forever with no retry path, and every approval attempt returns
409 This action is already running.After this change, the card shows "Interrupted" with a Retry action button once the claim is demonstrably stale, and retrying runs the already-stored request exactly once.Change
ACTION_TTL_MS(10 min; a claimed action settles in ~60s since MCP calls are bounded, so a result-less older claim cannot belong to a live run).claimActionreclaims an expired result-less claim atomically (conditional UPDATE, so concurrent reclaimers serialize and only one executes);finishActionno longer overwrites a saved result.interruptedfor an expired result-less claim; the POST path lets the same approval reclaim it.runningrows still 409, saved results still return only to their own approval, and a different approval can never steal the claim.interrupted, labels it, explains the retry, and offers "Retry action".Verification
tests/connections.test.ts: retry-after-interruption runs the stored request exactly once (receiptinterrupted→ POST 200 → receiptdone), fresh claims still 409, and a stale claim under a different approval still 409s. The retry test failed on the base commit (receipt stayedrunning, POST stayed 409) and passes with the fix.npm run check-format,npm run lint,npm run typecheck, andnpm run buildall green (Node v22.23.1).