Skip to content

[Follow-up] Remove the 'workflow_run' trigger from agents-80-p (PR #999) #1006

Description

@github-actions
## Why
PR #999 addressed issue #998 but verification identified concerns (verdict: **CONCERNS**). This follow-up addresses the remaining gaps with improved task structure.

## Source
- Original PR: #999
- Parent issue: #998

## Tasks
- [ ] Remove the 'workflow_run' trigger from agents-80-pr-event-hub.yml to prevent overlap with the agents-81 workflow.
- [ ] Refactor agents-80-pr-event-hub.yml to pass pr_context outputs to downstream workflows via job inputs or environment variables.
- [ ] Fix stray indentation and remove or properly document the 'test-job' in agents-81-gate-followups.yml.
- [ ] Add explicit deprecation notice headers and warning outputs in all legacy workflow files.
- [ ] Implement tests to verify that consolidated workflows do not double-trigger events, correctly pass pr_context, and that legacy workflows are skipped when consolidated ones are enabled.

## Acceptance Criteria
- [ ] The 'workflow_run' trigger is removed from the 'agents-80-pr-event-hub.yml' file.
- [ ] The 'agents-80-pr-event-hub.yml' file passes 'pr_context' outputs to downstream workflows via job inputs or environment variables.
- [ ] The 'test-job' in 'agents-81-gate-followups.yml' is either removed or properly documented, and there are no stray indentation issues.
- [ ] All legacy workflow files contain an explicit deprecation notice header and warning outputs.
- [ ] Tests verify that consolidated workflows do not double-trigger events, correctly pass 'pr_context', and legacy workflows are skipped when consolidated ones are enabled.

## Implementation Notes
- Ensure the removal of the 'workflow_run' trigger is thoroughly checked to prevent any unintended workflow overlaps.
- When refactoring for pr_context, consider using environment variables for easier management and propagation.
- Use a YAML linter to ensure no indentation issues remain in the workflow files.
- Clearly document any deprecation notices to avoid confusion among maintainers.
- Design tests to cover all specified conditions and ensure they are robust against future changes.

<details>
<summary>Background (previous attempt context)</summary>

- Mixing 'pull_request_target' with write permissions and using elevated tokens while processing PR/issue comment content increases security risk if the logic is later expanded or misused. Consider using 'pull_request' events or further restricting token permissions and reducing access scope within the workflows.
- Including a stray debug/test job (test-job) with indentation issues in the production workflow file introduces maintainability issues and risks YAML formatting errors. Remove any debugging code from production workflows and rely on dedicated test files or branches for debugging.

</details>

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:codexAgent-created issues from Codexagents:optimizeRequest AI-powered issue analysis and optimization suggestionsfollow-up

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions