Add local-node log viewer to the dashboard - #2237
Open
alytaphoenix wants to merge 1 commit into
Open
Conversation
Adds GET /v1/logs, /v1/logs/{name}, /v1/logs/{name}/raw for the main
process log and the runner stdout/stderr logs, modeled on the existing
traces endpoints. name is restricted to a fixed whitelist so there is
no path traversal surface. Adds a Logs page (list + tail view +
download) reachable from the header nav.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011rjSfwDBTkmySmfU6NgHKF
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
GET /v1/logs(list),GET /v1/logs/{name}(tail, JSON),GET /v1/logs/{name}/raw(full file download), modeled on the existing traces endpoints.nameis restricted to a fixed whitelist (main/runner_stdout/runner_stderr) mapped to known paths — never joined with client input, so there's no path traversal surface._tail_file), so large/unbounded logs don't get loaded in full.Test plan
uv run basedpyright— 0 new errors (baseline unchanged at 319 pre-existing errors from unrelated mlx import resolution issues in this sandbox)uv run ruff check/ruff format— cleanuv run pytest src/exo/api/tests/test_logs_api.py— 10/10 passing, including a regression test for alines<=0tail-length edge case caught during reviewuv run pytest src/exo(excluding suites that require themlxpackage, unavailable in this sandbox and failing identically onmain) — 331 passed, 3 skippednpx svelte-check— no new errors (baseline 15 errors / 6 warnings unchanged)exoinstancenix fmt/nix flake checkwere not run (nix isn't available in this sandbox) — substitutedruff format+prettier-plugin-sveltedirectly, which should match, but this hasn't been confirmed against the real treefmt config🤖 Generated with Claude Code
https://claude.ai/code/session_011rjSfwDBTkmySmfU6NgHKF