Repository navigation
Conversation
Merge develop 709f998 while preserving the non-finite checkpoint fix and all upstream release notes.
dangzitou
approved these changes
Oct 3, 2026
dangzitou
left a comment
Contributor
There was a problem hiding this comment.
Reviewed 8740abe559c286818055b98edff2d40cea209863 against upstream develop at 709f9986d26de8ba13134859e42aedced1d21977 in an isolated worktree (macOS, Python 3.12.14, dependencies installed with uv sync --locked --python 3.12).
The shared parser guard fixes both history projection and API timestamp fallback for NaN/+Infinity. Negative infinity was already rejected by the existing non-positive check. Restricting math.isfinite to floats also preserves the existing integer behavior, including integers too large for float conversion.
Independent validation:
- Ran the PR's seven regression cases against unchanged upstream source: 4 failed, 3 passed. The NaN/+Infinity projection and serialization cases fail before the fix.
- On this head, ran
uv run pytest tests/unit/history/test_nonfinite_checkpoint.py tests/unit/history/test_projection.py tests/unit/api/test_chat_polish.py -qtogether with 21 additional reviewer cases: 71 passed. The extra cases cover normal seconds/milliseconds, invalid inputs, huge integers, human/assistant batch projection, deduplication, fallback timestamps, and preserving the original message when live-stamping a copy. make all PYTEST_JOBS=2(usingRUN="uv run --no-sync"after locked installation): passed, including lint/typecheck and 4172 passed, 18 skipped in the non-live suite. The checkout remained clean.
No blocking findings for this change. Real-provider calls were not exercised; GitHub returned no CI checks for this head at review time.
Merge develop c928ddc and retain the non-finite checkpoint fix after the new FnOS release note.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NaN or positive infinity in a checkpoint timestamp makes integer conversion raise. History projection then silently drops the message, while API history serialization raises instead of falling back to the row timestamp. Treat non-finite floats as missing timestamps so message content is retained and the existing fallback/live-stamping paths work. Integer inputs keep their existing behavior.
Target branch
developmainType of change
Test plan
uv run pytest tests/unit/history/test_nonfinite_checkpoint.py tests/unit/history/test_projection.py tests/unit/api/test_chat_polish.py -q: 50 passed. The corrected regression suite on unchanged base source gives 4 failed/3 passed: NaN and positive-infinity cases fail; negative infinity and the integer case already pass.make all: backend lint/typecheck and the non-live suite passed; 4047 passed, 137 skipped, 34 warnings.make precommitand dashboard production build passed.PYTHONUTF8=1, and Git Bash. Live tests/external-provider calls were not run; Linux validation is left to PR CI.make allpasses locallyChecklist
CHANGELOG.md(if user-facing)