Skip to content

fix(db): record trajectory execution time - #271

Open
Gujiassh wants to merge 1 commit into
TencentCloudADP:mainfrom
Gujiassh:fix/trajectory-time-cost-201
Open

fix(db): record trajectory execution time#271
Gujiassh wants to merge 1 commit into
TencentCloudADP:mainfrom
Gujiassh:fix/trajectory-time-cost-201

Conversation

@Gujiassh

@Gujiassh Gujiassh commented Jul 8, 2026

Copy link
Copy Markdown

Summary

  • record a TaskRecorder start timestamp when the run begins
  • compute TrajectoryModel.time_cost from that timestamp instead of hardcoding -1
  • add a focused regression test for TrajectoryModel.from_task_recorder()

Closes #201.

Testing

  • source .venv312/bin/activate && export UTU_LLM_TYPE=openai UTU_LLM_MODEL=dummy && python -m pytest tests/db/test_trajectory.py -q
  • source .venv312/bin/activate && python -m ruff format utu/agents/common.py utu/db/trajectory_model.py tests/db/test_trajectory.py
  • source .venv312/bin/activate && python -m ruff check utu/agents/common.py utu/db/trajectory_model.py tests/db/test_trajectory.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trajectory time_cost always set to -1

1 participant