Repository navigation
fix(markdown): read episode timestamps as milliseconds in _iso - #623
Conversation
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
Reviewed the repository rules, the PR diff, all _iso callers and their millisecond-domain model fields, the datetime helper contract/properties, and the introducing history. I also checked backward compatibility, architecture boundaries, and that the regression test adds coverage without weakening existing assertions. The strict millisecond conversion fixes pre-2001 timestamps while preserving current timestamps and display-timezone rendering.
Validation: all lint gates passed; tests/unit/test_infra/test_markdown/test_stores.py passed (33 tests), and tests/unit/test_properties/test_datetime_laws.py passed (7 tests). The full unit command could not collect because the unchanged base commit's test_nvidia_endpoint.py imports resolve_llm_config, which that base does not export; this is outside this PR's one-commit diff. The documented make wrapper was unavailable, so I ran its underlying uv commands directly.
|
Closing and reopening only to re-run CI: the earlier runs predate the workflow-pinning change on main and cannot be re-run. Nothing for you to change. |
_iso() always gets epoch milliseconds but used from_timestamp(), which treats values below 1e12 as seconds. Episodes from before 2001-09-09 then failed to render (e.g. 2000-01-01 raised 'year 31969 is out of range'). Use from_timestamp_ms(), which exists for this case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58f2b1a to
1e54987
Compare
|
Rebased your commit onto current main (no other change) so CI runs with the pinned workflows; approved the runs. |
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
The rebase is patch-identical to the reviewed revision. I rechecked the current repository rules, diff, callers and history, backward compatibility, test coverage (including that no assertions were weakened), and architecture boundaries; current main made no relevant changes. Validation on this head: the markdown-store suite passed (33 tests), the datetime-property suite passed (7 tests), and Ruff check/format verification passed for both changed files.
Summary
_iso()in the markdown store always gets epoch milliseconds, but it usedfrom_timestamp(), which treats values below1e12as seconds. So episodes from before 2001-09-09 failed to render (2000-01-01 raisedyear 31969 is out of range). It now usesfrom_timestamp_ms(), which was made for this case.I only changed
_iso. The ingest path also usesfrom_timestamp(), but the API schema says the seconds/ms guess there is on purpose for backward compat, so I left it alone.Fixes #622
Area
Verification
Checklist
main..envfiles, dependency folders, or generated output.Notes for Reviewers
Small one-line fix plus a regression test. No docs needed since nothing user-facing changes for normal dates.
I used Claude Code and Codex to help find and fix this. I checked the change and ran the tests myself.
🤖 Generated with Claude Code
By submitting this pull request, I agree that my contribution is licensed under
the Apache License 2.0.