Repository navigation
Conversation
Co-authored-by: JannikSt <JannikSt@users.noreply.github.com>
JannikSt
requested review from
DamianB-BitFlipper,
JohannesHa,
akirillo,
burnpiro,
cabrinha,
eexwhyzee,
kcoopermiller,
kennethnym,
mrmoxon and
willccbb
as code owners
November 19, 2026 04:56
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-authored-by: JannikSt <JannikSt@users.noreply.github.com>
This branch has not been deployed
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
prime train logs <id>on a run that has ended used to print the raw 404:It now prints one clear error and exits 1:
What the API returns (platform
main)GET /rft/runs/{id}/logs→ 404Run <id> not found. This is checked before anything else.rft_service.get_logsonly searches the last 15 minutes of Loki. A run that ended earlier finds nothing there. If no log snapshot was saved at teardown either, it raisesValueError("No logs available for run"), which the route returns as 404No logs available for run.--all:--allsendssince_seconds=86400withtail_lines=5000, so the server treats it as a filtered query over the last 24 hours. It returns matching lines or an empty string, never this 404.The same 404 can also come back for a live run, for example when the environment has no Loki configured. So only the
No logs available for run404 is remapped, and only after aGET /rft/runs/{id}confirms the run is in a terminal state (STOPPED,FAILED,COMPLETEDorPAUSED). Every other case prints exactly what it did before:Run <id> not found; no extra status lookup is made)--allis setSample output
These were captured against a local stub server that returns the platform's responses.
Tests
New tests in
tests/test_rl_logs.py:-f): exactly oneError:line with the new message, no404, exit code 1.Run <id> not foundis kept and no status lookup is made.The ended-run tests fail without the source change.
Checks run:
ruff check,ruff format --check,ty check src/, and the fullpackages/primesuite (1971 passed).Note
Low Risk
CLI-only error messaging with guards to avoid remapping live-run or unknown-run failures; adds one extra API call only on a specific 404 path.
Reviewed by Cursor Bugbot for commit e7338ac. Bugbot is set up for automated code reviews on this repo. Configure here.