Skip to content

fix: harden workflow_run coordinator wakes#26

Merged
mberman84 merged 1 commit into
Forward-Future:mainfrom
coygeek:droid/issue-20-workflow-run-hardening
Jun 22, 2026
Merged

fix: harden workflow_run coordinator wakes#26
mberman84 merged 1 commit into
Forward-Future:mainfrom
coygeek:droid/issue-20-workflow-run-hardening

Conversation

@coygeek

@coygeek coygeek commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • restrict example workflow_run wakeups to same-repository non-PR CI on the default branch
  • add an explicit completed-conclusion allowlist while preserving failure wakeups for pipeline pause handling
  • document how to adapt the branch guard for protected release branches
  • update example workflow validation assertions

Closes #20

Verification

  • PATH="$PWD/.venv/bin:$PATH" python3 -m pytest -q
  • ./.venv/bin/ruff check src tests
  • ./.venv/bin/python -m unittest discover -s tests -v
  • ./.venv/bin/python -m build
  • autoreview --mode local --engine droid: clean; default Codex autoreview hit account usage limit after retries

@mberman84 mberman84 left a comment

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.

Requesting one portability fix. The README tells users to install this example on the repository's default branch, but the new static trigger silently disables workflow_run wakeups when that branch is named master, trunk, or anything other than main. Keep the same-repository/non-PR/default-branch job guard, but remove the static filter or substitute the actual branch during installation and document that step. GitHub CI is still action_required; re-request review after updating the head.

Comment thread examples/github-workflow.yml Outdated
# DeployBot follows. If CI intentionally hands off from a protected release
# branch, replace both this filter and the workflow_run head_branch guard
# below with that exact protected branch name or allowlist.
branches: [main]

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.

Hard-coding main makes the reusable example stop receiving workflow_run events for repositories with a differently named default branch, even though the job guard below is correctly dynamic. Remove this static filter and rely on the guard, or make installation substitute the repository's actual default branch and document/test that substitution.

@coygeek
coygeek force-pushed the droid/issue-20-workflow-run-hardening branch from 93e6abf to 70f87f2 Compare June 21, 2026 16:28
@coygeek

coygeek commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the review feedback in the updated head. Removed the hard-coded workflow_run.branches: [main] filter and kept the portable job-level guard against github.event.repository.default_branch, with the protected-release-branch adaptation note next to that dynamic guard.

Verification: PYTHONPATH=src uv run --with pytest --with ruff python -m pytest tests/test_skill.py -q and uv run --with ruff ruff check src tests both pass.

Restrict privileged workflow_run wakeups to recognized completed conclusions from the same repository and default branch while documenting release-branch adaptation.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@mberman84
mberman84 force-pushed the droid/issue-20-workflow-run-hardening branch from 70f87f2 to 625d217 Compare June 22, 2026 14:29

@mberman84 mberman84 left a comment

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.

Re-reviewed and repaired on latest main. Moved YAML guidance outside the folded expression, excluded both pull_request and pull_request_target wakeups, and added regression assertions. Full suite: 227 passed, 3 skipped, 202 subtests; Ruff clean; final structured autoreview clean.

@mberman84
mberman84 merged commit b09d776 into Forward-Future:main Jun 22, 2026
3 checks passed
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.

[hardening] Limit privileged workflow_run wakes by conclusion and branch

2 participants