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
| json.dumps(dict(context.get("triage_config") or {}), indent=2), | ||
| mime_type="application/json", | ||
| ), | ||
| text_context_attachment( |
There was a problem hiding this comment.
triage_context_attachments returns six entries. Triage dispatches can be rejected before the agent starts; combine two of these payloads into one attachment or keep one small trusted field inline so the run stays within the API limit.
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