checkpoint!

This commit is contained in:
2026-02-27 20:21:52 -05:00
parent a744b39e4f
commit bf1faac4ea
9 changed files with 63 additions and 93 deletions

36
reproduce_issue.py Normal file
View File

@@ -0,0 +1,36 @@
import pytest
from models import Ticket
from dag_engine import TrackDAG, ExecutionEngine
def test_auto_queue_and_step_mode():
t1 = Ticket(id="T1", description="Task 1", status="todo", assigned_to="worker")
t2 = Ticket(id="T2", description="Task 2", status="todo", assigned_to="worker", step_mode=True)
dag = TrackDAG([t1, t2])
# Expectation: ExecutionEngine takes auto_queue parameter
try:
engine = ExecutionEngine(dag, auto_queue=True)
except TypeError:
pytest.fail("ExecutionEngine does not accept auto_queue parameter")
# Tick 1: T1 should be 'in-progress' because auto_queue=True
# T2 should remain 'todo' because step_mode=True
engine.tick()
assert t1.status == "in_progress"
assert t2.status == "todo"
# Approve T2
try:
engine.approve_task("T2")
except AttributeError:
pytest.fail("ExecutionEngine does not have approve_task method")
assert t2.status == "in_progress"
if __name__ == "__main__":
try:
test_auto_queue_and_step_mode()
print("Test passed (unexpectedly)")
except Exception as e:
print(f"Test failed as expected: {e}")