- Home
- Skills
- Agents & Orchestration
- Repair Request Cancellation & Abort Bugs
More screenshots
Works with the AI tools you already use
Repair Request Cancellation & Abort Bugs
Diagnose and repair request cancellation, abort propagation, timeouts, background continuation, cleanup, and partial side effects.
$8.99
Repair Request Cancellation & Abort Bugs
Example session with this skill installed
The 'submit-order' endpoint keeps processing payments even after the client disconnects. Here is the Node.js handler snippet and the logs showing 499 errors followed by successful DB writes.
- Read your context and instructions
- Compiled the repair request cancellation
I have analyzed the submit-order handler and the provided logs. The issue stems from the payment gateway call not being linked to the incoming request's AbortSignal, allowing the transaction to complete despite the client's 499 disconnect.
Diagnosis and Repair
The handler currently awaits the processPayment promise without passing the request context. While the database transaction is scoped, it is not aborted when the connection closes.
| Component | Current Behavior | Required Invariant |
|---|---|---|
| Client | Disconnects (499) | Signal must propagate to all downstream IO |
| Payment API | Runs to completion | Must abort via AbortController signal |
| DB Transaction | Commits regardless of status | Rollback must trigger on signal abort |
Implementation Patch
// routes/orders.js - Proposed Fix
app.post('/submit-order', async (req, res) => {
const ac = new AbortController();
req.on('close', () => ac.abort());
const session = await db.startSession();
try {
session.startTransaction();
// Link external payment call to request cancellation
const payment = await paymentGateway.process({
amount: req.body.total,
signal: ac.signal
});
// Ensure DB write respects the signal
await Order.create([{ ...req.body, paymentId: payment.id }], {
session,
signal: ac.signal
});
await session.commitTransaction();
res.status(201).json({ success: true });
} catch (err) {
await session.abortTransaction();
if (err.name === 'AbortError') {
console.log('Request cancelled: cleanup successful');
} else {
throw err;
}
} finally {
session.endSession();
}
});
Deterministic Test Plan
- Mock Service: Create a mock payment gateway with a 500ms latency.
- Abort Trigger: Use a
setTimeoutto triggerreq.emit('close')at 200ms.
Assertion: Verify that the paymentGateway receives an abort signal and that Order.countDocuments() remains 0.
Next steps
- Update the
paymentGatewaySDK wrapper to accept anAbortSignal. - Deploy the patch to a staging environment and verify log suppression for cancelled requests.
- Check for similar patterns in the 'refund-process' endpoint.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Repair Request Cancellation & Abort Bugs is a bounded ToolForge Labs workflow. Diagnose and repair request cancellation, abort propagation, timeouts, background continuation, cleanup, and partial side effects. Works from full repositories or partial context such as snippets, logs, configuration, traces, and architecture notes. Produces concrete repairs or evidence-backed review outputs while preserving existing product/security policy.
It works from a full repository or partial evidence such as snippets, logs, configuration, traces, tickets, and architecture notes. The skill preserves existing product and security policy, separates verified facts from assumptions, avoids invented execution claims, and produces concrete repair or review steps with focused deterministic validation or traceable evidence.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 20 days ago
- Passed all security checks, Safe to install