Datasets:
File size: 8,233 Bytes
8c8cced ea61660 | 1 2 3 4 5 6 7 8 | {"args": {}, "ok": true, "result": "{\"count\": 28, \"rows\": [{\"created_day\": 396, \"labels\": \"bug\", \"number\": 4404, \"repo\": \"novacart/storefront\", \"state\": \"closed\", \"title\": \"Rate limiter allows bursts above the configured ceiling\"}, {\"created_day\": 403, \"labels\": \"bug,priority\", \"number\": 4407, \"repo\": \"novacart/platform\", \"state\": \"open\", \"title\": \"Refund webhook retried indefinitely on 4xx\"}, {\"created_day\": 410, \"labels\": \"bug,customer-report\", \"number\": 4409, \"repo\": \"novacart/commerce\", \"state\": \"open\", \"title\": \"Dark mode toggle resets on navigation\"}, {\"created_day\": 417, \"labels\": \"enhancement\", \"number\": 4411, \"repo\": \"novacart/growth\", \"state\": \"open\", \"title\": \"Checkout page hangs before redirect\"}, {\"created_day\": 400, \"labels\": \"enhancement,priority\", \"number\": 4414, \"repo\": \"novacart/data\", \"state\": \"closed\", \"title\": \"Gateway 502s under sustained load\"}, {\"created_day\": 407, \"labels\": \"chore\", \"number\": 4417, \"repo\": \"novacart/storefront\", \"state\": \"open\", \"title\": \"Settlement batch size is not configurable\"}, {\"created_day\": 414, \"labels\": \"docs\", \"number\": 4418, \"repo\": \"novacart/platform\", \"state\": \"open\", \"title\": \"Search reindex job has never completed\"}, {\"created_day\": 397, \"labels\": \"bug,regression\", \"number\": 4419, \"repo\": \"novacart/commerce\", \"state\": \"open\", \"title\": \"Autocomplete returns deleted products\"}, {\"created_day\": 404, \"labels\": \"security\", \"number\": 4422, \"repo\": \"novacart/growth\", \"state\": \"closed\", \"title\": \"Duplicate charge on retried capture\"}, {\"created_day\": 411, \"labels\": \"bug,priority,customer-report\", \"number\": 4424, \"repo\": \"novacart/data\", \"state\": \"open\", \"title\": \"Upgrade the base image to bookworm\"}, {\"created_day\": 418, \"labels\": \"bug\", \"number\": 4427, \"repo\": \"novacart/storefront\", \"state\": \"open\", \"title\": \"Stale search results after catalog update\"}, {\"created_day\": 401, \"labels\": \"bug,priority\", \"number\": 4430, \"repo\": \"novacart/platform\", \"state\": \"open\", \"title\": \"Document the traffic-shift ceiling\"}, {\"created_day\": 408, \"labels\": \"bug,customer-report\", \"number\": 4431, \"repo\": \"novacart/commerce\", \"state\": \"closed\", \"title\": \"Cart total rounds incorrectly at 3 decimal places\"}, {\"created_day\": 415, \"labels\": \"enhancement\", \"number\": 4432, \"repo\": \"novacart/growth\", \"state\": \"open\", \"title\": \"Session cookie missing SameSite attribute\"}, {\"created_day\": 398, \"labels\": \"enhancement,priority\", \"number\": 4434, \"repo\": \"novacart/data\", \"state\": \"open\", \"title\": \"Inventory count drifts after partial fulfilment\"}, {\"created_day\": 405, \"labels\": \"chore\", \"number\": 4436, \"repo\": \"novacart/storefront\", \"state\": \"open\", \"title\": \"Export job writes an empty header row\"}, {\"created_day\": 412, \"labels\": \"docs\", \"number\": 4437, \"repo\": \"novacart/platform\", \"state\": \"closed\", \"title\": \"Password reset email links expire too quickly\"}, {\"created_day\": 419, \"labels\": \"bug,regression\", \"number\": 4438, \"repo\": \"novacart/commerce\", \"state\": \"open\", \"title\": \"Product images load at full resolution on mobile\"}, {\"created_day\": 402, \"labels\": \"security\", \"number\": 4441, \"repo\": \"novacart/growth\", \"state\": \"open\", \"title\": \"Analytics rollup double-counts refunded orders\"}, {\"created_day\": 409, \"labels\": \"bug,priority,customer-report\", \"number\": 4444, \"repo\": \"novacart/data\", \"state\": \"open\", \"title\": \"Timezone handling breaks the nightly cutover\"}, {\"created_day\": 416, \"labels\": \"bug\", \"number\": 4447, \"repo\": \"novacart/storefront\", \"state\": \"closed\", \"title\": \"Webhook signature check accepts an empty signature\"}, {\"created_day\": 399, \"labels\": \"bug,priority\", \"number\": 4448, \"repo\": \"novacart/platform\", \"state\": \"open\", \"title\": \"Bulk import silently drops rows over 10k\"}, {\"created_day\": 406, \"labels\": \"bug,customer-report\", \"number\": 4451, \"repo\": \"novacart/commerce\", \"state\": \"open\", \"title\": \"Coupon stacking bypasses the maximum discount\"}, {\"created_day\": 413, \"labels\": \"enhancement\", \"number\": 4453, \"repo\": \"novacart/growth\", \"state\": \"open\", \"title\": \"Search filters reset when paginating\"}, {\"created_day\": 396, \"labels\": \"en...[truncated]", "tool": "github_list_issues"}
{"args": {"key": "OPS-143"}, "ok": true, "result": "{\"assignee\": \"\", \"description\": \"\", \"key\": \"OPS-143\", \"priority\": \"high\", \"service\": \"\", \"status\": \"open\", \"ticket_id\": 9181, \"title\": \"Implement per-client rate limiting at the edge\", \"type\": \"feature\"}", "tool": "get_ticket"}
{"args": {"path": "src/gateway/token_bucket.py"}, "ok": true, "result": "{\"current_content\": \"\\\"\\\"\\\"Per-client rate limiting at the API gateway edge.\\\"\\\"\\\"\\n\\n\\nclass TokenBucket:\\n def __init__(self, capacity, refill_per_sec):\\n raise NotImplementedError\\n\\n def allow(self, now_ms):\\n \\\"\\\"\\\"True if a request may proceed, consuming one token.\\\"\\\"\\\"\\n raise NotImplementedError\\n\", \"function\": \"TokenBucket\", \"note\": \"hidden tests also run at verification time and are not shown\", \"path\": \"src/gateway/token_bucket.py\", \"service\": \"api-gateway\", \"spec\": \"Implement class TokenBucket(capacity, refill_per_sec) with one method,\\nallow(now_ms), returning True if a request may proceed and False otherwise.\\n\\nA bucket starts full. Each allowed request consumes exactly one token; a\\nrefused request consumes none. Tokens refill continuously at refill_per_sec\\nand the bucket never holds more than capacity.\\n\\nRefill is continuous, not stepwise: two calls 500ms apart at 1 token/sec must\\ntogether restore one whole token, so partial time must not be discarded. The\\nfirst call establishes the clock and refills nothing.\\n\\nnow_ms comes from a wall clock that is occasionally stepped backwards by NTP.\\nA backwards jump must never grant tokens and must never make the bucket\\npermanently unable to refill: treat time as not having advanced, and take the\\nnew reading as the current clock.\", \"visible_tests\": [\"a full bucket allows up to capacity\", \"waiting restores a token\"]}", "tool": "read_exercise"}
{"args": {"content": "\"\"\"Per-client rate limiting at the API gateway edge.\"\"\"\n\n\nclass TokenBucket:\n def __init__(self, capacity, refill_per_sec):\n self.capacity = float(capacity)\n self.refill_per_sec = float(refill_per_sec)\n self.tokens = float(capacity)\n self.last_ms = None\n\n def allow(self, now_ms):\n if self.last_ms is None:\n self.last_ms = now_ms\n elif now_ms > self.last_ms:\n elapsed = (now_ms - self.last_ms) / 1000.0\n self.tokens = min(self.capacity,\n self.tokens + elapsed * self.refill_per_sec)\n self.last_ms = now_ms\n else:\n self.last_ms = now_ms\n if self.tokens >= 1.0:\n self.tokens -= 1.0\n return True\n return False\n", "path": "src/gateway/token_bucket.py"}, "ok": true, "result": "{\"chars\": 782, \"next\": \"run_exercise_tests to execute it\", \"ok\": true, \"path\": \"src/gateway/token_bucket.py\"}", "tool": "write_implementation"}
{"args": {"path": "src/gateway/token_bucket.py"}, "ok": true, "result": "{\"note\": \"all visible tests pass; hidden tests also ran and are not shown\", \"ok\": true, \"passed\": 2, \"path\": \"src/gateway/token_bucket.py\", \"tests\": [{\"error\": \"\", \"name\": \"a full bucket allows up to capacity\", \"passed\": true}, {\"error\": \"\", \"name\": \"waiting restores a token\", \"passed\": true}], \"total\": 2}", "tool": "run_exercise_tests"}
{"args": {"key": "OPS-143", "status": "done"}, "ok": true, "result": "{\"assignee\": \"\", \"key\": \"OPS-143\", \"ok\": true, \"status\": \"done\"}", "tool": "update_ticket"}
{"verdict": {"passed": true, "reward": 1.0, "score": 1.0}}
|