-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample-task-tracker-report.json
More file actions
199 lines (199 loc) · 9.93 KB
/
Copy pathsample-task-tracker-report.json
File metadata and controls
199 lines (199 loc) · 9.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
{
"project_path": "examples/task_tracker",
"command": [
"python",
"-m",
"pytest",
"--tb=short",
"-q"
],
"returncode": 1,
"duration_seconds": 0.1293862090096809,
"passed": false,
"timed_out": false,
"junit_xml_available": true,
"failures": [
{
"nodeid": "test_task_tracker.py::test_create_task_accepts_priority_metadata",
"headline": "TypeError: create_task() got an unexpected keyword argument 'priority'",
"file_path": "test_task_tracker.py",
"line_number": 5,
"error_type": "TypeError",
"detail": "test_task_tracker.py:5: in test_create_task_accepts_priority_metadata\n task = create_task(\"Ship README\", priority=2)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nE TypeError: create_task() got an unexpected keyword argument 'priority'"
},
{
"nodeid": "test_task_tracker.py::test_completion_rate_uses_done_field",
"headline": "KeyError: 'completed'",
"file_path": "task_tracker.py",
"line_number": 6,
"error_type": "KeyError",
"detail": "test_task_tracker.py:17: in test_completion_rate_uses_done_field\n assert completion_rate(tasks) == 0.5\n ^^^^^^^^^^^^^^^^^^^^^^\ntask_tracker.py:6: in completion_rate\n done_count = sum(1 for task in tasks if task[\"completed\"])\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ntask_tracker.py:6: in <genexpr>\n done_count = sum(1 for task in tasks if task[\"completed\"])\n ^^^^^^^^^^^^^^^^^\nE KeyError: 'completed'"
},
{
"nodeid": "test_task_tracker.py::test_next_task_handles_empty_backlog",
"headline": "IndexError: list index out of range",
"file_path": "task_tracker.py",
"line_number": 12,
"error_type": "IndexError",
"detail": "test_task_tracker.py:21: in test_next_task_handles_empty_backlog\n assert next_task([]) is None\n ^^^^^^^^^^^^^\ntask_tracker.py:12: in next_task\n return sorted_tasks[0][\"title\"]\n ^^^^^^^^^^^^^^^\nE IndexError: list index out of range"
}
],
"diagnoses": [
{
"failure": {
"nodeid": "test_task_tracker.py::test_create_task_accepts_priority_metadata",
"headline": "TypeError: create_task() got an unexpected keyword argument 'priority'",
"file_path": "test_task_tracker.py",
"line_number": 5,
"error_type": "TypeError",
"detail": "test_task_tracker.py:5: in test_create_task_accepts_priority_metadata\n task = create_task(\"Ship README\", priority=2)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nE TypeError: create_task() got an unexpected keyword argument 'priority'"
},
"category": "api-contract",
"confidence": "medium",
"summary": "The failing call does not match the function or method contract.",
"evidence": [
"test_task_tracker.py:5: in test_create_task_accepts_priority_metadata",
"E TypeError: create_task() got an unexpected keyword argument 'priority'"
],
"repair_advice": [
"Inspect the callee signature and the failing call site together.",
"If the public API changed, update compatibility shims or tests intentionally.",
"Add a regression test for the argument pattern that triggered the TypeError."
]
},
{
"failure": {
"nodeid": "test_task_tracker.py::test_completion_rate_uses_done_field",
"headline": "KeyError: 'completed'",
"file_path": "task_tracker.py",
"line_number": 6,
"error_type": "KeyError",
"detail": "test_task_tracker.py:17: in test_completion_rate_uses_done_field\n assert completion_rate(tasks) == 0.5\n ^^^^^^^^^^^^^^^^^^^^^^\ntask_tracker.py:6: in completion_rate\n done_count = sum(1 for task in tasks if task[\"completed\"])\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ntask_tracker.py:6: in <genexpr>\n done_count = sum(1 for task in tasks if task[\"completed\"])\n ^^^^^^^^^^^^^^^^^\nE KeyError: 'completed'"
},
"category": "data-shape",
"confidence": "medium",
"summary": "The code accessed data that was missing or had an unexpected shape.",
"evidence": [
"test_task_tracker.py:17: in test_completion_rate_uses_done_field",
"task_tracker.py:6: in completion_rate",
"task_tracker.py:6: in <genexpr>",
"E KeyError: 'completed'"
],
"repair_advice": [
"Validate the input fixture or runtime data shape before the failing access.",
"Use explicit error handling or default behavior only if that matches the product contract.",
"Add a test for empty, missing, or malformed data."
]
},
{
"failure": {
"nodeid": "test_task_tracker.py::test_next_task_handles_empty_backlog",
"headline": "IndexError: list index out of range",
"file_path": "task_tracker.py",
"line_number": 12,
"error_type": "IndexError",
"detail": "test_task_tracker.py:21: in test_next_task_handles_empty_backlog\n assert next_task([]) is None\n ^^^^^^^^^^^^^\ntask_tracker.py:12: in next_task\n return sorted_tasks[0][\"title\"]\n ^^^^^^^^^^^^^^^\nE IndexError: list index out of range"
},
"category": "data-shape",
"confidence": "medium",
"summary": "The code accessed data that was missing or had an unexpected shape.",
"evidence": [
"test_task_tracker.py:21: in test_next_task_handles_empty_backlog",
"task_tracker.py:12: in next_task",
"E IndexError: list index out of range"
],
"repair_advice": [
"Validate the input fixture or runtime data shape before the failing access.",
"Use explicit error handling or default behavior only if that matches the product contract.",
"Add a test for empty, missing, or malformed data."
]
}
],
"patch_proposals": [
{
"failure_nodeid": "test_task_tracker.py::test_create_task_accepts_priority_metadata",
"target_file": "task_tracker.py",
"target_line": 1,
"action": "Align the failing call and callee signature, preserving compatibility if the function is public.",
"rationale": "The error indicates callers and implementation disagree about accepted arguments or return shape.",
"confidence": "medium",
"guardrail_tests": [
"test_task_tracker.py::test_create_task_accepts_priority_metadata"
]
},
{
"failure_nodeid": "test_task_tracker.py::test_completion_rate_uses_done_field",
"target_file": "task_tracker.py",
"target_line": 6,
"action": "Normalize or validate the data shape before reading required keys or indexes.",
"rationale": "The failing code attempted to read data that the test demonstrates may be absent or malformed.",
"confidence": "medium",
"guardrail_tests": [
"test_task_tracker.py::test_completion_rate_uses_done_field"
]
},
{
"failure_nodeid": "test_task_tracker.py::test_next_task_handles_empty_backlog",
"target_file": "task_tracker.py",
"target_line": 12,
"action": "Normalize or validate the data shape before reading required keys or indexes.",
"rationale": "The failing code attempted to read data that the test demonstrates may be absent or malformed.",
"confidence": "medium",
"guardrail_tests": [
"test_task_tracker.py::test_next_task_handles_empty_backlog"
]
}
],
"fix_suggestions": [
{
"failure_nodeid": "test_task_tracker.py::test_create_task_accepts_priority_metadata",
"target_file": "task_tracker.py",
"title": "Accept optional `priority` metadata in `create_task`.",
"explanation": "The test calls the public function with a keyword argument that the implementation currently rejects.",
"confidence": "medium",
"diff": "--- a/task_tracker.py\n+++ b/task_tracker.py\n@@ -1,2 +1,2 @@\n-def create_task(title: str) -> dict:\n- return {\"title\": title, \"done\": False}\n+def create_task(title: str, priority=None) -> dict:\n+ return {\"title\": title, \"done\": False, \"priority\": priority}",
"guardrail_tests": [
"test_task_tracker.py::test_create_task_accepts_priority_metadata"
]
},
{
"failure_nodeid": "test_task_tracker.py::test_completion_rate_uses_done_field",
"target_file": "task_tracker.py",
"title": "Read the observed `done` field instead of missing `completed`.",
"explanation": "The failing fixture uses `done`; aligning the accessed key removes the shape mismatch exposed by the test.",
"confidence": "medium",
"diff": "--- a/task_tracker.py\n+++ b/task_tracker.py\n@@ -6 +6 @@\n- done_count = sum(1 for task in tasks if task[\"completed\"])\n+ done_count = sum(1 for task in tasks if task[\"done\"])",
"guardrail_tests": [
"test_task_tracker.py::test_completion_rate_uses_done_field"
]
},
{
"failure_nodeid": "test_task_tracker.py::test_next_task_handles_empty_backlog",
"target_file": "task_tracker.py",
"title": "Return `None` when `sorted_tasks` is empty.",
"explanation": "The failing test documents the empty-backlog behavior, so the guard handles the boundary before index access.",
"confidence": "medium",
"diff": "--- a/task_tracker.py\n+++ b/task_tracker.py\n@@ -11,0 +12,2 @@\n+ if not sorted_tasks:\n+ return None",
"guardrail_tests": [
"test_task_tracker.py::test_next_task_handles_empty_backlog"
]
}
],
"rerun": {
"command": [
"python",
"-m",
"pytest",
"--tb=short",
"-q",
"test_task_tracker.py::test_create_task_accepts_priority_metadata",
"test_task_tracker.py::test_completion_rate_uses_done_field",
"test_task_tracker.py::test_next_task_handles_empty_backlog"
],
"returncode": 1,
"duration_seconds": 0.11851666599977762,
"passed": false,
"timed_out": false,
"junit_xml_available": true
}
}