fix(corpus): make AuditReport.timestamp UTC-aware#244
Conversation
Use datetime.now(UTC) for the default AuditReport timestamp so it stays consistent with staleness checks and other corpus audit code that operates on timezone-aware UTC datetimes. Fixes OpenAgentHQ#59
|
/oc review pr |
|
Review: APPROVE ✅ The change is correct and minimal:
The test from the new |
|
🎉 Congratulations @syf2211! Your pull request has been successfully merged into main. 🚀 Thank you for contributing to OpenAgentHQ and helping improve the project. We truly appreciate your contribution and hope to see you back with more amazing PRs! Happy Open Sourcing! ❤️ |

Summary
Make the default
AuditReport.timestamptimezone-aware UTC instead of a naive localdatetime.now().Motivation
StalenessDetectorand other corpus audit code use UTC-aware datetimes (datetime.now(UTC)).AuditReport.timestampdefaulted to naivedatetime.now(), which is inconsistent and can raiseTypeErrorwhen compared with aware datetimes.Fixes #59
Changes
openagent_eval/corpus/models.py: defaulttimestampfactory now usesdatetime.now(UTC)tests/unit/test_corpus/test_models.py: regression test asserting default timestamp is UTC-awareTests
pytest tests/unit/test_corpus/test_models.py -q— 13 passedNotes