Repository navigation
fix: clearer path error, no-change note, relative path in the worker check #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d0e791a
1a79694
90573b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3773,7 +3773,17 @@ fn run_hosted_task_worker( | |
| Ok(Some(publication)) => { | ||
| result = augment_hosted_result_with_publication(result, &publication); | ||
| } | ||
| Ok(None) => {} | ||
| // A repository task that changed no files publishes nothing. Say so in the result, | ||
| // so a finished task without a branch is not mistaken for a publication failure. | ||
| Ok(None) => { | ||
| if payload.base_commit.is_some() { | ||
| let note = "No file changes were made, so no branch was published."; | ||
| result = Some(match result { | ||
| Some(value) if !value.trim().is_empty() => format!("{value}\n\n{note}"), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the no-changes note visible in the text report. If the model result is long, appending the note hides it:
|
||
| _ => note.to_string(), | ||
| }); | ||
| } | ||
| } | ||
| // The run itself succeeded. The publication failure is recorded in the result. | ||
| Err(error) => { | ||
| let note = format!("Publication failed: {error}"); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,9 +33,12 @@ fn validate_workspace_boundary(resolved: &Path, workspace_root: &Path) -> io::Re | |
| return Err(io::Error::new( | ||
| io::ErrorKind::PermissionDenied, | ||
| format!( | ||
| "path {} escapes workspace boundary {}", | ||
| "path {} escapes workspace boundary {}; use a path relative to the workspace, such as {}", | ||
| resolved.display(), | ||
| workspace_root.display() | ||
| workspace_root.display(), | ||
| resolved | ||
| .file_name() | ||
| .map_or_else(|| "a relative file name".to_string(), |name| name.to_string_lossy().into_owned()), | ||
|
Comment on lines
+39
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ), | ||
| )); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe the empty patch accurately.
worker_patchexcludes.frontal-codeand ignores untracked files matched by Git ignore rules. If the worker changes only those files, this note incorrectly says no file changes were made. Say that no publishable changes were found relative to the base commit.