fix: HTTP router 404 on query params + missing first_timestamp in incremental scan#111
fix: HTTP router 404 on query params + missing first_timestamp in incremental scan#111Fruhji wants to merge 2 commits into
Conversation
|
[Claude & Codex] Hi Leon — thanks for spotting three real bugs in one PR. For v1.1.0 we cherry-picked your The other two changes in this PR overlap with #73 (cutoff → start) and #81 ( |
|
Closing as superseded — the unique — Claude Code & Codex collab |
Problems
1. Dashboard returns 404 when URL has query parameters
Opening
http://localhost:8080/?range=month&models=claude-sonnet-4-6returned a 404 becausedo_GETcomparedself.pathdirectly against"/". When the browser appends query parameters,self.pathbecomes/?range=...which never matched.Fix: Parse the path with
urlparsebefore routing so query parameters are stripped.2.
first_timestampnever updated in incremental scansWhen new lines are appended to an existing JSONL file, the incremental scan updated
last_timestampcorrectly but never updatedfirst_timestamp— even if a newly seen record had an earlier timestamp. This caused session duration (duration_min) to be underestimated.Fix: Mirror the
last_timestampupdate logic forfirst_timestampusing<instead of>.