Skip to content

fix(corpus): normalize naive staleness timestamps#170

Merged
himanshu231204 merged 1 commit into
OpenAgentHQ:mainfrom
Sanjays2402:fix/naive-staleness-datetime
Jul 16, 2026
Merged

fix(corpus): normalize naive staleness timestamps#170
himanshu231204 merged 1 commit into
OpenAgentHQ:mainfrom
Sanjays2402:fix/naive-staleness-datetime

Conversation

@Sanjays2402

@Sanjays2402 Sanjays2402 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Normalize timezone-naive document metadata timestamps to UTC before comparing them with the staleness cutoff, preventing a TypeError during corpus audits.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Test update
  • CI/CD update

Related Issues

Closes #60

How Has This Been Tested?

Added a regression test using a naive datetime; it fails on main and passes with this fix. All 10 staleness tests pass.

  • Unit tests pass (uv run pytest)
  • Linter passes (uv run ruff check .)
  • Type checker passes (uv run mypy openagent_eval/)
  • Manual testing performed

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

N/A

Additional Notes

Changed-file Ruff findings and formatting results are unchanged from main.

Treat timezone-naive datetime metadata as UTC before comparing it with the aware staleness cutoff. Add a regression test for the crashing input.
@himanshu231204
himanshu231204 merged commit 92b9343 into OpenAgentHQ:main Jul 16, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @Sanjays2402!

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! ❤️

🌟 This is your first merged contribution to this repository.
Welcome to the OpenAgentHQ contributors family!

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.

corpus(staleness): TypeError comparing timezone-naive metadata with timezone-aware cutoff

2 participants