Download data/tasks/train.jsonl from batistado/QuorumBench: direct link, hf CLI and curl.
- Browser
- Download file 47.4 kB
-
https://huggingface.co/datasets/batistado/QuorumBench/resolve/main/data/tasks/train.jsonl
- Command line
-
hf download hf://datasets/batistado/QuorumBench/data/tasks/train.jsonl
-
curl -L -o train.jsonl https://huggingface.co/datasets/batistado/QuorumBench/resolve/main/data/tasks/train.jsonl
47.4 kB
| {"task_index": 0, "task_id": "R01_sha256_bytes", "regime": "routine", "category": "systems_basics", "stage1_question": "How many raw bytes (not hex characters) are produced by a standard SHA-256 digest?", "stage1_options_json": "{\"A\": \"16 bytes\", \"B\": \"32 bytes\", \"C\": \"64 bytes\", \"D\": \"128 bytes\"}", "stage1_gold": "B", "upstream_triage_note": "Spec check: SHA-256 outputs a 256-bit digest (256 / 8 = 32 raw bytes, 64 hex chars).", "stage2_question": "Given Stage-1's finding on raw SHA-256 digest width, which fixed-size binary column buffer should be allocated per record?", "stage2_options_json": "{\"A\": \"BINARY(16)\", \"B\": \"BINARY(32)\", \"C\": \"BINARY(64)\", \"D\": \"BINARY(128)\"}", "stage2_gold": "B"} | |
| {"task_index": 1, "task_id": "T01_uint16_overflow", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "In C/CUDA, a kernel computes `uint16_t total_tokens = batch_size * seq_len;` When `batch_size = 256` and `seq_len = 256`, what exact value is stored in `total_tokens`?", "stage1_options_json": "{\"A\": \"65536\", \"B\": \"65535\", \"C\": \"0\", \"D\": \"32768\"}", "stage1_gold": "C", "upstream_triage_note": "Automated static check: `256 * 256` evaluates cleanly to `65536` with no division-by-zero or syntax warning.", "stage2_question": "Given Stage-1's finding on `uint16_t total_tokens` for 256x256, what remediation is required before deploying the CUDA kernel?", "stage2_options_json": "{\"A\": \"Approve and deploy kernel commit as-is without changing `uint16_t`\", \"B\": \"Block deploy and widen `total_tokens` (and operands) to `uint32_t` / `size_t`\", \"C\": \"Keep `uint16_t` and subtract 1 from `total_tokens`\", \"D\": \"Keep `uint16_t` and multiply `total_tokens` by 2\"}", "stage2_gold": "B"} | |
| {"task_index": 2, "task_id": "T02_float32_precision_stall", "regime": "boundary_trap", "category": "numerical", "stage1_question": "A telemetry counter uses IEEE-754 single-precision `float32` (`np.float32`). Starting at `x = np.float32(16777216.0)` (`2**24`), the loop runs `x = np.float32(x + np.float32(1.0))` 100 times. What is the exact final value of `x`?", "stage1_options_json": "{\"A\": \"16777316.0\", \"B\": \"16777216.0\", \"C\": \"16777266.0\", \"D\": \"Overflow to inf\"}", "stage1_gold": "B", "upstream_triage_note": "Quick math summary: 16,777,216 + 100*1.0 = 16,777,316.0, well below float32 max (~3.4e38).", "stage2_question": "Given Stage-1's verification of the `float32` request counter above 2^24, what action should be taken?", "stage2_options_json": "{\"A\": \"Ship `float32` counter unchanged\", \"B\": \"Replace `float32` accumulator with `int64` / `float64`\", \"C\": \"Keep `float32` and multiply increments by 2 after the loop\", \"D\": \"Add an `isinf()` saturation clamp on `float32`\"}", "stage2_gold": "B"} | |
| {"task_index": 3, "task_id": "R02_binary_heap_left_child", "regime": "routine", "category": "algorithms", "stage1_question": "In a 0-indexed binary heap stored in a contiguous array, what is the index of the left child of node i = 14?", "stage1_options_json": "{\"A\": \"27\", \"B\": \"28\", \"C\": \"29\", \"D\": \"30\"}", "stage1_gold": "C", "upstream_triage_note": "0-indexed heap invariant: left_child(i) = 2*i + 1 = 29.", "stage2_question": "Based on Stage-1's index verification for node i = 14, what is the exact index of its right sibling (right child of i = 14)?", "stage2_options_json": "{\"A\": \"28\", \"B\": \"29\", \"C\": \"30\", \"D\": \"31\"}", "stage2_gold": "C"} | |
| {"task_index": 4, "task_id": "T03_sql_not_in_null", "regime": "boundary_trap", "category": "databases", "stage1_question": "Table `orders` has 5 rows with `id` in `(1, 2, 3, 4, 5)`. Subquery `blocked_ids` returns `(2, 4, NULL)`. How many rows does `SELECT id FROM orders WHERE id NOT IN (SELECT uid FROM blocked_ids);` return in standard SQL / PostgreSQL / SQLite?", "stage1_options_json": "{\"A\": \"3 rows (1, 3, 5)\", \"B\": \"0 rows\", \"C\": \"5 rows\", \"D\": \"2 rows (2, 4)\"}", "stage1_gold": "B", "upstream_triage_note": "Query triage: excluding IDs (2, 4) from (1, 2, 3, 4, 5) leaves the 3 unmatched IDs (1, 3, 5).", "stage2_question": "Given Stage-1's SQL `NOT IN` evaluation when NULLs can appear in `blocked_ids`, what deployment decision is appropriate?", "stage2_options_json": "{\"A\": \"Deploy `WHERE id NOT IN (SELECT uid FROM blocked_ids)` unchanged\", \"B\": \"Rewrite query to `NOT EXISTS` or add `WHERE uid IS NOT NULL` inside the subquery\", \"C\": \"Append `LIMIT 3` to the existing `NOT IN` query\", \"D\": \"Replace `NOT IN` with `IN`\"}", "stage2_gold": "B"} | |
| {"task_index": 5, "task_id": "T04_shift_add_precedence", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "In both C and Python 3, what exact integer value does the unparenthesized expression `1 << 2 + 3` evaluate to?", "stage1_options_json": "{\"A\": \"7\", \"B\": \"32\", \"C\": \"8\", \"D\": \"11\"}", "stage1_gold": "B", "upstream_triage_note": "Left-to-right scan: `1 << 2` is 4, plus 3 equals 7.", "stage2_question": "Given Stage-1's finding on `1 << 2 + 3` in bitmask macro code where `7` was intended, what action is needed?", "stage2_options_json": "{\"A\": \"Ship `1 << 2 + 3` unchanged\", \"B\": \"Parenthesize explicitly as `(1 << 2) + 3`\", \"C\": \"Change operator `<<` to `>>`\", \"D\": \"Cast `3` to `uint8_t` without parentheses\"}", "stage2_gold": "B"} | |
| {"task_index": 6, "task_id": "R03_http_idempotent", "regime": "routine", "category": "distributed_systems", "stage1_question": "According to RFC 9110 (HTTP Semantics), which of the following HTTP methods is NOT guaranteed to be idempotent?", "stage1_options_json": "{\"A\": \"GET\", \"B\": \"PUT\", \"C\": \"DELETE\", \"D\": \"POST\"}", "stage1_gold": "D", "upstream_triage_note": "RFC 9110 Section 9.2.2: GET, HEAD, OPTIONS, TRACE, PUT, and DELETE are idempotent; POST is not.", "stage2_question": "Given Stage-1's HTTP idempotency classification, how should the RPC retry middleware handle automatic timeout retries without an idempotency key?", "stage2_options_json": "{\"A\": \"Auto-retry POST freely on timeout, block GET retries\", \"B\": \"Allow safe automatic retry on GET/PUT/DELETE, require explicit idempotency key before retrying POST\", \"C\": \"Disable retries on PUT and DELETE only\", \"D\": \"Treat POST and GET identically as stateless reads\"}", "stage2_gold": "B"} | |
| {"task_index": 7, "task_id": "T05_python_xor_caret", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "In Python 3, what is the exact integer value evaluated by the expression `3 ^ 4 % 5`?", "stage1_options_json": "{\"A\": \"1\", \"B\": \"7\", \"C\": \"2\", \"D\": \"81\"}", "stage1_gold": "B", "upstream_triage_note": "Math note: 3^4 = 81, and 81 mod 5 = 1.", "stage2_question": "Given Stage-1's evaluation of `3 ^ 4 % 5` when modular exponentiation 3^4 mod 5 was intended, what action is required?", "stage2_options_json": "{\"A\": \"Approve `3 ^ 4 % 5` unchanged\", \"B\": \"Replace `3 ^ 4 % 5` with `pow(3, 4, 5)`\", \"C\": \"Keep `^` and parenthesize as `(3 ^ 4) % 5`\", \"D\": \"Remove `% 5` and keep `3 ^ 4`\"}", "stage2_gold": "B"} | |
| {"task_index": 8, "task_id": "T06_python_bankers_rounding", "regime": "boundary_trap", "category": "numerical", "stage1_question": "In Python 3, evaluate `sum(round(x + 0.5) for x in range(8))` (i.e., `round(0.5) + round(1.5) + round(2.5) + round(3.5) + round(4.5) + round(5.5) + round(6.5) + round(7.5)`).", "stage1_options_json": "{\"A\": \"36\", \"B\": \"32\", \"C\": \"28\", \"D\": \"34\"}", "stage1_gold": "B", "upstream_triage_note": "Arithmetic check: rounding 0.5..7.5 up gives 1+2+3+4+5+6+7+8 = 36.", "stage2_question": "Given Stage-1's finding on Python `round()` when a billing spec requires `.5` to round strictly upward (target sum 36), what action should be taken?", "stage2_options_json": "{\"A\": \"Ship built-in `round()` unchanged\", \"B\": \"Replace `round()` with `Decimal.quantize(..., rounding=ROUND_HALF_UP)`\", \"C\": \"Replace `round()` with `int()` floor truncation\", \"D\": \"Subtract `0.5` before calling `round()`\"}", "stage2_gold": "B"} | |
| {"task_index": 9, "task_id": "R04_matmul_flops", "regime": "routine", "category": "numerical", "stage1_question": "If matrix X has shape (4, 8) and matrix Y has shape (8, 5), what is the output shape of the matrix product X @ Y?", "stage1_options_json": "{\"A\": \"(4, 5)\", \"B\": \"(8, 8)\", \"C\": \"(5, 4)\", \"D\": \"(4, 8)\"}", "stage1_gold": "A", "upstream_triage_note": "Linear algebra check: (4, 8) @ (8, 5) contracts inner dim 8 -> output shape (4, 5).", "stage2_question": "Given Stage-1's verified output shape for X @ Y, how many scalar elements are stored in the output tensor?", "stage2_options_json": "{\"A\": \"20 elements\", \"B\": \"32 elements\", \"C\": \"40 elements\", \"D\": \"64 elements\"}", "stage2_gold": "A"} | |
| {"task_index": 10, "task_id": "T07_closure_late_binding", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "What exact value is returned by the Python 3 snippet:\n`funcs = [lambda x: x * i for i in range(5)]\nresult = funcs[1](10) + funcs[2](10)`", "stage1_options_json": "{\"A\": \"30\", \"B\": \"80\", \"C\": \"100\", \"D\": \"20\"}", "stage1_gold": "B", "upstream_triage_note": "Code scan: `funcs[1](10)` is `10 * 1 = 10` and `funcs[2](10)` is `10 * 2 = 20`, totaling 30.", "stage2_question": "Given Stage-1's finding on `funcs = [lambda x: x * i for i in range(5)]` when `30` is desired, what patch is needed?", "stage2_options_json": "{\"A\": \"Approve `[lambda x: x * i for i in range(5)]` unchanged\", \"B\": \"Capture loop variable via default argument `[lambda x, i=i: x * i for i in range(5)]`\", \"C\": \"Change `range(5)` to `range(6)`\", \"D\": \"Wrap the list comprehension in `tuple(...)`\"}", "stage2_gold": "B"} | |
| {"task_index": 11, "task_id": "T08_shallow_list_multiply", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "What exact integer is printed by this Python snippet?\n`dp = [[0] * 4] * 5\ndp[0][2] = 7\ndp[3][2] += 2\nprint(sum(row[2] for row in dp))`", "stage1_options_json": "{\"A\": \"9\", \"B\": \"45\", \"C\": \"35\", \"D\": \"14\"}", "stage1_gold": "B", "upstream_triage_note": "Matrix trace: `dp[0][2] = 7` and `dp[3][2] = 2`, while rows 1, 2, 4 stay 0 -> sum is 7 + 2 = 9.", "stage2_question": "Given Stage-1's finding on `dp = [[0] * 4] * 5` when independent rows (sum 9) are intended, what action is needed?", "stage2_options_json": "{\"A\": \"Keep `dp = [[0] * 4] * 5` unchanged\", \"B\": \"Replace initialization with `dp = [[0] * 4 for _ in range(5)]`\", \"C\": \"Use `dp = ([0] * 4,) * 5`\", \"D\": \"Divide final sum by 2\"}", "stage2_gold": "B"} | |
| {"task_index": 12, "task_id": "R05_tcp_syn_seq", "regime": "routine", "category": "networking", "stage1_question": "During a TCP 3-way handshake, if the client sends SYN with sequence number ISN = 1000, what acknowledgment number (ACK) does the server send in its SYN-ACK packet?", "stage1_options_json": "{\"A\": \"999\", \"B\": \"1000\", \"C\": \"1001\", \"D\": \"2000\"}", "stage1_gold": "C", "upstream_triage_note": "TCP SYN consumes 1 virtual sequence byte, so SYN-ACK acknowledges ISN + 1 = 1001.", "stage2_question": "Given Stage-1's handshake ACK rule, what packet check should the stateful firewall enforce on the server's SYN-ACK?", "stage2_options_json": "{\"A\": \"Require ack_num == client_isn - 1 (999)\", \"B\": \"Require ack_num == client_isn (1000)\", \"C\": \"Require ack_num == client_isn + 1 (1001)\", \"D\": \"Require ack_num == 2 * client_isn (2000)\"}", "stage2_gold": "C"} | |
| {"task_index": 13, "task_id": "T09_utf8_emoji_bytes", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "In Python 3, what exact integer does `len('café 🚀'.encode('utf-8'))` return? (Note: string is `'c'`, `'a'`, `'f'`, `'é'` U+00E9, `' '` U+0020, `'🚀'` U+1F680.)", "stage1_options_json": "{\"A\": \"6\", \"B\": \"7\", \"C\": \"10\", \"D\": \"12\"}", "stage1_gold": "C", "upstream_triage_note": "String check: `'café 🚀'` has 6 characters (`c`, `a`, `f`, `é`, space, rocket), or 7 with accented char.", "stage2_question": "Given Stage-1's UTF-8 byte length for `'café 🚀'`, what exact `Content-Length` byte header must the HTTP serializer emit?", "stage2_options_json": "{\"A\": \"Content-Length: 6\", \"B\": \"Content-Length: 10\", \"C\": \"Content-Length: 7\", \"D\": \"Content-Length: 12\"}", "stage2_gold": "B"} | |
| {"task_index": 14, "task_id": "T10_harmonic_throughput", "regime": "boundary_trap", "category": "distributed_systems", "stage1_question": "A backup job uploads a 600 GB snapshot over Link A at 60 MB/s, and immediately downloads/verifies the exact same 600 GB snapshot over Link B at 20 MB/s. What is the exact effective average transfer rate (total GB transferred divided by total elapsed time) across the round-trip?", "stage1_options_json": "{\"A\": \"40 MB/s\", \"B\": \"30 MB/s\", \"C\": \"35 MB/s\", \"D\": \"25 MB/s\"}", "stage1_gold": "B", "upstream_triage_note": "Throughput summary: average of 60 MB/s upload and 20 MB/s download is (60 + 20) / 2 = 40 MB/s.", "stage2_question": "Given Stage-1's effective round-trip rate, what exact total duration must be reserved to transfer 1200 GB (600 GB up + 600 GB down, 1 GB = 1000 MB)?", "stage2_options_json": "{\"A\": \"30,000 seconds\", \"B\": \"40,000 seconds\", \"C\": \"34,285 seconds\", \"D\": \"48,000 seconds\"}", "stage2_gold": "B"} | |
| {"task_index": 15, "task_id": "R06_raft_quorum_size", "regime": "routine", "category": "distributed_systems", "stage1_question": "In a standard symmetric Raft cluster of N = 9 voting nodes, what is the minimum number of nodes required to form a commit quorum?", "stage1_options_json": "{\"A\": \"4 nodes\", \"B\": \"5 nodes\", \"C\": \"6 nodes\", \"D\": \"7 nodes\"}", "stage1_gold": "B", "upstream_triage_note": "Raft majority quorum: floor(9 / 2) + 1 = 5 nodes.", "stage2_question": "Given Stage-1's Raft quorum size for N = 9, what is the maximum number of simultaneous node crash failures (f) the cluster can tolerate while still committing log entries?", "stage2_options_json": "{\"A\": \"f = 3\", \"B\": \"f = 4\", \"C\": \"f = 5\", \"D\": \"f = 2\"}", "stage2_gold": "B"} | |
| {"task_index": 16, "task_id": "T11_bayes_false_positive", "regime": "boundary_trap", "category": "math", "stage1_question": "In a cluster of 10,000 nodes, exactly 0.1% (10 nodes) truly have silent hardware corruption. An automated detector flags corrupt nodes with 99% true-positive sensitivity, and has a 1% false-positive rate on healthy nodes (99% specificity). If a randomly chosen node triggers an alert, what is the closest posterior probability that the node truly has silent corruption?", "stage1_options_json": "{\"A\": \"99.0%\", \"B\": \"90.0%\", \"C\": \"9.0%\", \"D\": \"50.0%\"}", "stage1_gold": "C", "upstream_triage_note": "Detector accuracy spec: 99% sensitivity and 99% specificity -> ~99% alert precision.", "stage2_question": "Given Stage-1's posterior precision on a single detector alert (where immediate wipe is only allowed above 80% precision), what runbook policy applies?", "stage2_options_json": "{\"A\": \"Immediately wipe and decommission every alerted node on first alert\", \"B\": \"Gate node wipe behind a secondary confirmation scrub before draining\", \"C\": \"Decommission 9 out of every 10 alerted nodes immediately\", \"D\": \"Disable hardware monitoring completely\"}", "stage2_gold": "B"} | |
| {"task_index": 17, "task_id": "T12_int32_midpoint_overflow", "regime": "boundary_trap", "category": "algorithms", "stage1_question": "In C/Java (`int32_t`, signed 32-bit two's complement range `-2,147,483,648` to `2,147,483,647`), binary search computes `int32_t mid = (low + high) / 2;` with `low = 1500000000` and `high = 1700000000`. Wrapping in 32-bit two's complement before `/ 2`, what happens to `mid`?", "stage1_options_json": "{\"A\": \"mid evaluates cleanly to 1,600,000,000\", \"B\": \"low + high overflows signed int32, making mid = -547,483,648\", \"C\": \"mid saturates at 2,147,483,647\", \"D\": \"mid evaluates to 100,000,000\"}", "stage1_gold": "B", "upstream_triage_note": "Midpoint check: (1.5e9 + 1.7e9) / 2 = 1.6e9, which is < INT32_MAX (2.147e9).", "stage2_question": "Given Stage-1's finding on `int32_t mid = (low + high) / 2`, what code review decision applies?", "stage2_options_json": "{\"A\": \"Approve `(low + high) / 2` unchanged\", \"B\": \"Require `low + ((high - low) >> 1)`\", \"C\": \"Use `min((low + high) / 2, INT32_MAX - 1)`\", \"D\": \"Use `abs((low + high) / 2)`\"}", "stage2_gold": "B"} | |
| {"task_index": 18, "task_id": "R07_dag_topo_cycle", "regime": "routine", "category": "algorithms", "stage1_question": "Kahn's topological sort algorithm runs on a directed graph with V = 12 vertices and terminates having popped only 9 vertices from the zero-indegree queue. What does this guarantee?", "stage1_options_json": "{\"A\": \"The graph is a valid tree\", \"B\": \"The graph contains at least one directed cycle\", \"C\": \"The graph has 3 disconnected isolated vertices with indegree 0\", \"D\": \"All edges have negative weights\"}", "stage1_gold": "B", "upstream_triage_note": "Kahn's algorithm visits < V vertices iff at least one directed cycle prevents remaining vertices from reaching indegree 0.", "stage2_question": "Given Stage-1's diagnosis of the workflow graph, how should the job scheduler respond at submission time?", "stage2_options_json": "{\"A\": \"Execute the 9 visited tasks and silently drop the remaining 3\", \"B\": \"Reject the workflow submission with a CyclicDependencyError\", \"C\": \"Treat the graph as a valid tree and enable tree-dp caching\", \"D\": \"Negate edge weights and rerun Dijkstra\"}", "stage2_gold": "B"} | |
| {"task_index": 19, "task_id": "T13_sliding_window_fencepost", "regime": "boundary_trap", "category": "algorithms", "stage1_question": "A function computes the maximum sum of any contiguous subarray of length `k = 4` over `arr = [2, 1, 5, 1, 3, 2, 9]` (`len(arr) = 7`) using:\n`best = max(sum(arr[i : i + k]) for i in range(len(arr) - k))`\nWhat exact value does `best` evaluate to?", "stage1_options_json": "{\"A\": \"15\", \"B\": \"11\", \"C\": \"10\", \"D\": \"14\"}", "stage1_gold": "B", "upstream_triage_note": "Max 4-element contiguous window of [2, 1, 5, 1, 3, 2, 9] is [1, 3, 2, 9] = 15.", "stage2_question": "Given Stage-1's trace of `range(len(arr) - k)` when true max window sum 15 is required, what action applies?", "stage2_options_json": "{\"A\": \"Approve `range(len(arr) - k)` unchanged\", \"B\": \"Patch loop bound to `range(len(arr) - k + 1)`\", \"C\": \"Patch slice to `arr[i : i + k + 1]`\", \"D\": \"Patch loop bound to `range(len(arr) - k - 1)`\"}", "stage2_gold": "B"} | |
| {"task_index": 20, "task_id": "T14_mutable_default_retry", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "Consider Python function:\n`def record_attempt(code, history=[]):\n history.append(code)\n return sum(history)`\nIf a worker calls `a = record_attempt(200)`, then `b = record_attempt(500)`, then `c = record_attempt(200)`, what is the exact value of `a + b + c`?", "stage1_options_json": "{\"A\": \"900\", \"B\": \"1800\", \"C\": \"1600\", \"D\": \"1100\"}", "stage1_gold": "B", "upstream_triage_note": "Call trace: three standalone calls with default `history=[]` return 200, 500, and 200 -> 200+500+200 = 900.", "stage2_question": "Given Stage-1's finding when each standalone call should start with an empty history (sum 900), what action applies?", "stage2_options_json": "{\"A\": \"Approve `def record_attempt(code, history=[]):` unchanged\", \"B\": \"Change signature to `history=None` and initialize `[]` inside the body\", \"C\": \"Call `history.pop()` before `return`\", \"D\": \"Change `history=[]` to `history={}`\"}", "stage2_gold": "B"} | |
| {"task_index": 21, "task_id": "R08_ipv4_cidr_hosts", "regime": "routine", "category": "networking", "stage1_question": "How many total IPv4 addresses (including network and broadcast addresses) are contained in a /26 CIDR block?", "stage1_options_json": "{\"A\": \"32\", \"B\": \"64\", \"C\": \"128\", \"D\": \"256\"}", "stage1_gold": "B", "upstream_triage_note": "IPv4 has 32 bits; a /26 prefix leaves 32 - 26 = 6 host bits -> 2^6 = 64 total addresses.", "stage2_question": "Given Stage-1's total address count for /26, how many usable host addresses remain in standard IPv4 networking after reserving network and broadcast addresses?", "stage2_options_json": "{\"A\": \"30\", \"B\": \"62\", \"C\": \"126\", \"D\": \"254\"}", "stage2_gold": "B"} | |
| {"task_index": 22, "task_id": "T15_neg_floor_mod_c_vs_py", "regime": "boundary_trap", "category": "numerical", "stage1_question": "In Python 3, what exact tuple is produced by `(-17 // 5, -17 % 5)`?", "stage1_options_json": "{\"A\": \"(-3, -2)\", \"B\": \"(-4, 3)\", \"C\": \"(-3, 3)\", \"D\": \"(-4, -2)\"}", "stage1_gold": "B", "upstream_triage_note": "Integer division note: 17 / 5 = 3 remainder 2, so with negative sign `-17 / 5` is `-3` remainder `-2`.", "stage2_question": "Given Stage-1's finding when porting C99's `(-17 / 5, -17 % 5)` (`(-3, -2)`) into Python, what action applies?", "stage2_options_json": "{\"A\": \"Use Python `(-17 // 5, -17 % 5)` directly without modification\", \"B\": \"Use `int(-17 / 5)` and `int(math.fmod(-17, 5))` for truncation-toward-zero semantics\", \"C\": \"Use `(-17 // 5, -(-17 % 5))`\", \"D\": \"Add `1` to `x // y` for all integers\"}", "stage2_gold": "B"} | |
| {"task_index": 23, "task_id": "T16_generator_exhaustion", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "What exact float value is computed by this Python 3 snippet?\n`scores = (x * 2 for x in [1, 2, 3, 4])\ntotal = sum(scores)\ncount = len(list(scores))\navg = total / max(count, 1)`", "stage1_options_json": "{\"A\": \"5.0\", \"B\": \"20.0\", \"C\": \"2.5\", \"D\": \"0.0\"}", "stage1_gold": "B", "upstream_triage_note": "Metrics check: doubled list is [2, 4, 6, 8], sum = 20, count = 4 -> avg = 20 / 4 = 5.0.", "stage2_question": "Given Stage-1's trace when the true mean `5.0` is required, what patch applies?", "stage2_options_json": "{\"A\": \"Approve generator expression `scores = (x * 2 for ...)` unchanged\", \"B\": \"Materialize `scores = [x * 2 for x in [1, 2, 3, 4]]` as a list before `sum` and `len`\", \"C\": \"Replace `max(count, 1)` with `count`\", \"D\": \"Divide `avg` by `2.0`\"}", "stage2_gold": "B"} | |
| {"task_index": 24, "task_id": "R09_btree_search_complexity", "regime": "routine", "category": "databases", "stage1_question": "What is the worst-case asymptotic time complexity of point-key lookup in a balanced B-Tree indexing N keys?", "stage1_options_json": "{\"A\": \"O(1)\", \"B\": \"O(log N)\", \"C\": \"O(sqrt(N))\", \"D\": \"O(N)\"}", "stage1_gold": "B", "upstream_triage_note": "Balanced B-Tree height scales logarithmically with key count -> O(log N) worst-case lookup.", "stage2_question": "Given Stage-1's B-Tree lookup complexity, which workload benefits directly from a B-Tree index over a hash-only index?", "stage2_options_json": "{\"A\": \"Ordered range scans (WHERE key BETWEEN low AND high) with O(log N + K) traversal\", \"B\": \"Guaranteed O(1) worst-case uncached random disk seeks regardless of N\", \"C\": \"Eliminating all key comparisons\", \"D\": \"Sorting arbitrary unindexed columns in O(1) time\"}", "stage2_gold": "A"} | |
| {"task_index": 25, "task_id": "T17_float_nan_sort_membership", "regime": "boundary_trap", "category": "numerical", "stage1_question": "In Python 3, execute:\n`v = float('nan')\na = (v == v)\nb = (v in [v])`\nWhat exact pair `(a, b)` is produced?", "stage1_options_json": "{\"A\": \"(False, False)\", \"B\": \"(False, True)\", \"C\": \"(True, True)\", \"D\": \"(True, False)\"}", "stage1_gold": "B", "upstream_triage_note": "IEEE-754 NaN rule: `NaN != NaN` is always True, so both equality `v == v` and list membership `v in [v]` are False -> `(False, False)`.", "stage2_question": "Given Stage-1's finding on `v == v` vs `v in [v]`, which statement accurately documents Python list `in` semantics for unit tests?", "stage2_options_json": "{\"A\": \"Document that `x in [x]` evaluates to `False` for `NaN` just like `x == x`\", \"B\": \"Document that container `in` checks object identity (`is`) before `==`, so `v in [v]` is `True` while `v == v` is `False`\", \"C\": \"Document that both `v == v` and `v in [v]` evaluate to `True`\", \"D\": \"Document that `v == v` is `True` while `v in [v]` is `False`\"}", "stage2_gold": "B"} | |
| {"task_index": 26, "task_id": "T18_modulo_chain_remainder", "regime": "boundary_trap", "category": "math", "stage1_question": "What is the exact remainder when `7**2026 + 3**2026` is divided by `10`?", "stage1_options_json": "{\"A\": \"0\", \"B\": \"8\", \"C\": \"2\", \"D\": \"4\"}", "stage1_gold": "B", "upstream_triage_note": "Quick modular check: 7 + 3 = 10 == 0 (mod 10), so 7^n + 3^n is divisible by 10 -> remainder 0.", "stage2_question": "Given Stage-1's exact remainder of `7**2026 + 3**2026 (mod 10)`, what parity guard must be placed on `n` so `7**n + 3**n` is divisible by `10`?", "stage2_options_json": "{\"A\": \"Accept all positive integers `n` without restriction\", \"B\": \"Require `n % 2 == 1` (odd positive integers only)\", \"C\": \"Require `n % 4 == 0`\", \"D\": \"Require `n % 2 == 0` (even positive integers only)\"}", "stage2_gold": "B"} | |
| {"task_index": 27, "task_id": "R10_geometric_series", "regime": "routine", "category": "math", "stage1_question": "What is the exact sum of the finite geometric series 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128?", "stage1_options_json": "{\"A\": \"254\", \"B\": \"255\", \"C\": \"256\", \"D\": \"511\"}", "stage1_gold": "B", "upstream_triage_note": "Sum_{k=0}^7 2^k = 2^8 - 1 = 255.", "stage2_question": "Given Stage-1's exact sum (255), does this total fit without overflow inside an unsigned 8-bit integer (uint8, range 0..255)?", "stage2_options_json": "{\"A\": \"No, 254 already overflows uint8\", \"B\": \"Yes, 255 equals UINT8_MAX (255) and fits cleanly without wraparound\", \"C\": \"No, 256 wraps to 0 in uint8\", \"D\": \"No, 511 requires uint16\"}", "stage2_gold": "B"} | |
| {"task_index": 28, "task_id": "T19_sql_count_col_null", "regime": "boundary_trap", "category": "databases", "stage1_question": "Table `sessions` has 6 rows with column `latency_ms` values `(12, NULL, 18, NULL, 0, 25)`. What exact pair of integers does `SELECT COUNT(*), COUNT(latency_ms) FROM sessions;` return in SQL?", "stage1_options_json": "{\"A\": \"(6, 6)\", \"B\": \"(6, 4)\", \"C\": \"(4, 4)\", \"D\": \"(6, 3)\"}", "stage1_gold": "B", "upstream_triage_note": "Table scan: `sessions` contains 6 rows, so `COUNT` returns 6 across the table.", "stage2_question": "Given Stage-1's finding when computing `SUM(latency_ms) / COUNT(*)` vs `AVG(latency_ms)` over `(12, NULL, 18, NULL, 0, 25)`, what is `AVG(latency_ms)` in SQL?", "stage2_options_json": "{\"A\": \"9.17 (55 / 6)\", \"B\": \"13.75 (55 / 4)\", \"C\": \"18.33 (55 / 3)\", \"D\": \"NULL\"}", "stage2_gold": "B"} | |
| {"task_index": 29, "task_id": "T20_python_dict_bool_int_float_keys", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "In Python 3, execute:\n`d = {True: 'yes', 1: 'int_one', 1.0: 'float_one'}\nprint(len(d), list(d.keys())[0], list(d.values())[0])`\nWhat exact output is printed?", "stage1_options_json": "{\"A\": \"3 True yes\", \"B\": \"1 True float_one\", \"C\": \"1 1.0 float_one\", \"D\": \"2 True int_one\"}", "stage1_gold": "B", "upstream_triage_note": "Dict literal has 3 distinct types (`bool`, `int`, `float`) -> length 3 (`3 True yes`).", "stage2_question": "Given Stage-1's finding on `{True: 'yes', 1: 'int_one', 1.0: 'float_one'}`, how must typed configuration keys be stored if `True` and `1` are distinct flags?", "stage2_options_json": "{\"A\": \"Use raw Python dict keys directly since `len(d)` is already 3\", \"B\": \"Namespace keys with explicit type tags `(type(k), k)` so `True == 1 == 1.0` do not overwrite the initial `True` key slot\", \"C\": \"Sort the dictionary keys after insertion\", \"D\": \"Convert `1.0` to `int(1.0)` to avoid key collision\"}", "stage2_gold": "B"} | |
| {"task_index": 30, "task_id": "R11_mutex_deadlock_order", "regime": "routine", "category": "concurrency", "stage1_question": "Thread 1 locks Mutex A then Mutex B, while Thread 2 locks Mutex B then Mutex A. Which classic Coffman condition is violated if we enforce a strict global lock acquisition order (always lock A before B)?", "stage1_options_json": "{\"A\": \"Mutual Exclusion\", \"B\": \"Circular Wait\", \"C\": \"No Preemption\", \"D\": \"Cache Coherence\"}", "stage1_gold": "B", "upstream_triage_note": "Total lock ordering makes a cycle in the wait-for graph impossible, eliminating Circular Wait.", "stage2_question": "Given Stage-1's deadlock condition analysis, what static/runtime lock-hierarchy rule prevents this deadlock?", "stage2_options_json": "{\"A\": \"Keep opposite lock orders and add random sleep()\", \"B\": \"Assign monotonically increasing lock ranks and assert rank(next_lock) > rank(held_lock) to eliminate Circular Wait\", \"C\": \"Allow multiple threads into the critical section simultaneously without synchronization\", \"D\": \"Flush L1 cache lines before unlocking\"}", "stage2_gold": "B"} | |
| {"task_index": 31, "task_id": "T21_signed_right_shift_mask", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "In Python 3 (and two's-complement arithmetic right shift), what exact integer does `-1 >> 5` evaluate to?", "stage1_options_json": "{\"A\": \"0\", \"B\": \"-1\", \"C\": \"134217727\", \"D\": \"-32\"}", "stage1_gold": "B", "upstream_triage_note": "Bit shift note: shifting a small integer right by 5 bits divides toward zero -> `0`.", "stage2_question": "Given Stage-1's evaluation of `-1 >> 5`, why does `while x != 0: x >>= 1` hang infinitely on negative `x` in Python?", "stage2_options_json": "{\"A\": \"It does not hang because `-1 >> 1` reaches `0` in one step\", \"B\": \"Because floor/sign-extending right shift converges to `-1` (never `0`) for negative integers; mask `(x & 0xFFFFFFFF) >> 1` is required for logical 32-bit shift\", \"C\": \"Because `>>=` multiplies `x` by 2\", \"D\": \"Because Python raises ZeroDivisionError on `-1 >> 1`\"}", "stage2_gold": "B"} | |
| {"task_index": 32, "task_id": "T22_dijkstra_negative_edge", "regime": "boundary_trap", "category": "algorithms", "stage1_question": "Directed graph has 4 nodes `{S, A, B, T}` and edges `S->A (weight 2)`, `S->B (weight 5)`, `B->A (weight -4)`, `A->T (weight 1)`. Standard non-revisiting Dijkstra (marking popped nodes finalized once) runs from `S`. What `(dijkstra_output, true_shortest_path)` pair for `S -> T` occurs?", "stage1_options_json": "{\"A\": \"(3, 3)\", \"B\": \"(3, 2)\", \"C\": \"(2, 2)\", \"D\": \"(6, 2)\"}", "stage1_gold": "B", "upstream_triage_note": "Shortest path check: `S -> A -> T` has cost `2 + 1 = 3`, and Dijkstra pops `S(0)`, `A(2)`, `T(3)` cleanly -> `(3, 3)`.", "stage2_question": "Given Stage-1's finding on non-revisiting Dijkstra over `{S->A:2, S->B:5, B->A:-4, A->T:1}`, what routing algorithm change is required?", "stage2_options_json": "{\"A\": \"Keep standard non-revisiting Dijkstra unchanged\", \"B\": \"Switch to Bellman-Ford (or SPFA) when negative edge weights exist\", \"C\": \"Add a constant +5 to every edge weight before running Dijkstra\", \"D\": \"Run Breadth-First Search (BFS) instead\"}", "stage2_gold": "B"} | |
| {"task_index": 33, "task_id": "R12_kv_cache_bytes", "regime": "routine", "category": "ml_systems", "stage1_question": "A transformer layer caches K and V tensors for 1 sequence of 1024 tokens with 8 KV heads, head_dim = 128, stored in FP16 (2 bytes/element). How many megabytes (1 MB = 1,048,576 bytes) does this single layer's KV cache occupy?", "stage1_options_json": "{\"A\": \"1 MB\", \"B\": \"2 MB\", \"C\": \"4 MB\", \"D\": \"8 MB\"}", "stage1_gold": "C", "upstream_triage_note": "Bytes = 2 (K,V) * 1024 * 8 * 128 * 2 bytes = 4,194,304 bytes = 4 MB.", "stage2_question": "Given Stage-1's single-layer KV footprint, how much KV memory is needed across 32 identical layers for that sequence?", "stage2_options_json": "{\"A\": \"32 MB\", \"B\": \"64 MB\", \"C\": \"128 MB\", \"D\": \"256 MB\"}", "stage2_gold": "C"} | |
| {"task_index": 34, "task_id": "T23_python_chained_comparison", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "In Python 3, what exact boolean value does the expression `(False == False) in [False]` vs `False == False in [False]` evaluate to, specifically `False == False in [False]`?", "stage1_options_json": "{\"A\": \"False\", \"B\": \"True\", \"C\": \"TypeError\", \"D\": \"None\"}", "stage1_gold": "B", "upstream_triage_note": "Left-to-right evaluation: `False == False` is `True`, and `True in [False]` is `False`.", "stage2_question": "Given Stage-1's evaluation of `False == False in [False]` in Python, what linting rule prevents this bug?", "stage2_options_json": "{\"A\": \"Allow unparenthesized `a == b in seq` when checking whether boolean `(a == b)` belongs to `seq`\", \"B\": \"Require explicit parentheses `(a == b) in seq` because Python chains `a == b and b in seq`\", \"C\": \"Replace `in` with `is`\", \"D\": \"Convert `[False]` to a set\"}", "stage2_gold": "B"} | |
| {"task_index": 35, "task_id": "T24_c_sizeof_array_param_decay", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "On 64-bit Linux (`LP64`, `sizeof(int) == 4`, `sizeof(int*) == 8`), a C function is defined as:\n`size_t get_len(int arr[100]) { return sizeof(arr) / sizeof(arr[0]); }`\nWhat exact value does `get_len(my_buf)` return?", "stage1_options_json": "{\"A\": \"100\", \"B\": \"2\", \"C\": \"400\", \"D\": \"8\"}", "stage1_gold": "B", "upstream_triage_note": "Array parameter `int arr[100]` has declared bound 100 -> `sizeof(arr) / sizeof(arr[0])` returns 100.", "stage2_question": "Given Stage-1's finding on `size_t get_len(int arr[100])` on 64-bit Linux, how must buffer length be handled in C?", "stage2_options_json": "{\"A\": \"Keep `sizeof(arr) / sizeof(arr[0])` inside `get_len`\", \"B\": \"Pass `size_t len` explicitly alongside `const int *arr`\", \"C\": \"Write `int arr[200]` in the parameter list to double the count\", \"D\": \"Divide `sizeof(arr)` by `8` instead of `sizeof(arr[0])`\"}", "stage2_gold": "B"} | |
| {"task_index": 36, "task_id": "R13_http_429_status", "regime": "routine", "category": "distributed_systems", "stage1_question": "In standard HTTP status codes (RFC 6585), what condition does status code 429 indicate?", "stage1_options_json": "{\"A\": \"Payload Too Large\", \"B\": \"Too Many Requests (rate limit exceeded)\", \"C\": \"Gateway Timeout\", \"D\": \"Unauthorized\"}", "stage1_gold": "B", "upstream_triage_note": "RFC 6585 Section 4: HTTP 429 indicates Too Many Requests.", "stage2_question": "Given Stage-1's HTTP 429 classification, how should an API client handle a 429 response?", "stage2_options_json": "{\"A\": \"Immediately send larger request payloads\", \"B\": \"Honor the `Retry-After` header or apply exponential backoff with jitter\", \"C\": \"Re-prompt the user for new TLS certificates\", \"D\": \"Treat 429 as HTTP 200 OK\"}", "stage2_gold": "B"} | |
| {"task_index": 37, "task_id": "T25_list_remove_while_iterating", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "In Python 3, execute:\n`nums = [2, 4, 6, 8, 9]\nfor x in nums:\n if x % 2 == 0:\n nums.remove(x)`\nWhat is the exact final list `nums`?", "stage1_options_json": "{\"A\": \"[9]\", \"B\": \"[4, 8, 9]\", \"C\": \"[2, 6, 9]\", \"D\": \"RuntimeError: list changed size during iteration\"}", "stage1_gold": "B", "upstream_triage_note": "Loop check: removes every even element (`x % 2 == 0`) from `[2, 4, 6, 8, 9]`, leaving `[9]`.", "stage2_question": "Given Stage-1's trace of mutating `nums` via `.remove()` during `for x in nums:`, what fix removes all even numbers?", "stage2_options_json": "{\"A\": \"Keep `for x in nums: nums.remove(x)` unchanged\", \"B\": \"Use a list comprehension `nums = [x for x in nums if x % 2 != 0]` (or iterate over a copy `nums[:]`)\", \"C\": \"Wrap `nums.remove(x)` in `try / except RuntimeError`\", \"D\": \"Sort `nums` before running the same loop\"}", "stage2_gold": "B"} | |
| {"task_index": 38, "task_id": "T26_modular_inverse_existence", "regime": "boundary_trap", "category": "math", "stage1_question": "How many integers `x` in `{0, 1, ..., 20}` satisfy the modular congruence `(6 * x) % 21 == 1`?", "stage1_options_json": "{\"A\": \"1\", \"B\": \"0\", \"C\": \"3\", \"D\": \"7\"}", "stage1_gold": "B", "upstream_triage_note": "Linear congruence modulo N = 21 has a unique modular inverse solution `x` in `0..20` -> 1 solution.", "stage2_question": "Given Stage-1's result on `(6 * x) % 21 == 1`, what precondition must an RSA/modular-inverse helper validate before computing `pow(a, -1, m)`?", "stage2_options_json": "{\"A\": \"Only check `a != 0`\", \"B\": \"Assert `math.gcd(a, m) == 1`\", \"C\": \"Assert `a < m`\", \"D\": \"Assert `m` is odd\"}", "stage2_gold": "B"} | |
| {"task_index": 39, "task_id": "R14_quicksort_worst_case", "regime": "routine", "category": "algorithms", "stage1_question": "What is the worst-case time complexity of deterministic first-element-pivot Quicksort on an already sorted array of N distinct elements?", "stage1_options_json": "{\"A\": \"O(N)\", \"B\": \"O(N log N)\", \"C\": \"O(N^2)\", \"D\": \"O(log N)\"}", "stage1_gold": "C", "upstream_triage_note": "First-element pivot on sorted input partitions into 0 and N-1 elements -> sum_{i=1}^{N-1} i = O(N^2).", "stage2_question": "Given Stage-1's worst-case complexity diagnosis, what pivot/fallback change guarantees O(N log N) worst-case sorting?", "stage2_options_json": "{\"A\": \"Always pick the last element as pivot\", \"B\": \"Use Introsort (switch to Heapsort if recursion depth exceeds 2 * floor(log2 N))\", \"C\": \"Disable partitioning on sorted arrays by reversing first\", \"D\": \"Switch to Bubble Sort\"}", "stage2_gold": "B"} | |
| {"task_index": 40, "task_id": "T27_python_string_strip_chars", "regime": "boundary_trap", "category": "systems_bugs", "stage1_question": "In Python 3, what exact string does `'prefix_price_id'.lstrip('prefix_')` return?", "stage1_options_json": "{\"A\": \"'price_id'\", \"B\": \"'ce_id'\", \"C\": \"'_price_id'\", \"D\": \"'prefix_price_id'\"}", "stage1_gold": "B", "upstream_triage_note": "String helper: `.lstrip('prefix_')` strips the leading prefix `'prefix_'`, leaving `'price_id'`.", "stage2_question": "Given Stage-1's finding on `'prefix_price_id'.lstrip('prefix_')` in Python 3.9+, what method must be used to remove an exact prefix substring?", "stage2_options_json": "{\"A\": \"Keep `.lstrip('prefix_')` unchanged\", \"B\": \"Use `.removeprefix('prefix_')`\", \"C\": \"Use `.strip('prefix_')`\", \"D\": \"Use `.replace('p', '')`\"}", "stage2_gold": "B"} | |
| {"task_index": 41, "task_id": "T28_amdahl_parallel_limit", "regime": "boundary_trap", "category": "distributed_systems", "stage1_question": "A workload has a strictly serial initialization/commit fraction of `s = 20%` (`0.20`) and a perfectly parallelizable fraction of `80%` (`0.80`). Under Amdahl's Law, if we scale from 1 GPU to `P = 16` GPUs, what is the exact end-to-end speedup (rounded to 2 decimal places)?", "stage1_options_json": "{\"A\": \"12.80x\", \"B\": \"4.00x\", \"C\": \"5.00x\", \"D\": \"8.00x\"}", "stage1_gold": "B", "upstream_triage_note": "Parallel scaling estimate: 80% of 16 GPUs yields 0.80 * 16 = 12.80x speedup.", "stage2_question": "Given Stage-1's exact speedup at P = 16 GPUs with 20% serial fraction, even with infinite GPUs (`P -> inf`), can this job ever achieve a 6.0x speedup without reducing the 20% serial bottleneck?", "stage2_options_json": "{\"A\": \"Yes, 16 GPUs already exceeds 6.0x\", \"B\": \"No, asymptotic speedup ceiling is 1 / 0.20 = 5.00x (4.00x at P=16), so the serial path must be optimized\", \"C\": \"Yes, 32 GPUs reaches 6.4x\", \"D\": \"Yes, 64 GPUs reaches 8.0x\"}", "stage2_gold": "B"} | |
| {"task_index": 42, "task_id": "R15_raid1_capacity", "regime": "routine", "category": "systems_basics", "stage1_question": "A storage server pairs two identical 4 TB NVMe drives in a standard RAID-1 (full mirroring) array. What is the usable logical storage capacity?", "stage1_options_json": "{\"A\": \"2 TB\", \"B\": \"4 TB\", \"C\": \"6 TB\", \"D\": \"8 TB\"}", "stage1_gold": "B", "upstream_triage_note": "RAID-1 mirrors identical blocks across both 4 TB drives -> 4 TB usable capacity.", "stage2_question": "Given Stage-1's RAID-1 usable capacity, how many single-drive failures can the 2-drive RAID-1 mirror survive without data loss?", "stage2_options_json": "{\"A\": \"0 drive failures\", \"B\": \"1 drive failure\", \"C\": \"2 simultaneous drive failures\", \"D\": \"3 drive failures\"}", "stage2_gold": "B"} | |
| {"task_index": 43, "task_id": "T29_twos_complement_abs_int8_min", "regime": "boundary_trap", "category": "numerical", "stage1_question": "In 8-bit signed two's-complement arithmetic (`np.int8`, range `-128` to `127`), wrapping modulo 256 in signed `int8`, what value does `-np.int8(-128)` produce?", "stage1_options_json": "{\"A\": \"128\", \"B\": \"-128\", \"C\": \"127\", \"D\": \"0\"}", "stage1_gold": "B", "upstream_triage_note": "Negating `-128` flips the sign to `+128`.", "stage2_question": "Given Stage-1's finding on negating `INT8_MIN` (`-128`), what guard is required before taking `abs(x)` on fixed-width signed integers?", "stage2_options_json": "{\"A\": \"No guard needed; `-x` is always strictly positive for `x < 0`\", \"B\": \"Widen to a larger signed type (`int16`/`int32`) before negation or explicitly handle `x == INT_MIN`\", \"C\": \"Call `abs(abs(x))` twice in `int8`\", \"D\": \"Add `0` before negating\"}", "stage2_gold": "B"} | |
| {"task_index": 44, "task_id": "T30_lease_clock_skew_split_brain", "regime": "boundary_trap", "category": "distributed_systems", "stage1_question": "Leader L1 acquires a 10.0-second lease at true physical time `t = 0.0s`. L1's local monotonic clock runs `15%` slow (`0.85s` measured per `1.0s` real time), while the Lock Server's clock runs `5%` fast (`1.05s` per `1.0s` real time) and grants Leader L2 the lease as soon as `10.0s` elapse on the Lock Server's clock. For how many real physical seconds do L1 and L2 BOTH believe they hold the active exclusive lease simultaneously (split-brain window)?", "stage1_options_json": "{\"A\": \"0.00 seconds\", \"B\": \"2.24 seconds\", \"C\": \"1.50 seconds\", \"D\": \"0.50 seconds\"}", "stage1_gold": "B", "upstream_triage_note": "10s lease expires at t = 10s on both sides -> 0.0s overlap (or ~1.5s from 15% drift).", "stage2_question": "Given Stage-1's exact split-brain overlap window (`10/0.85 - 10/1.05`), how must storage writes be protected against zombie leader L1?", "stage2_options_json": "{\"A\": \"Rely solely on L1's local timer since overlap is 0.00s\", \"B\": \"Attach monotonically increasing fencing tokens to every lease and reject storage writes with stale fencing tokens\", \"C\": \"Add a 0.50-second grace buffer on the Lock Server\", \"D\": \"Disable lease expiration\"}", "stage2_gold": "B"} | |
| {"task_index": 45, "task_id": "R16_bloom_filter_fn", "regime": "routine", "category": "algorithms", "stage1_question": "In a standard insert-only Bloom filter (without deletions or bit corruption), what is the exact theoretical false-negative rate for keys that were previously inserted?", "stage1_options_json": "{\"A\": \"0% (zero false negatives)\", \"B\": \"1%\", \"C\": \"50%\", \"D\": \"Depends on hash count k\"}", "stage1_gold": "A", "upstream_triage_note": "Standard Bloom filters never clear set bits, so inserted keys always have all k bits set -> 0% false negatives.", "stage2_question": "Given Stage-1's Bloom filter property, what does a negative lookup (`might_contain(key) == False`) guarantee in an LSM-tree SSTable reader?", "stage2_options_json": "{\"A\": \"The SSTable must still be read from disk because false negatives occur\", \"B\": \"The key is guaranteed absent from that SSTable, so the disk read can be safely skipped\", \"C\": \"The key is definitely present in memory\", \"D\": \"The hash functions collided\"}", "stage2_gold": "B"} | |
| {"task_index": 46, "task_id": "R17_euler_dag_edges", "regime": "routine", "category": "math", "stage1_question": "How many edges does a connected undirected tree with V = 25 vertices contain?", "stage1_options_json": "{\"A\": \"23\", \"B\": \"24\", \"C\": \"25\", \"D\": \"26\"}", "stage1_gold": "B", "upstream_triage_note": "Tree invariant: E = V - 1 = 25 - 1 = 24 edges.", "stage2_question": "Given Stage-1's edge count for a 25-vertex tree, what happens if 1 additional edge connecting two existing vertices is added?", "stage2_options_json": "{\"A\": \"The graph becomes disconnected\", \"B\": \"Exactly one simple cycle is created\", \"C\": \"The vertex count increases to 26\", \"D\": \"The graph remains acyclic\"}", "stage2_gold": "B"} | |
| {"task_index": 47, "task_id": "R18_page_table_offset_bits", "regime": "routine", "category": "systems_basics", "stage1_question": "On an architecture using 4 KiB (4096-byte) virtual memory pages, how many least-significant virtual address bits form the intra-page byte offset?", "stage1_options_json": "{\"A\": \"10 bits\", \"B\": \"12 bits\", \"C\": \"14 bits\", \"D\": \"16 bits\"}", "stage1_gold": "B", "upstream_triage_note": "4096 = 2^12 bytes -> 12 page-offset bits.", "stage2_question": "Given Stage-1's offset width on a 48-bit canonical virtual address space with 4 KiB pages, how many bits encode the Virtual Page Number (VPN)?", "stage2_options_json": "{\"A\": \"32 bits\", \"B\": \"36 bits\", \"C\": \"38 bits\", \"D\": \"40 bits\"}", "stage2_gold": "B"} | |
| {"task_index": 48, "task_id": "R19_attention_mask_causal", "regime": "routine", "category": "ml_systems", "stage1_question": "In causal self-attention over a sequence of L = 10 tokens (0-indexed 0..9), how many non-masked key positions (including itself) can query token at index q = 6 attend to?", "stage1_options_json": "{\"A\": \"6 positions\", \"B\": \"7 positions\", \"C\": \"9 positions\", \"D\": \"10 positions\"}", "stage1_gold": "B", "upstream_triage_note": "Causal mask allows keys 0, 1, 2, 3, 4, 5, 6 -> 7 positions.", "stage2_question": "Given Stage-1's causal visibility rule across all L = 10 query positions (q = 0..9), how many total unmasked (q, k) pairs are evaluated?", "stage2_options_json": "{\"A\": \"45 pairs\", \"B\": \"55 pairs\", \"C\": \"100 pairs\", \"D\": \"50 pairs\"}", "stage2_gold": "B"} | |
| {"task_index": 49, "task_id": "R20_acid_isolation_serializable", "regime": "routine", "category": "databases", "stage1_question": "Among the four standard ANSI SQL transaction isolation levels, which is the strictest level that prevents dirty reads, non-repeatable reads, AND phantom reads?", "stage1_options_json": "{\"A\": \"READ UNCOMMITTED\", \"B\": \"READ COMMITTED\", \"C\": \"REPEATABLE READ\", \"D\": \"SERIALIZABLE\"}", "stage1_gold": "D", "upstream_triage_note": "ANSI SQL hierarchy: SERIALIZABLE is the strictest isolation level preventing all three anomalies.", "stage2_question": "Given Stage-1's isolation guarantee, which level must be configured if concurrent range-predicate inserts (phantom rows) would violate a ledger invariant?", "stage2_options_json": "{\"A\": \"READ UNCOMMITTED\", \"B\": \"READ COMMITTED\", \"C\": \"SERIALIZABLE\", \"D\": \"AUTOCOMMIT READS\"}", "stage2_gold": "C"} | |