Update README.md
Browse files
README.md
CHANGED
|
@@ -38,14 +38,41 @@ print(obs.code_snippet)
|
|
| 38 |
- `POST /mcp` – minimal MCP endpoint
|
| 39 |
|
| 40 |
## Tasks
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
## Deployment
|
| 51 |
|
|
|
|
| 38 |
- `POST /mcp` – minimal MCP endpoint
|
| 39 |
|
| 40 |
## Tasks
|
| 41 |
+
Easy (null‑checks, simple logic errors)
|
| 42 |
+
# Bug ID Description How to inject
|
| 43 |
+
1 null_check Missing if key in dict: guard AST: remove if‑statement
|
| 44 |
+
2 simple_typo Variable name misspelled (users → usres) AST: rename variable
|
| 45 |
+
3 string_index Indexing string with wrong index (off‑by‑one) AST: change constant in index
|
| 46 |
+
4 default_value Not providing a default in dict.get() AST: replace dict[key] with dict.get(key) … but wrongly
|
| 47 |
+
5 empty_return Function returns None in a branch that should return something AST: insert return None or delete a return
|
| 48 |
+
Medium (off‑by‑one, loop logic, simple arithmetic)
|
| 49 |
+
# Bug ID Description How to inject
|
| 50 |
+
6 off_by_one range(x) → range(1, x-1) (skips first and last) AST: modify range args
|
| 51 |
+
7 loop_skip for i in range(len(arr)): missing last element because of off‑by‑one AST: change range length
|
| 52 |
+
8 sign_error sum += item replaced with sum -= item AST: swap Add/Sub
|
| 53 |
+
9 swap_args Calling a function with arguments swapped AST: swap arg order
|
| 54 |
+
10 uninitialised_var Using a variable before assignment in a loop AST: remove assignment line
|
| 55 |
+
Hard (division‑by‑zero, floating‑point, edge‑case handling)
|
| 56 |
+
# Bug ID Description How to inject
|
| 57 |
+
11 division_by_zero_empty Missing check for empty list before averaging AST: remove the if not data: guard
|
| 58 |
+
12 division_by_zero_zero Integer division where denominator can be zero AST: remove a denominator‑checking statement
|
| 59 |
+
13 float_precision Using integer division // instead of / for average AST: change operator
|
| 60 |
+
14 abs_usage Forgetting abs() when comparing differences AST: remove abs() call
|
| 61 |
+
15 round_error Rounding too early causing precision loss AST: insert round() incorrectly
|
| 62 |
+
Harder (race conditions, missing atomic operations)
|
| 63 |
+
# Bug ID Description How to inject
|
| 64 |
+
16 missing_lock Shared counter accessed without a lock Template: remove with lock: from code
|
| 65 |
+
17 double_lock Acquiring the same lock twice (deadlock risk) Template: add extra lock.acquire()
|
| 66 |
+
18 global_nonatomic Compound assignment x = x + 1 instead of atomic += AST: modify assignment node
|
| 67 |
+
19 thread_safe_list Appending to a list from multiple threads without lock Template: remove lock around list operation
|
| 68 |
+
20 volatile_read Reading a shared flag outside a lock Template: remove synchronization block
|
| 69 |
+
Hardest (deadlock, ordering, complex concurrency)
|
| 70 |
+
# Bug ID Description How to inject
|
| 71 |
+
21 deadlock_order Lock A then lock B in one thread, opposite in another Template: swap lock acquisition order
|
| 72 |
+
22 nested_lock_timeout Not using a timeout when acquiring locks, causing hang Template: replace acquire() with acquire(blocking=True) without timeout
|
| 73 |
+
23 fork_join Starting threads and not waiting for them to finish (missing join()) AST: remove thread.join()
|
| 74 |
+
24 mutex_release Releasing a mutex in one thread that was locked by another Template: wrong release logic
|
| 75 |
+
25 race_on_init Initializing a shared resource after threads have started Template: move initialization after thread creation
|
| 76 |
|
| 77 |
## Deployment
|
| 78 |
|