Skip to content

Adds Reporting for Steam Failed Trades - #411

Merged
Step7750 merged 4 commits into
masterfrom
fix/steam-trade-failed-handling
Aug 28, 2026
Merged

Adds Reporting for Steam Failed Trades#411
Step7750 merged 4 commits into
masterfrom
fix/steam-trade-failed-handling

Conversation

@Step7750

@Step7750 Step7750 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

It's possible for a Steam trade to hit status 4 (failed) upon offer acceptance.

This PR will push notary proofs if the related trade is for a CSFloat sale, allowing the platform to gracefully handle it.

Ref CSF-1701


Note

Medium Risk
Changes trade verification and notary submission for pending CSFloat sales; failures are mitigated by feature flags and the same backoff used for rollback proofs, but incorrect matching could affect trade state handling.

Overview
Adds detection and reporting when a Steam trade reaches failed status while a related CSFloat sale is still pending with an active offer.

The periodic CSFloat trade ping now runs pingFailedTrades after trade history is fetched. findFailedTrades links failed Steam history entries to pending trades by asset ID and counterparty, skipping trades already marked with steam_trade_failed_id or with an accepted offer. When background notary rollback is enabled, it submits proofs through the existing proveTradesInBackground path (with the same 60-minute backoff on proof failure).

Trade history fetching now requests and retains failed entries (includeFailed on the Steam API, status filter, and include_failed: true on notary prove requests). SlimTrade gains optional steam_trade_failed_id for deduplication. Unit tests cover the matching rules.

Reviewed by Cursor Bugbot for commit ad8c647. Bugbot is set up for automated code reviews on this repo. Configure here.

It's possible for a Steam trade to hit status 4 (failed) upon offer acceptance.

This PR will push notary proofs if the related trade is for a CSFloat sale, allowing the platform to gracefully handle it.

Ref CSF-1701
@Step7750
Step7750 requested a review from GODrums July 31, 2026 00:47
@Step7750 Step7750 added the bug label Jul 31, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9a9cf8c. Configure here.

Comment thread src/lib/alarms/failed_trade.ts
Comment thread src/lib/alarms/failed_trade.test.ts Outdated
@Step7750
Step7750 merged commit 42e1cd5 into master Aug 28, 2026
4 checks passed
@Step7750
Step7750 deleted the fix/steam-trade-failed-handling branch August 28, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants