CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

pubnub/pubnub-live-auctions

Build real-time auction platforms with PubNub bidding and countdowns

Agent Success

Agent success rate when using this tile

100%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.18x

Baseline

Agent success rate without this tile

85%

Overview
Eval results
Skill reviews
Files

task.mdevals/scenario-2/

Implement Server-Side Bid Validation for Live Auction

Context

You are building a real-time auction platform where multiple users can place bids simultaneously. Bids are submitted by clients publishing messages to PubNub auction channels. You need to ensure that only valid bids are seen by other participants, and that accepted bids carry complete information for the UI to display.

The auction state (current high bid, bidder ID, bid count, auction status, pricing rules) is stored in a server-side key-value store.

Task

Write a PubNub Function that intercepts bid messages on auction channels, validates them against the current auction state, and ensures all participants receive properly structured bid results. The function should handle various invalid bid scenarios gracefully, including bids on inactive auctions, insufficient amounts, and redundant bids from the current leader.

Valid bids should be enriched with contextual information about the previous state before being delivered to subscribers. Invalid bids should be converted into rejection messages with clear reasons.

Expected Outputs

  • A PubNub Function (JavaScript module with a default export) that processes bid messages on auction.* channels
  • The function should read and update auction state from a key-value store
  • Include handling for at least 4 distinct rejection scenarios
  • Accepted bids should contain additional server-computed fields beyond what the client submitted

evals

SKILL.mdtile.json