Skip to content

fix(spec-enforcer): add enforce_all input to process all packages in one run#29765

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-enforce-all-input
May 2, 2026
Merged

fix(spec-enforcer): add enforce_all input to process all packages in one run#29765
pelikhan merged 2 commits intomainfrom
copilot/fix-enforce-all-input

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 2, 2026

The spec-enforcer workflow processes only 2-3 packages per run via round-robin, requiring ~8 daily runs for a full cycle — with no escape hatch when cache loss forces a restart from index 0.

Changes

  • New enforce_all boolean input (workflow_dispatch only, default: false) — when true, selects all packages with a README.md in alphabetical order and bypasses rotation state entirely
  • Phase 1 selection logic now branches on mode:
    • enforce_all=true → full-sweep: all eligible packages, alphabetical, rotation ignored
    • default → round-robin: existing 2-3 package priority logic unchanged
  • PR body includes a Run mode field: full-sweep (enforce_all) or round-robin for audit traceability

Usage

gh workflow run spec-enforcer --field enforce_all=true

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 94bd537a09dfb501-d GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix spec-enforcer to add enforce_all input for package processing fix(spec-enforcer): add enforce_all input to process all packages in one run May 2, 2026
Copilot AI requested a review from pelikhan May 2, 2026 12:24
@pelikhan pelikhan marked this pull request as ready for review May 2, 2026 15:02
Copilot AI review requested due to automatic review settings May 2, 2026 15:02
@pelikhan pelikhan merged commit 936a378 into main May 2, 2026
19 checks passed
@pelikhan pelikhan deleted the copilot/fix-enforce-all-input branch May 2, 2026 15:02
@github-actions github-actions Bot mentioned this pull request May 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an enforce_all manual-dispatch input to the spec-enforcer agentic workflow to allow processing all eligible packages in a single run (bypassing the normal 2–3 package round-robin batch), and records the chosen run mode in the PR body for traceability.

Changes:

  • Introduces workflow_dispatch input enforce_all (default false) to enable full-sweep runs.
  • Updates Phase 1 package selection instructions to branch between full-sweep and round-robin modes.
  • Extends the PR body template to include a “Run mode” field for auditing.
Show a summary per file
File Description
.github/workflows/spec-enforcer.md Documents the new enforce_all input, selection-mode branching, and PR body run-mode reporting.
.github/workflows/spec-enforcer.lock.yml Wires the new input through the generated locked workflow and exports related context/env for prompt rendering.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

.github/workflows/spec-enforcer.md:391

  • The PR body template section is still titled “Round-Robin State” and always includes “Next packages in rotation”. In enforce_all=true full-sweep runs this is misleading; consider renaming this section (e.g., “Run State”) and conditionally omitting or marking rotation fields as N/A when rotation is bypassed, so the audit trail matches the selected mode.
### Round-Robin State

- **Run mode**: ${{ github.event.inputs.enforce_all == 'true' && 'full-sweep (enforce_all)' || 'round-robin' }}
- **Packages processed this run**: <list>
- **Next packages in rotation**: <list>
  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment on lines +170 to +173
Determine the run mode first:

- **Full-sweep mode** (`enforce_all=true`): Process **all eligible packages** in a single run, in alphabetical order. Rotation state tracking is bypassed — every package with a README.md is selected.
- **Round-robin mode** (default, `enforce_all=false` or scheduled): Select **2-3 packages** using the normal priority selection logic.
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.

[q] fix(spec-enforcer): add enforce_all input to process all packages in one run

3 participants