Prince9868 commited on
Commit
b1b08c5
·
1 Parent(s): f18b8fb

Stabilize task grader discovery paths for Phase 2 validation

Browse files
Files changed (2) hide show
  1. openenv.yaml +3 -3
  2. server/app.py +6 -1
openenv.yaml CHANGED
@@ -20,7 +20,7 @@ tasks:
20
  are fake, estimate the true final price against the shopper budget,
21
  and decide if the shopper should proceed.
22
  difficulty: "easy"
23
- grader: "tasks.value_hotel_budget_guard.grader:grade"
24
 
25
  - id: "airline_seat_upsell_gauntlet"
26
  name: "Navigate an airline upsell funnel before purchase"
@@ -30,7 +30,7 @@ tasks:
30
  is fake, calculate the true checkout total, and recommend whether to
31
  continue.
32
  difficulty: "medium"
33
- grader: "tasks.airline_seat_upsell_gauntlet.grader:grade"
34
 
35
  - id: "marketplace_ghost_checkout"
36
  name: "Run a ghost checkout before the shopper commits"
@@ -40,4 +40,4 @@ tasks:
40
  verify timers, and determine the real final total before the shopper
41
  falls for sunk-cost pressure.
42
  difficulty: "hard"
43
- grader: "tasks.marketplace_ghost_checkout.grader:grade"
 
20
  are fake, estimate the true final price against the shopper budget,
21
  and decide if the shopper should proceed.
22
  difficulty: "easy"
23
+ grader: "guardian_openenv.task_graders:grade_value_hotel_budget_guard"
24
 
25
  - id: "airline_seat_upsell_gauntlet"
26
  name: "Navigate an airline upsell funnel before purchase"
 
30
  is fake, calculate the true checkout total, and recommend whether to
31
  continue.
32
  difficulty: "medium"
33
+ grader: "guardian_openenv.task_graders:grade_airline_seat_upsell_gauntlet"
34
 
35
  - id: "marketplace_ghost_checkout"
36
  name: "Run a ghost checkout before the shopper commits"
 
40
  verify timers, and determine the real final total before the shopper
41
  falls for sunk-cost pressure.
42
  difficulty: "hard"
43
+ grader: "guardian_openenv.task_graders:grade_marketplace_ghost_checkout"
server/app.py CHANGED
@@ -72,6 +72,11 @@ def metadata() -> dict:
72
  @app.get("/tasks")
73
  def list_tasks() -> list[dict]:
74
  """List all tasks with metadata — the validator discovers graders here."""
 
 
 
 
 
75
  results = []
76
  for task in TASKS:
77
  results.append({
@@ -81,7 +86,7 @@ def list_tasks() -> list[dict]:
81
  "description": task.objective,
82
  "difficulty": task.difficulty,
83
  "has_grader": True,
84
- "grader": f"tasks.{task.task_id}.grader:grade",
85
  })
86
  return results
87
 
 
72
  @app.get("/tasks")
73
  def list_tasks() -> list[dict]:
74
  """List all tasks with metadata — the validator discovers graders here."""
75
+ grader_by_task_id = {
76
+ "value_hotel_budget_guard": "guardian_openenv.task_graders:grade_value_hotel_budget_guard",
77
+ "airline_seat_upsell_gauntlet": "guardian_openenv.task_graders:grade_airline_seat_upsell_gauntlet",
78
+ "marketplace_ghost_checkout": "guardian_openenv.task_graders:grade_marketplace_ghost_checkout",
79
+ }
80
  results = []
81
  for task in TASKS:
82
  results.append({
 
86
  "description": task.objective,
87
  "difficulty": task.difficulty,
88
  "has_grader": True,
89
+ "grader": grader_by_task_id.get(task.task_id, "guardian_openenv.task_graders:grade"),
90
  })
91
  return results
92