aadi-joshi commited on
Commit
c979cbb
·
1 Parent(s): 5e2a88b

Fix inference Task4 hint, stale docstring, Dockerfile port comment

Browse files

- inference.py: replace broken CREATE-INSERT-DROP-RENAME hint for Task 4
with correct ALTER TABLE RENAME COLUMN instructions; DROP TABLE on
inventory/categories is an instant -1.0 safety violation
- server/environment.py: update reset() docstring from seed%3/tasks 1-3
to seed%5/tasks 1-5
- Dockerfile: fix comment example port from 8000 to 7860

Files changed (3) hide show
  1. Dockerfile +1 -1
  2. inference.py +1 -1
  3. server/environment.py +2 -2
Dockerfile CHANGED
@@ -4,7 +4,7 @@
4
  # docker build -t db-er .
5
  #
6
  # Run (server mode):
7
- # docker run -p 8000:8000 db-er
8
  #
9
  # Run (inference mode):
10
  # docker run --rm \
 
4
  # docker build -t db-er .
5
  #
6
  # Run (server mode):
7
+ # docker run -p 7860:7860 db-er
8
  #
9
  # Run (inference mode):
10
  # docker run --rm \
inference.py CHANGED
@@ -87,7 +87,7 @@ You must respond with a SINGLE JSON object -- no other text, no markdown fences.
87
  - Task 1 (Phantom Duplicates): Look for duplicate emails in users. Keep the OLDEST record per email (lowest id).
88
  - Task 2 (Cascading Failure): admin_audit_logs contains record_json with deleted product data. Parse it and re-INSERT.
89
  - Task 3 (Payroll Black Hole): The "timeout" is MISLEADING. Check employees_old for duplicate IDs (no PRIMARY KEY). Delete corrupted duplicates (salary=0, active=0), then migrate remaining employees.
90
- - Task 4 (Schema Drift): Columns were renamed. Use schema_changelog to find original names. Recreate tables with original column names using CREATE-INSERT-DROP-RENAME pattern.
91
  - Task 5 (Referential Maze): Multi-table FK crisis. Check decommission_log before restoring anything. Use sync_audit for missing data. Projects 5 and 9 are decommissioned and must NOT be restored.
92
 
93
  Always respond with valid JSON. Never include explanations outside the JSON."""
 
87
  - Task 1 (Phantom Duplicates): Look for duplicate emails in users. Keep the OLDEST record per email (lowest id).
88
  - Task 2 (Cascading Failure): admin_audit_logs contains record_json with deleted product data. Parse it and re-INSERT.
89
  - Task 3 (Payroll Black Hole): The "timeout" is MISLEADING. Check employees_old for duplicate IDs (no PRIMARY KEY). Delete corrupted duplicates (salary=0, active=0), then migrate remaining employees.
90
+ - Task 4 (Schema Drift): Columns were renamed. Use schema_changelog (old_column to new_column mapping). Reverse each rename with: ALTER TABLE <table> RENAME COLUMN <current_name> TO <original_name>. Do NOT use DROP TABLE - inventory and categories are protected core tables and will trigger instant -1.0 failure.
91
  - Task 5 (Referential Maze): Multi-table FK crisis. Check decommission_log before restoring anything. Use sync_audit for missing data. Projects 5 and 9 are decommissioned and must NOT be restored.
92
 
93
  Always respond with valid JSON. Never include explanations outside the JSON."""
server/environment.py CHANGED
@@ -106,9 +106,9 @@ class DBEREnvironment(Environment[DBERAction, DBERObservation, DBERState]):
106
 
107
  Args:
108
  seed: Controls task selection when *task_id* is not given.
109
- seed % 3 -> 0=task 1, 1=task 2, 2=task 3.
110
  episode_id: Opaque identifier stored in state.
111
- task_id: Override task selection (1, 2 or 3).
112
  """
113
  # 1. Pick task
114
  if task_id is not None:
 
106
 
107
  Args:
108
  seed: Controls task selection when *task_id* is not given.
109
+ seed % 5 -> 0=task 1, 1=task 2, 2=task 3, 3=task 4, 4=task 5.
110
  episode_id: Opaque identifier stored in state.
111
+ task_id: Override task selection (1-5).
112
  """
113
  # 1. Pick task
114
  if task_id is not None: