Skip to content

Add blog-auditor workflow for GitHub Next Agentic Workflows blog#2160

Merged
pelikhan merged 4 commits intomainfrom
copilot/verify-agentic-workflows-blog
Oct 22, 2025
Merged

Add blog-auditor workflow for GitHub Next Agentic Workflows blog#2160
pelikhan merged 4 commits intomainfrom
copilot/verify-agentic-workflows-blog

Conversation

Copy link
Contributor

Copilot AI commented Oct 22, 2025

Overview

This PR adds an automated monitoring workflow that verifies the GitHub Next "Agentic Workflows" blog remains accessible and up-to-date. The workflow runs weekly on Wednesdays at 12:00 UTC and can also be triggered manually.

What This Workflow Does

The blog-auditor workflow performs comprehensive health checks on https://githubnext.com/project/agentic-workflows:

  1. Navigates to the blog page using Playwright's browser_navigate
  2. Captures accessibility snapshot using browser_snapshot to get a text-only, screen reader-compatible view of the page
  3. Validates accessibility by checking:
    • HTTP status code (must be 200)
    • Final URL after redirects (must stay within allowed domains)
    • Content length (must exceed 5,000 characters in the accessibility tree)
    • Required keywords present: "agentic-workflows", "GitHub", "workflow", "compiler"
  4. Reports results:
    • On failure: Creates an issue with [audit] prefix and detailed diagnostics
    • On success: Adds a comment to a tracking issue (if provided) with audit telemetry

Key Features

Accessibility-First Approach:

  • Uses Playwright's accessibility snapshot to capture semantic content as screen readers would interpret it
  • Validates text-only content without HTML markup or styling
  • Better represents user experience for accessibility tools

Security & Best Practices:

  • Minimal read permissions in main job (contents: read, actions: read)
  • Write operations handled via safe-outputs pattern
  • Network access restricted to githubnext.com domains only
  • Strict mode enabled for additional safety
  • 10-minute timeout to prevent runaway costs

Flexible Execution:

  • Automatic weekly schedule (Wednesday 12:00 UTC)
  • Manual trigger via workflow_dispatch
  • Optional tracking_issue_number input for success reporting

Comprehensive Reporting:

  • UTC timestamp for each audit
  • Detailed failure diagnostics with observed vs. expected values
  • Actionable next steps for remediation
  • Links to workflow run for audit trail

Files Changed

  • .github/workflows/blog-auditor.md (233 lines) - Markdown workflow with AI agent instructions
  • .github/workflows/blog-auditor.lock.yml (4,272 lines) - Compiled GitHub Actions workflow

Testing

The workflow has been validated:

  • ✅ Compiles successfully with 0 errors, 0 warnings
  • ✅ All unit tests pass
  • ✅ Follows repository patterns and best practices
  • ✅ Uses established safe-outputs configuration

Usage

# Manual trigger without tracking issue
gh workflow run "Blog Auditor"

# Manual trigger with tracking issue for success comments
gh workflow run "Blog Auditor" \
  --field tracking_issue_number=123

The workflow will automatically monitor blog health weekly and alert maintainers if the blog becomes unavailable or contains unexpected content.

Original prompt

Create an agentic-workflow that runs weekly on a mid-week schedule and verifies the GitHub Next “Agentic Workflows” blog is up to date.

Requirements:

  • Trigger: workflow_dispatch and a weekly cron schedule (e.g., Wednesday at 12:00 UTC).
  • Target URL: https://githubnext.com/project/agentic-workflows
  • Steps:
    1. web-fetch the target URL and capture HTTP status, final URL after redirects, and page content length.
    2. Validate:
      • HTTP status is 200.
      • Final URL matches the target or an expected redirect within the same allowed-domains.
      • Content length is greater than 10,000 bytes (adjust threshold if needed).
      • Page contains the keywords: “agentic-workflows”, “GitHub”, “workflow”, “compiler”.
    3. If any validation fails, create-issue in the repository with:
      • title-prefix: “[audit] Agentic Workflows blog out-of-date or unavailable”
      • labels: [audit, downstream]
      • body including:
        • Timestamp (UTC)
        • Failing checks and observed values
        • The target URL and final URL
        • Suggested next steps to review content and links
    4. If all validations pass, add-comment to an existing tracking issue (by number provided via args or secrets) summarizing the audit success with the same telemetry fields.

Frontmatter guidelines:

  • name: audit-agentic-workflows-blog
  • on:
    • workflow_dispatch: {}
    • schedule: cron: "0 12 * * 3"
  • permissions: minimal read; write permissions for issues if create-issue or add-comment is used.
  • allowed-domains: ["githubnext.com", "www.githubnext.com"]
  • timeout_minutes: 10
  • max-turns: 8
  • tools: [web-fetch, create-issue, add-comment, logger]
  • args:
    • tracking_issue_number (optional)

Expected outputs:

  • logs summarizing fetch metrics and validation results
  • an issue created on failure, or a comment posted on success
  • sanitized safe-outputs for status, final URL, content length, and matched keywords

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add agentic-workflow verification for blog updates Add weekly audit workflow for GitHub Next Agentic Workflows blog Oct 22, 2025
Copilot AI requested a review from pelikhan October 22, 2025 20:24
@pelikhan
Copy link
Contributor

@copilot fetch the page using playwright and use the screen reader APIs to get a text only version of the page, instead of web -fetch.

- Use browser_navigate and browser_snapshot for screen reader-compatible content
- Capture accessibility tree instead of raw HTML for better semantic understanding
- Update content length threshold from 10,000 bytes to 5,000 characters
- Add allowed_domains configuration for Playwright
- Update all validation messages to reference characters instead of bytes

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 22, 2025

@copilot fetch the page using playwright and use the screen reader APIs to get a text only version of the page, instead of web -fetch.

Updated the workflow to use Playwright's accessibility snapshot instead of web-fetch. The workflow now:

  • Uses browser_navigate to load the page
  • Uses browser_snapshot to capture the accessibility tree (screen reader view)
  • Validates against text-only content as screen readers would see it
  • Updated threshold from 10,000 bytes to 5,000 characters

Committed in cc7548c

Copilot AI requested a review from pelikhan October 22, 2025 20:36
@pelikhan
Copy link
Contributor

@copilot rename to blog-auditor

- Rename audit-agentic-workflows-blog.md to blog-auditor.md
- Rename audit-agentic-workflows-blog.lock.yml to blog-auditor.lock.yml
- Update workflow title from "Agentic Workflows Blog Audit Agent" to "Blog Auditor"
- Recompile workflow to update lock file

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 22, 2025

@copilot rename to blog-auditor

Renamed workflow to blog-auditor:

  • blog-auditor.md (workflow file)
  • blog-auditor.lock.yml (compiled workflow)
  • Workflow title: "Blog Auditor"

Committed in dbfa23f

@pelikhan pelikhan marked this pull request as ready for review October 22, 2025 20:45
@pelikhan pelikhan merged commit 31dbf0d into main Oct 22, 2025
5 checks passed
Copilot AI changed the title Add weekly audit workflow for GitHub Next Agentic Workflows blog Add blog-auditor workflow for GitHub Next Agentic Workflows blog Oct 22, 2025
@pelikhan pelikhan deleted the copilot/verify-agentic-workflows-blog branch October 22, 2025 20:45
@github-actions
Copy link
Contributor

Agentic Changeset Generator triggered by this pull request.

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.

2 participants