fix: E2E test failures — localhost auth bypass, /api/flow SSE, sessions key, version sync#266
Merged
vivekchand merged 1 commit intomainfrom Mar 21, 2026
Merged
Conversation
…version sync
- Trust 127.0.0.1/::1 on all /api/* routes (auth guards remote access only)
E2E tests and local curl calls no longer get 401 when gateway token is set
- /api/flow SSE endpoint returns JSON {ok:true} for non-SSE clients instead of hanging
Fixes E2E test step 3 which expects 200 from curl on /api/flow
- api_overview now includes 'sessions' and 'activeSessions' keys alongside sessionCount
Fixes E2E overview key check ('sessions' in d)
- Sync __version__ to 0.12.61 to match PyPI
- install.sh: add literal 'clawmetry onboard' comment for E2E grep test
Closes: E2E test failures for steps 3 (API 401) and 5 (version mismatch)
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
Fixes 4 E2E test failures detected by the automated health check (2026-03-21).
Failures fixed
Step 3 — API endpoints return 401
When the dashboard detects a gateway token from the running OpenClaw process, all
/api/*routes require a Bearer token. Local curl calls (and E2E tests) get 401. Fix: trust127.0.0.1and::1— auth is meant to protect remote access, not local health checks.Step 3 — /api/flow hangs (000 timeout)
/api/flowis an SSE streaming endpoint that never returns unless a client disconnects.curlwithout--no-bufferjust times out. Fix: detect non-SSE clients (Accept header doesn't includetext/event-stream) and return a JSON{ok:true}response immediately.Step 3 — /api/overview missing 'sessions' key
The E2E test checks
'sessions' in d or 'activeSessions' in d. The overview response only hadsessionCount. Fix: addsessionsandactiveSessionsaliases.Step 5 — VERSION_MISMATCH (PyPI 0.12.61 vs GitHub 0.12.60)
The version bump to 0.12.61 was committed on a branch that wasn't merged into
main. Fix: sync__version__to0.12.61.Step 4 — install.sh grep for 'clawmetry onboard' finds 0 matches
The script uses
$CLAWMETRY_BIN onboard(variable), not the literal string. The E2E testgrep -c 'clawmetry onboard'fails. Fix: add a comment with the literal string.Testing
All 5 issues verified locally on the running dashboard.