Server log_url parity + graceful report-file handling in add-log-file - #323
Merged
Merged
Conversation
- Add output_log_url (AddOutput/JSON) and log_url (add-output-file form
field) so the server API can store an externally-hosted log link,
mirroring the CLI's --logurl, including the {run_alias} multi-output
guard. Closes #315.
- /add-log-file now detects filenames containing "report" and skips DB
output-matching entirely (reports aren't tracked in the DB); it warns
instead of erroring when no matching log file is found yet, but still
saves the file and returns success either way. Closes #308.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
AddOutput(JSON/add-outputs) gainsoutput_log_url, and multipart/add-output-filegains alog_urlform field. Both reuse the existing CLI--logurlmechanism (RobotDashboard.log_url,{run_alias}substitution) and mirror the CLI's guard against a missing{run_alias}placeholder when a single request may add more than one run (e.g.output_folder_path)./add-log-filenow recognizes areportsubstring in the uploaded filename and skips DB output-matching entirely for it (reports were never going to match a stored output/log path anyway). It checks whether a same-namedlogfile already exists inrobot_logs/; if so the response confirms it, if not it's just aWARNINGin the console — the endpoint still returnssuccess: "1"and saves the file either way, instead of the previous misleadingsuccess: "0"DB-matching error.Test plan
bash scripts/python-tests.sh— 320/320 passing,server.pyat 100% coverage (8 new tests added intests/python/test_server.pycoveringoutput_log_url, the{run_alias}guard, thelog_urlform field, and the report warn/success paths)output_log_urlwith{run_alias}lands correctly in theruns.pathcolumn, confirmed/add-log-fileon areport*.htmlwarns when uploaded before its log and succeeds cleanly when uploaded after.github/skills/server-api.md,docs/dashboard-server.md,docs/log-linking.md, and all threeexample/server/interact.*scripts🤖 Generated with Claude Code