Repository navigation
feat: say when a log shows only its first characters - #9631
Merged
Merged
Conversation
job.stderr / job.stdout (repr and notebook view) say when they show only the first N characters that the data owners released, and the whole length when the copy is shorter than asked for. Messages, display and docstrings only; no behaviour change. Asana: https://app.asana.com/0/0/1220519978965332/f Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JobInfo.log_is_truncated() is always False. EnclaveJobInfo returns True when the readers have a copy of the first N chars that is N chars long. When a log is truncated, the stdout and stderr viewers add LOG_TRUNCATION_MESSAGE at the end of the log in the repr and the notebook view.
koenvanderveen
marked this pull request as ready for review
November 19, 2026 14:39
This was referenced Nov 19, 2026
yermakoffivan
pushed a commit
to yermakoffivan/pysyft
that referenced
this pull request
Nov 19, 2026
PR OpenMined#9631 made the stdout and stderr viewers call job_info.log_is_truncated(). The fakes in test_job_stdout.py, added by PR OpenMined#9587, did not have it, so job-tests failed on dev.
yermakoffivan
pushed a commit
to yermakoffivan/pysyft
that referenced
this pull request
Nov 19, 2026
PR OpenMined#9631 had _log_note() return a note or None, where None meant 'add nothing'. Its PR description rated function structure green, because the guideline read as being about functions that do something. Add this case and an example to the guideline.
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
job.stderrandjob.stdoutpreviously showed the text as if it were the whole log. Now the repr and the notebook title add "(first N characters, released by the data owners)". When the copy is shorter than N, it is the whole log, and the note adds its length.str(job.stderr)is still only the log text.Guidelines
High level
Mid level
Low level
job_repr.pyandjob_stdout.pycall the private_log_note()from outside the class; make it public.Security
No change. The note is escaped before it goes into the HTML.
Testing
test_requested_stderr_head_reaches_submitterchecks the note in the repr and the HTML.test_log_head_longer_than_log_says_it_is_wholechecks the length in the note.test_log_request_defaults_to_data_ownerschecks that the whole log has no note.Asana task
Original description
When a reader has only the first N characters of a log,
job.stderr/job.stdoutnow say so in the repr and the notebook title:When the copy is shorter than N, it is the whole log, and the note adds its length.
str(job.stderr)is still the log text alone. Display only; no behaviour change.One of five small PRs from the 13 Nov enclave test; each merges cleanly with the others and with #9576.
Asana: https://app.asana.com/0/0/1220519978965332/f
🤖 Generated with Claude Code
No rush: after the release.