Spaces:
Sleeping
Sleeping
Commit ·
25253dd
1
Parent(s): 603f77d
final fix: validator-compatible graders
Browse files- server/task.py +41 -1
server/task.py
CHANGED
|
@@ -333,4 +333,44 @@ def grade_action(
|
|
| 333 |
score = max(0.0, score - 0.15)
|
| 334 |
feedback_parts.append("⚠ Security escalation missed (-0.15)")
|
| 335 |
|
| 336 |
-
return round(score, 3), " | ".join(feedback_parts)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
score = max(0.0, score - 0.15)
|
| 334 |
feedback_parts.append("⚠ Security escalation missed (-0.15)")
|
| 335 |
|
| 336 |
+
return round(score, 3), " | ".join(feedback_parts)
|
| 337 |
+
|
| 338 |
+
def priority_match(*args, **kwargs):
|
| 339 |
+
if len(args) < 2:
|
| 340 |
+
return 0.0
|
| 341 |
+
|
| 342 |
+
bug = args[0]
|
| 343 |
+
action = args[1]
|
| 344 |
+
|
| 345 |
+
score, _ = grade_action("easy", bug, action)
|
| 346 |
+
return float(score)
|
| 347 |
+
|
| 348 |
+
|
| 349 |
+
def priority_label_team(*args, **kwargs):
|
| 350 |
+
if len(args) < 2:
|
| 351 |
+
return 0.0
|
| 352 |
+
|
| 353 |
+
bug = args[0]
|
| 354 |
+
action = args[1]
|
| 355 |
+
|
| 356 |
+
score, _ = grade_action("medium", bug, action)
|
| 357 |
+
return float(score)
|
| 358 |
+
|
| 359 |
+
|
| 360 |
+
def full_triage(*args, **kwargs):
|
| 361 |
+
if len(args) < 2:
|
| 362 |
+
return 0.0
|
| 363 |
+
|
| 364 |
+
bug = args[0]
|
| 365 |
+
action = args[1]
|
| 366 |
+
|
| 367 |
+
score, _ = grade_action("hard", bug, action)
|
| 368 |
+
return float(score)
|
| 369 |
+
__all__ = [
|
| 370 |
+
"priority_match",
|
| 371 |
+
"priority_label_team",
|
| 372 |
+
"full_triage",
|
| 373 |
+
"sample_bug",
|
| 374 |
+
"grade_action",
|
| 375 |
+
"TASKS",
|
| 376 |
+
]
|