Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; no actionable issues were found at the current head. SummaryRejects non-finite
Reviews (3) · Last reviewed commit: "fix(api): reject nonfinite heartbeat pul..." · Reviewed by Greptile |
|
Fixed the Linux CI setup failure in d164a0d. Both jobs failed before reaching project code because Validated the YAML and confirmed those runner labels are the only semantic workflow changes. Re-ran the heartbeat/input-validation tests locally: 23 passed. Replacement hosted checks are starting, not yet verified green. |
|
CI-green and mergeable (Greptile 5/5) — waiting only on a maintainer click. This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted. |
🤖 AI code reviewaw_server/rest.py imports math and rejects non-finite pulsetime values with BadRequest before acquiring the heartbeat lock or calling ServerAPI.heartbeat. tests/test_input_validation.py adds eight parameterized cases covering non-finite values in empty and seeded buckets, checking rejection, unchanged stored events, and finite follow-up requests. Safe to merge — no P0/P1 findingsConfidence 5/5 ✅ No findings. The diff looks correct to me on this pass. Files changed (2) — the diff as I read it
Previous review passes
Reviewed Maintainer commands
|
Git-Session-Id: 18fece4b-f2e9-4ea7-93f5-5eee59badef2
d164a0d to
e2c9f47
Compare
|
Rebased onto master and pushed Verification after rebase: heartbeat/input-validation tests 23 passed; package-native offline suite 144 passed; mypy 31 source files clean; |
|
@greptileai review |
Git-Session-Id: 18fece4b-f2e9-4ea7-93f5-5eee59badef2
Summary
Reject non-finite
pulsetimeat the heartbeat REST boundary, before lock acquisition or heartbeat processing, using the existing JSON BadRequest pattern. No merge-algorithm or negative-pulse policy change.Reproduction
On fetched master
994ea988, seed a heartbeat and send another with identical data one second later.pulsetime=inf,-inf,nanor1e999passes float parsing and returns 500 during timedelta conversion. In an empty bucket the same non-finite values return 200, so validation was path-dependent.The eight new seeded/empty Flask regressions all failed before the three-line source repair. They now require JSON 400, unchanged stored events and a successful finite follow-up; seeded controls also verify normal same-data merging.
Verification
poetry run pytest tests/test_input_validation.py -q: 22 passed.poetry run pytest tests/test_api_heartbeat.py tests/test_input_validation.py -q: 23 passed.poetry run make test: 144 passed. This target does not enumeratetest_input_validation.py, so it was explicitly run separately; no live-client integration tests were run.poetry run make typecheck: 31 source files clean.git diff --checkclean.Synthetic Flask test client and default MemoryStorage only, no live server or personal data. Existing malformed-string handling remains covered; numeric event timestamps and CSV recovery are outside this change. Independent of #206's query-timeperiod validation. Merge and master symptom replay remain the tracked completion gate.