feat: pass workflow context as attachments#444
Conversation
Restructure outer-loop skills around inputs, process, and outputs, and remove cloud-mode-specific implementation verbiage so the skills stay execution-form agnostic. Co-Authored-By: Oz <oz-agent@warp.dev>
Add shared attachment helpers, propagate attachments through workflow dispatch and Oz SDK calls, and convert workflow prompts to reference attached context files instead of inlining large GitHub-backed inputs. Co-Authored-By: Oz <oz-agent@warp.dev>
Drop low-value tests that asserted on literal generated prompt prose while preserving behavior, routing, dispatch, and result-application coverage. Co-Authored-By: Oz <oz-agent@warp.dev>
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR moves large workflow context into Oz run attachments and threads attachments through dispatch, webhook runtime, workflow prompts, and SDK client helpers.
Concerns
- The result-file handoff was changed from explicit run artifact uploads to leaving files in the repository root, but the existing poll/apply code still loads named FILE artifacts from the run. This will prevent completed workflows from applying their
review.json,triage_result.json,verification_report.json, orpr-metadata.jsonoutputs unless artifact collection is updated or the upload instructions are restored.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
The poller consumes file outputs via load_artifact() / load_review_artifact(), which only polls FILE artifacts attached to the run. Leaving files at the repository root means successful runs will not be applied. Restores the 'oz artifact upload' (with 'oz-preview artifact upload' fallback) instructions in all 7 locations across 5 workflow files: - review_pr.py: review.json - verify_pr_comment.py: verification_report.json + media artifacts - create_spec_from_issue.py: pr-metadata.json - respond_to_pr_comment.py: pr-metadata.json + resolved_review_comments.json - triage_new_issues.py: triage_result.json - create_implementation_from_issue.py: pr-metadata.json Co-Authored-By: Oz <oz-agent@warp.dev>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR moves large workflow context from inline prompts into Oz run attachments and threads attachment payloads through dispatch, webhook wiring, workflow adapters, and the SDK client.
Concerns
- Triage dispatch now creates six attachments, but the Oz SDK/API attachment schema documents a maximum of five per run, so triage runs can be rejected before an agent starts.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR moves large workflow context into Oz run attachments and updates dispatch/runtime plumbing to pass those attachments through.
Concerns
- Several updated skills still tell agents to read the pre-migration context filenames (
pr_description.txtorissue_comments.txt) while the dispatch prompts now attachpr_description.mdandissue_comments.md. That mismatch can make agents skip PR descriptions or issue comment context in the affected workflows.
Verdict
Found: 0 critical, 4 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Co-Authored-By: Oz <oz-agent@warp.dev>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR moves large workflow context into Oz run attachments and threads attachment payloads through dispatch, webhook, workflow prompts, and the Oz client.
Security
- New workflow context attachments can contain issue bodies, comments, and generated repository context, but most of the new scratch attachment filenames are not ignored, which makes accidental commits of untrusted or sensitive workflow context more likely.
Concerns
- The review state payload still retains raw
pr_bodyeven though the PR description is now attachment-backed. - The verification skill tells agents to leave supporting files in paths described by the report, but the report schema has no artifact/path field.
Verdict
Found: 0 critical, 1 important, 2 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Co-Authored-By: Oz <oz-agent@warp.dev>
|
/oz-review |
|
@vkodithala @peicodes I'm making this change to move us from embedding certain context directly in the prompt to using Oz's attachment functionality to resolve it. This should help make the prompts that we pass to the agent more concise and let the harness resolve additional information using attachments. |
| __all__ = [ | ||
| "DEFAULT_TEXT_ATTACHMENT_MIME_TYPE", | ||
| "SdkAttachment", | ||
| "text_attachment", | ||
| ] |
There was a problem hiding this comment.
OOC/for future reference: noticed that you're explicitly listing exports here, is this the pattern you're adopting for module files created in oz-for-oss, or is there a particular reason that you use __all__ here (since everything's exported)? Unimportant, but curious :)
There was a problem hiding this comment.
This has mostly helped me with bookkeeping with of the methods defined here are actually referenced as a public surface area by the workflows. It's not the biggest value add since everything is publicly exported in this module anyways. I find it helps me with readability and identifying the key highlights from agent-generated code but we can remove it if it becomes crufty.
vkodithala
left a comment
There was a problem hiding this comment.
Read through your plan and went through the important codepaths, LGTM! Thanks for the fix!
Co-Authored-By: Oz <oz-agent@warp.dev>
Summary
Input mapping changes
PR review agent
pr_description_textis now provided aspr_description.md.pr_diff_textis now provided aspr_diff.txt.spec_context_textis now provided asspec_context.md.Issue triage agent
issue_bodyis now provided asissue_body.md.original_reportis now provided asoriginal_issue_report.md.comments_textis now provided asissue_comments.md.triggering_comment_textis now provided astriggering_comment.md.triage_configis now provided astriage_config.json.template_contextis now provided asissue_template_context.json.Respond-to-PR-comment agent
spec_context_textis now provided asspec_context.md.fetch_github_context.py, matching the existing model for that workflow.Verify-PR agent
verification_skills_textis now provided asverification_skills.md.Create-spec agent
issue_bodyis now provided asissue_body.md.comments_textis now provided asissue_comments.md.triggering_comment_textis now provided astriggering_comment.md.Create-implementation and plan-approved agents
spec_context_textis now provided asspec_context.md.fetch_github_context.py, matching the existing implementation workflow model.Validation
python3 -m pytest tests/test_attachments.py tests/test_dispatch.py tests/test_oz_client.py tests/test_webhook_dispatch.py tests/test_workflow_adapters.py tests/test_builders.py tests/test_triage.py tests/test_review_pr_reviewer_sampling.pypython3 -m pytest testsgit diff --checkNotes
Co-Authored-By: Oz oz-agent@warp.dev