Skip to content

Comments

Fix jsweep workflow test failures and add snapshot schema support#8501

Merged
pelikhan merged 3 commits intomainfrom
copilot/fix-jsweep-workflow-tests
Jan 1, 2026
Merged

Fix jsweep workflow test failures and add snapshot schema support#8501
pelikhan merged 3 commits intomainfrom
copilot/fix-jsweep-workflow-tests

Conversation

Copy link
Contributor

Copilot AI commented Jan 1, 2026

The TestJSweepWorkflowConfiguration test was failing due to missing validation phrases in the jsweep workflow. Additionally, the GitHub Actions workflow schema lacked support for the snapshot keyword.

Changes

jsweep.md workflow validation phrases

  • Added "verify no type errors" and "type safety" to TypeScript validation step
  • Added "ensure consistent formatting" to Prettier formatting step
  • Added "verify all tests pass" to test verification step

GitHub Actions schema snapshot support

  • Added snapshot definition to github-workflow.json supporting both string and object syntax:
    {
      "snapshot": "image-name"
    }
    // or
    {
      "snapshot": {
        "image-name": "custom-image",
        "version": "1.0.0"
      }
    }
  • Schema files are embedded via //go:embed, requiring binary rebuild

Workflow recompilation

  • Rebuilt binary to embed updated schema
  • Recompiled jsweep.lock.yml with updated validation phrases
Original prompt

This section details on the original issue you should resolve

<issue_title>[ca] Fix jsweep workflow test failures and add snapshot schema support</issue_title>
<issue_description>## Summary

This PR fixes CI test failures in the pkg/workflow package by addressing missing validation phrases in the jsweep workflow and adding GitHub Actions snapshot feature support to the workflow schema.

Changes Made

1. Fixed jsweep.md Workflow Test Requirements

The TestJSweepWorkflowConfiguration test was failing because the jsweep workflow was missing specific validation phrases. Added the following required text:

  • TypeScript validation: Added "verify no type errors" and "type safety" to emphasize the importance of type checking
  • Prettier formatting: Added "ensure consistent formatting" to reinforce formatting standards
  • Test verification: Added "verify all tests pass" to clarify test requirements

These changes improve the workflow instructions by making validation requirements more explicit for contributors.

2. Added GitHub Actions Snapshot Support

Updated pkg/workflow/schemas/github-workflow.json to add support for the snapshot keyword in job definitions. This enables custom image generation for GitHub Actions workflows:

  • Added snapshot definition with support for both string and mapping syntax
  • Supports image-name and optional version properties
  • Includes proper JSON schema validation for version patterns

Since schema files are embedded using //go:embed directives, rebuilt the binary to include the schema changes.

3. Recompiled All Workflows

After schema changes, recompiled all workflow lock files to ensure they use the latest schema validation. Compiled 130 workflows successfully with expected warnings about:

  • Schedule fuzzy timing recommendations
  • Campaign spec missing workflow files (known issue - those workflows don't exist yet)

Validation

✅ All Go tests passing:

go test -short ./...
  • All packages: ✅ PASS
  • pkg/workflow: ✅ PASS (was failing before)
  • TestJSweepWorkflowConfiguration: ✅ PASS (was failing before)

✅ Code formatted with go fmt

✅ Workflows recompiled successfully

Notes

  • Known issue: The mcp-inspector.md workflow fails compilation due to an npm environment issue (Cannot find module '../lib/cli.js'). This is a pre-existing environment problem not introduced by these changes.
  • All other 129 workflows compile successfully

CI Cleaner Report

Run: #333
Triggered by: Scheduled CI health check (twice daily at 6am/6pm UTC)

Issues Found:

  • Test failures in pkg/workflow package
  • Missing validation phrases in jsweep.md workflow
  • Schema file changes required binary rebuild

Issues Fixed:

  • ✅ Updated jsweep.md with required validation phrases
  • ✅ Added snapshot support to GitHub Actions schema
  • ✅ Rebuilt binary after schema changes
  • ✅ Recompiled all workflow lock files
  • ✅ All tests now passing

CI Status: ✅ All checks passing (except pre-existing npm environment issue in mcp-inspector.md)

AI generated by CI Cleaner


[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download patch artifact

The patch file is available as an artifact (aw.patch) in the workflow run linked above.

To apply the patch locally:

# Download the artifact from the workflow run https://github.com/githubnext/gh-aw/actions/runs/20643122996
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 20643122996 -n aw.patch

# Apply the patch
git am aw.patch
Show patch preview (500 of 766 lines)
From c27c1079384ed4f84063bbea79d03d262290dd02 Mon Sep 17 00:00:00 2001
From: CI Cleaner Bot <ci-cleaner@github.com>
Date: Thu, 1 Jan 2026 18:18:37 +0000
Subject: [PATCH] fix: update jsweep workflow test requirements and add
 snapshot support to schema

- Add required phrases to jsweep.md to satisfy test expectations
- Update schema to support GitHub Actions snapshot feature for custom images
- Recompile all workflow lock files after schema change

The jsweep workflow test was failing because it expected specific phrases:
- 'verify no type errors' and 'type safety' for TypeScript validation
- 'ensure consistent formatting' for prettier formatting
- 'verify all tests pass' for test verification

Added these phrases to the workflow instructions to ensure proper validation
guidance for contributors.

Also updated github-workflow.json schema to add snapshot support for
custom image generation in GitHub Actions workflows.
---
 .../agent-performance-analyzer.lock.yml       |  2 +-
 .github/workflows/audit-workflows.lock.yml    |  2 +-
 .github/workflows/campaign-manager.lock.yml   |  2 +-
 ...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes githubnext/gh-aw#8480

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

Copilot AI and others added 2 commits January 1, 2026 19:08
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix jsweep workflow test failures and add snapshot schema support Fix jsweep workflow test failures and add snapshot schema support Jan 1, 2026
Copilot AI requested a review from mnkiefer January 1, 2026 19:15
@pelikhan pelikhan marked this pull request as ready for review January 1, 2026 19:58
@pelikhan pelikhan merged commit bbefcce into main Jan 1, 2026
4 checks passed
@pelikhan pelikhan deleted the copilot/fix-jsweep-workflow-tests branch January 1, 2026 19:59
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.

3 participants