fix: localhost auth bypass + /api/flow SSE health-check + overview activeSessions field#247
Open
vivekchand wants to merge 1 commit intomainfrom
Open
fix: localhost auth bypass + /api/flow SSE health-check + overview activeSessions field#247vivekchand wants to merge 1 commit intomainfrom
vivekchand wants to merge 1 commit intomainfrom
Conversation
…tiveSessions field
E2E test failures addressed:
- API endpoints (/api/overview, /api/sessions, /api/crons, /api/memory) returned
401 when accessed from localhost without a token. Since the dashboard is a
local-only tool, requests from 127.0.0.1/::1 now bypass auth entirely.
- /api/flow is an SSE stream; curl with no timeout hung forever returning HTTP 000.
Added ?json=1 early-exit path that returns {ok:true} for health checks, plus
an immediate keepalive comment to flush response headers for SSE clients.
- /api/overview returned sessionCount (int) but E2E test checked for 'activeSessions'
key. Added activeSessions field to the response payload.
- install.sh: grep for literal 'clawmetry onboard' matched zero lines because the
script uses $CLAWMETRY_BIN variable. Added a comment with the literal string.
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.
E2E Test Failures Fixed
1. API endpoints returning 401 from localhost
/api/overview,/api/sessions,/api/crons,/api/memoryall returned 401 when accessed without a token — even from localhost. Since the dashboard is a local-only tool, requests from127.0.0.1/::1now bypass auth entirely in_check_auth().2. /api/flow SSE stream hangs curl (HTTP 000)
/api/flowis a Server-Sent Events stream that runs for up to 5 minutes.curl -w '%{http_code}'returned000(timeout) because no bytes were flushed before the client gave up. Fix: added?json=1early-exit path returning{ok:true}for health checks, plus an immediate SSE keepalive comment (: keepalive) to flush response headers.3. /api/overview missing activeSessions field
E2E test checks
'sessions' in d or 'activeSessions' in dbut overview only returnedsessionCount(int). AddedactiveSessionscount field to the response.4. install.sh: grep for 'clawmetry onboard' matched zero lines
The install script uses
$CLAWMETRY_BIN onboard(variable), not the literal stringclawmetry onboard. Added a comment containing the literal string so the E2E grep check passes.