From afc7e223f4be0ebae3ea9a7ebc5be253faf28726 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Apr 2026 14:31:40 +0000 Subject: [PATCH 1/2] Initial plan From 2a13730efe80e0f7fe6d5ed8f1a8a37a850bafca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Apr 2026 14:44:16 +0000 Subject: [PATCH 2/2] fix: spec-enforcer - add explicit noop branch when all tests are up-to-date Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4b50bcc5-f790-4987-9a97-9858045ccc9d Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/spec-enforcer.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/spec-enforcer.md b/.github/workflows/spec-enforcer.md index 6583d7c6270..d77d72b3e81 100644 --- a/.github/workflows/spec-enforcer.md +++ b/.github/workflows/spec-enforcer.md @@ -214,9 +214,9 @@ find pkg/ -name 'spec_test.go' -type f cat pkg//spec_test.go 2>/dev/null || echo "No spec tests exist" ``` -## Phase 3: Generate Specification Tests +## Phase 3: Create or Update Specification Tests -Write tests in `pkg//spec_test.go` that validate the specification. +Create or update `pkg//spec_test.go` to validate the specification. If the file already exists, review it against the current README.md and update any tests that are outdated, missing, or incorrect. Use `edit` to write the complete updated file contents (this overwrites the existing file). ### Test File Structure @@ -340,9 +340,11 @@ cat > /tmp/gh-aw/cache-memory/spec-enforcer/enforcements/.json <, ` @@ -375,6 +377,14 @@ All tests are derived from README.md specifications, not from implementation sou *Auto-generated by Package Specification Enforcer workflow* ``` +**Option B — If no spec test files were changed** (all selected packages already have up-to-date tests that fully reflect their README.md specifications), call `noop` instead of creating a PR: + +```json +{"noop": {"message": "No changes needed: reviewed , , . All spec_test.go files are up-to-date with current README.md specifications."}} +``` + +> **Important**: Every run MUST end by either creating a PR (Option A) or calling `noop` (Option B). Completing the analysis without doing either is an error. + ## Important Guidelines 1. **Specification-first**: Tests MUST come from the README.md, not source code @@ -389,11 +399,11 @@ All tests are derived from README.md specifications, not from implementation sou ## Success Criteria - ✅ 2-3 packages with specifications processed per run -- ✅ `spec_test.go` created or updated for each package +- ✅ `spec_test.go` created or updated for each package that needs changes - ✅ All tests derived from README.md content - ✅ Tests compile and pass (or mismatches documented) - ✅ Cache memory updated with enforcement state - ✅ Round-robin rotation advances correctly -- ✅ PR created with test changes +- ✅ PR created with test changes **OR** `noop` called when all tests are already up-to-date {{#import shared/noop-reminder.md}}