-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Labels
Description
Objective
Fix the missing GH_AW_WORKFLOW_ID environment variable in the safe_outputs job context, which is causing all create_pull_request operations to fail.
Context
The create_pull_request safe output job requires GH_AW_WORKFLOW_ID to generate unique branch names in the format ${workflowId}-${randomHex}. Currently, this variable is set in the agent job but not propagated to the safe_outputs job, resulting in 100% failure rate (2/2 attempts failed).
Error: Error: GH_AW_WORKFLOW_ID environment variable is required
Approach
- Locate the workflow compilation code that generates the
safe_outputsjob definition - Identify where environment variables are passed to the
safe_outputsjob - Add
GH_AW_WORKFLOW_IDto the environment variables propagated to this job - Ensure the variable is available in the agent job context (verify it exists)
- Test with the
security-fix-prworkflow or create a minimal test workflow
Files to Modify
- Workflow compiler code (likely in
pkg/workflow/directory) - Look for code that generates GitHub Actions YAML for safe_outputs job
- May need to update environment variable mapping/propagation logic
Acceptance Criteria
-
GH_AW_WORKFLOW_IDis available insafe_outputsjob environment -
create_pull_requestoperations succeed in test workflows - No regressions in other safe output job types
- Manual test of
security-fix-prworkflow succeeds
Testing
# After fix, test with:
./gh-aw compile .github/workflows/security-fix-pr.md
# Verify GH_AW_WORKFLOW_ID is in safe_outputs job env sectionPriority
High - Blocking all PR creation via safe outputs
Related to #7023
AI generated by Plan Command for discussion #7018
Reactions are currently unavailable