Skip to content

fix(search): avoid year-0 crashes in Chinese rolling-window temporal extraction#2636

Open
r266-tech wants to merge 1 commit into
vectorize-io:mainfrom
r266-tech:r266/chinese-temporal-year0-2533
Open

fix(search): avoid year-0 crashes in Chinese rolling-window temporal extraction#2636
r266-tech wants to merge 1 commit into
vectorize-io:mainfrom
r266-tech:r266/chinese-temporal-year0-2533

Conversation

@r266-tech

Copy link
Copy Markdown
Contributor

Fixes #2533.

Summary

  • avoid constructing year 0 when Chinese rolling-window expressions shift a low reference year backward
  • return the existing no-temporal-constraint sentinel for impossible relative year shifts
  • keep valid low-year rolling windows and unrelated parser ValueErrors covered by regression tests

Tests

  • uv run --frozen pytest tests/test_query_analyzer.py -q
  • uv run --frozen ruff format --check hindsight_api/engine/chinese_temporal_periods.py tests/test_query_analyzer.py
  • uv run --frozen ruff check hindsight_api/engine/chinese_temporal_periods.py tests/test_query_analyzer.py
  • python3 -m py_compile hindsight_api/engine/chinese_temporal_periods.py
  • git diff --check

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.

Consolidation task not working because ValueError('year 0 is out of range')

1 participant