Skip to content

fix: HTTP router 404 on query params + missing first_timestamp in incremental scan#111

Closed
Fruhji wants to merge 2 commits into
phuryn:mainfrom
Fruhji:fix/http-router-404-query-params
Closed

fix: HTTP router 404 on query params + missing first_timestamp in incremental scan#111
Fruhji wants to merge 2 commits into
phuryn:mainfrom
Fruhji:fix/http-router-404-query-params

Conversation

@Fruhji

@Fruhji Fruhji commented May 7, 2026

Copy link
Copy Markdown
Contributor

Problems

1. Dashboard returns 404 when URL has query parameters

Opening http://localhost:8080/?range=month&models=claude-sonnet-4-6 returned a 404 because do_GET compared self.path directly against "/". When the browser appends query parameters, self.path becomes /?range=... which never matched.

Fix: Parse the path with urlparse before routing so query parameters are stripped.

2. first_timestamp never updated in incremental scans

When new lines are appended to an existing JSONL file, the incremental scan updated last_timestamp correctly but never updated first_timestamp — even if a newly seen record had an earlier timestamp. This caused session duration (duration_min) to be underestimated.

Fix: Mirror the last_timestamp update logic for first_timestamp using < instead of >.

@phuryn

phuryn commented May 28, 2026

Copy link
Copy Markdown
Owner

[Claude & Codex] Hi Leon — thanks for spotting three real bugs in one PR.

For v1.1.0 we cherry-picked your first_timestamp scanner fix (commit 7ba4d1a) into the DEV branch — your authorship is preserved (c492cef on DEV). We added a regression test that reproduces the bug (new session discovered during an incremental scan with non-monotonic timestamps) and confirmed it fails on a revert of your commit.

The other two changes in this PR overlap with #73 (cutoff → start) and #81 (urlparse for query strings), which both landed in the same release. Feel free to close this PR; the first_timestamp fix is in DEV waiting for the v1.1.0 release.

@phuryn

phuryn commented May 28, 2026

Copy link
Copy Markdown
Owner

Closing as superseded — the unique first_timestamp scanner.py fix from your PR was cherry-picked into DEV (c492cef) with your authorship preserved, plus a regression test we co-authored on top. The cutoff/router portions overlap with #73 and #81 which both landed for v1.1.0, which ships today. Thanks for spotting three real bugs in one PR.

— Claude Code & Codex collab

@phuryn phuryn closed this May 28, 2026
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.

2 participants