Skip to content

feat: pass workflow context as attachments#444

Open
captainsafia wants to merge 4 commits intomainfrom
safia/many-tweaks
Open

feat: pass workflow context as attachments#444
captainsafia wants to merge 4 commits intomainfrom
safia/many-tweaks

Conversation

@captainsafia
Copy link
Copy Markdown
Collaborator

Summary

  • Cleaned up the outer-loop skills around explicit Inputs, Process, and Outputs sections.
  • Removed cloud-mode-specific and artifact-CLI-specific verbiage from skills so they stay execution-form agnostic.
  • Added Oz SDK attachment helpers and propagated attachments through workflow dispatch, webhook runtime wiring, and the Oz client.
  • Converted large/untrusted workflow context from inline prompt content to run attachments.
  • Removed low-value tests that asserted on literal prompt prose while preserving behavior and dispatch coverage.

Input mapping changes

PR review agent

  • pr_description_text is now provided as pr_description.md.
  • pr_diff_text is now provided as pr_diff.txt.
  • spec_context_text is now provided as spec_context.md.

Issue triage agent

  • issue_body is now provided as issue_body.md.
  • original_report is now provided as original_issue_report.md.
  • comments_text is now provided as issue_comments.md.
  • triggering_comment_text is now provided as triggering_comment.md.
  • triage_config is now provided as triage_config.json.
  • template_context is now provided as issue_template_context.json.

Respond-to-PR-comment agent

  • spec_context_text is now provided as spec_context.md.
  • PR body, conversation comments, review comments, the triggering comment, and PR diff remain fetched on demand through fetch_github_context.py, matching the existing model for that workflow.

Verify-PR agent

  • verification_skills_text is now provided as verification_skills.md.

Create-spec agent

  • issue_body is now provided as issue_body.md.
  • comments_text is now provided as issue_comments.md.
  • triggering_comment_text is now provided as triggering_comment.md.

Create-implementation and plan-approved agents

  • spec_context_text is now provided as spec_context.md.
  • Issue body, prior comments, and triggering comments remain fetched on demand through 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.py
  • python3 -m pytest tests
  • git diff --check

Notes

Co-Authored-By: Oz oz-agent@warp.dev

captainsafia and others added 3 commits May 7, 2026 17:51
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>
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 8, 2026

@captainsafia

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, or pr-metadata.json outputs 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

Comment thread core/workflows/review_pr.py Outdated
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>
@captainsafia
Copy link
Copy Markdown
Collaborator Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 8, 2026

@captainsafia

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] The Oz SDK documents a maximum of five attachments per run, but 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant