Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR switches Python trace directory names from nanosecond timestamps to a human-readable 20-digit format and adds a test to validate the new naming scheme.
- Updated
set_traceto usedatetime.now().strftime("%Y%m%d%H%M%S%f")instead oftime.time_ns(). - Enhanced docstring to reflect the new
YYYYMMDDHHMMSSffffffformat. - Added
test_trace_directory_name_formatin the test suite.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| python/poml/api.py | Import datetime, update timestamp generation and docstring, replacing time.time_ns() |
| python/tests/test_basic.py | Import re and add a test to verify the 20-digit directory name format |
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Bug: Trace Directory Naming Conflict
The set_trace function's trace directory naming now uses microsecond precision instead of nanosecond precision. This change, combined with exist_ok=True during directory creation, allows multiple calls within the same microsecond to generate identical directory names. As a result, different trace sessions can unintentionally share the same directory, leading to mixed or overwritten trace data.
python/poml/api.py#L33-L36
Lines 33 to 36 in 1661d96
BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.
Was this report helpful? Give feedback by reacting with 👍 or 👎
Summary
Testing
npm run build-webviewnpm run build-clinpm run lintnpm testpython -m pip install -e .[dev]python -m pytest python/testshttps://chatgpt.com/codex/tasks/task_e_686ceafcb96c832e9aa17ac3f6e15046