feat(ops): add recurring workflow audit and runbook - #486
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a reproducible, read-only inventory tool and canonical runbook to standardize how the org audits and classifies recurring/scheduled automation, with policy-manifest routing and tests to keep the guidance discoverable and enforced.
Changes:
- Added
scripts/audit-scheduled-workflows.rbRuby CLI to inventory scheduled workflows via read-only GitHub API calls, with JSON/Markdown output and private-redaction safety boundaries. - Added a canonical
runbooks/recurring-operations.mdrunbook defining the classification model (retain/event-driven/reusable/manual/remove) and draft-only review rules. - Added fixtures/tests and wired the runbook into the public instruction manifest (plus README documentation) so supported runtimes can route to it.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/audit-scheduled-workflows.rb | New read-only CLI that inventories scheduled workflows and renders JSON/Markdown outputs. |
| scripts/test-audit-scheduled-workflows.rb | New Ruby test harness covering parsing, pagination, disabled workflows, redaction, and error handling. |
| scripts/test_validate_agent_policy.py | Adds a manifest-routing assertion for the new recurring-operations runbook surface. |
| scripts/fixtures/scheduled-workflows/active-utc.yml | Fixture for a UTC scheduled workflow with permissions/concurrency and reusable call. |
| scripts/fixtures/scheduled-workflows/active-iana-timezone.yml | Fixture for explicit IANA timezone handling. |
| scripts/fixtures/scheduled-workflows/comment-only-workflow.yml | Fixture for comment-only workflow content (no active triggers). |
| scripts/fixtures/scheduled-workflows/directory-api-error.yml | Fixture simulating malformed directory API response object. |
| scripts/fixtures/scheduled-workflows/disabled-inactivity.yml | Fixture for disabled_inactivity workflow state. |
| scripts/fixtures/scheduled-workflows/job-level-controls.yml | Fixture for job-level permissions/concurrency detection. |
| scripts/fixtures/scheduled-workflows/missing-workflow-directory.yml | Fixture for missing workflows directory (404). |
| scripts/fixtures/scheduled-workflows/multiple-cron.yml | Fixture for multiple cron schedules. |
| scripts/fixtures/scheduled-workflows/private-no-schedule.yml | Fixture for private repo with only workflow_dispatch (no schedule). |
| scripts/fixtures/scheduled-workflows/private-redaction.yml | Fixture for private repo schedule used to validate redaction / private-output rules. |
| scripts/fixtures/scheduled-workflows/rate-limit-error.yml | Fixture for API rate-limit error behavior. |
| scripts/fixtures/scheduled-workflows/reusable-workflow-caller.yml | Fixture for detecting uses: reusable workflow calls. |
| scripts/fixtures/scheduled-workflows/top-level-controls.yml | Fixture for top-level permissions/concurrency detection. |
| runbooks/recurring-operations.md | New canonical runbook for classifying and reviewing recurring operations and scheduled workflows. |
| .github/README.md | Documents how to run the scheduled workflow inventory and links to the runbook. |
| .github/instruction-surfaces.json | Adds a required instruction surface routing recurring-operations guidance to supported consumers. |
ss-o
marked this pull request as ready for review
July 27, 2026 22:24
ss-o
enabled auto-merge (squash)
July 27, 2026 22:25
ss-o
disabled auto-merge
July 27, 2026 22:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
retain,event-driven,reusable,manual, andremoveclassificationsWhy
The organization currently has repeated scheduled maintenance with inconsistent ownership, permissions, timing, failure handling, and retirement criteria. Issue #485 needs a reproducible evidence source and one canonical operating procedure before repository changes or agent schedules are introduced.
Impact
Maintainers and supported agents can generate the same inventory, distinguish time-driven work from event-driven work, and prepare reviewable recommendations. This PR does not create scheduled tasks, modify repository settings, dispatch workflows, or mutate other repositories.
Instruction impact review
runbooks/recurring-operations.mdowns recurring-operation decisions; the audit script owns reproducible inventory collection. Existing specialist runbooks retain their domains..github/instruction-surfaces.jsonadds exactly one recurring-operations route and the README exposes both the runbook and audit command.Safety boundaries
Validation
ruby scripts/test-audit-scheduled-workflows.rb: 26 tests passedpython3 -m unittest scripts/test_validate_agent_policy.py -v: 69 tests passedpython3 scripts/validate-agent-policy.py: passedruby -c scripts/audit-scheduled-workflows.rb: syntax OKruby -c scripts/test-audit-scheduled-workflows.rb: syntax OKpython3 -m json.tool .github/instruction-surfaces.json: passedgit diff --check origin/main...HEAD: passedRelates to #485 and #412.
Agent handoff
Status: Ready for review
Repository: z-shell/.github
Branch/PR:
codex/recurring-operations-auditTracker/Issue: #485
Current state
Verification
Blockers
Next steps