Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Smoke workflows now query the latest discussion and post comments to both the discussion and PR to validate discussion functionality. Includes codemod to remove deprecated discussion: true field. Workflow prompts include explicit step-by-step instructions for extracting discussion numbers and using the add_comment tool.

Changes

Workflow Updates (4 files)

  • Add discussions: read permission
  • Add shared/github-queries-safe-input.md import for github-discussion-query safe-input tool
  • Configure add-comment with max: 2 to allow commenting on both PR and discussion
  • Add test requirement Weekly Research Report: AI Workflow Automation Landscape and Market Opportunities - August 2025 #7/Add workflow: githubnext/agentics/weekly-research #8 with explicit 3-step instructions:
    1. Use github-discussion-query with limit=1, jq=".[0]" to get the latest discussion
    2. Extract the discussion number from the JSON result (e.g., 123 from {"number": 123, ...})
    3. Use add_comment tool with discussion_number: <extracted_number> to add themed comment
  • Update output instructions to reference the extracted discussion_number when adding comments
  • Thematic styles: copilot (playful), claude (comic-book 💥), codex (mystical oracle 🔮), opencode (space mission 🚀)

Compiler Update

Modified pkg/workflow/compiler_safe_outputs_config.go to remove the deprecated discussion flag from compiled workflow outputs:

  • Removed code that serialized the discussion boolean flag to handler config JSON
  • Discussion support is always available in the add_comment handler (auto-detection based on context or discussion_number parameter)
  • Recompiled all 137 workflows to remove the deprecated flag from .lock.yml files
  • The flag is no longer needed as the handler automatically detects the target type (issue/PR/discussion)

Codemod for Migration

Added automated codemod to remove the deprecated discussion field from workflow source files:

  • Created pkg/cli/codemod_discussion_flag.go to automatically remove safe-outputs.add-comment.discussion: true
  • Registered as "add-comment-discussion-removal" in the fix command
  • Includes comprehensive test suite with 8 test cases
  • Usage: gh aw fix --write to automatically remove the deprecated field from all workflows

Schema Deprecation

Updated pkg/parser/schemas/main_workflow_schema.json:

  • Marked the discussion field as deprecated with "deprecated": true
  • Added detailed deprecation message explaining automatic detection and migration path

Compiled Outputs

Lock files now include:

  • discussions: write permission in the safe_outputs job
  • add_comment tool with max: 2 to enable multiple comments
  • github-discussion-query safe-input tool for querying discussions
  • No discussion flag in handler config (deprecated and removed)

How It Works

  1. Agent queries the latest discussion using the github-discussion-query safe-input tool with explicit parameters: limit=1, jq=".[0]"
  2. Agent extracts the discussion number from the JSON response (e.g., {"number": 123, "title": "...", ...})
  3. Agent uses add_comment tool with discussion_number: <extracted_number> parameter to add a themed comment to that specific discussion
  4. Agent also adds a brief comment to the PR with test results using add_comment (default context)

The add_comment handler supports commenting on issues, PRs, discussions, issue comments, and PR comments with automatic target type detection.

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing

Original prompt

Update smoke agentic workflows to pick a random discussion (get 1 discussion from the MCP) and add a comment stating the smoke agentic was here (in a fun way).

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Changeset

  • Type: patch
  • Description: Add discussion interaction to smoke workflows; compiler now serializes the discussion flag into the safe-outputs handler config so workflows can post comments to discussions. Lock files include discussions: write where applicable.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator


Changeset

  • Type: patch
  • Description: Add discussion interaction to smoke workflows; compiler now serializes the discussion flag into the safe-outputs handler config so workflows can post comments to discussions. Lock files include discussions: write where applicable.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator


Changeset

  • Type: patch
  • Description: Add discussion creation and commenting to smoke workflows; deprecate the discussion flag and add a codemod to remove it.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator


Changeset

  • Type: patch
  • Description: Add discussion interaction to smoke workflows; deprecate the discussion flag and add a codemod to remove it.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator


Changeset

  • Type: patch
  • Description: Add discussion interaction to smoke workflows; deprecate the discussion flag and add a codemod to remove it. Compiler no longer emits the deprecated discussion boolean in handler configs; add_comment auto-detects target type or accepts discussion_number.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Added github-discussion-query safe-input to all smoke workflows
- Added discussions: read permission to all smoke workflows
- Added discussion: true flag to add-comment safe-output
- Updated compiler to include discussion flag in handler config
- Updated workflow prompts to interact with random discussions
- Each smoke workflow now picks a random discussion and adds a fun thematic comment

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update smoke agentic workflows to add random discussion comments Add discussion interaction to smoke workflows Jan 22, 2026
Copilot AI requested a review from pelikhan January 22, 2026 18:01
@pelikhan pelikhan added the smoke label Jan 22, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

Smoke Test Results

PRs Reviewed:

  • §11367: Document --push flag safety features
  • §11356: Update schema documentation

Tests:

  • ✅ GitHub MCP
  • ✅ Safe Inputs GH CLI
  • ✅ Serena MCP
  • ✅ Playwright
  • ✅ File Writing
  • ✅ Bash Tool
  • ❌ Discussion Interaction (gh discussion unavailable)

Status: ⚠️ PARTIAL PASS (6/7)

@pelikhan @Copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

GitHub MCP merged PRs ✅ — [docs] Document --push flag safety features (branch validation and user confirmation); Update schema documentation for removed included_file_schema and remove deprecated safe-jobs field
Safeinputs GH PR list ✅ — [WIP] Debug failing JavaScript tests; [WIP] Debug JS tests to identify failure reasons
Serena activate project ✅
Playwright title contains GitHub ✅
Tavily search results ✅
File writing ✅
Bash cat readback ✅
Discussion comment ❌
Overall status: FAIL

AI generated by Smoke Codex

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

Smoke Test: Claude

PRs Reviewed:

Results:

  • ✅ GitHub MCP
  • ✅ Safe Inputs GH CLI
  • ✅ Serena MCP
  • ✅ Playwright
  • ✅ Tavily
  • ✅ File Writing
  • ✅ Bash Tool
  • ❌ Discussion Interaction

Status: PARTIAL PASS (7/8)

AI generated by Smoke Claude

…t gh discussion command (#11371)

* Initial plan

* Debug discussion-comment task failure - identify root cause

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

* Fix github-discussion-query tool to use GraphQL API

Replace gh discussion list (unsupported) with gh api graphql.
The gh CLI in GitHub Actions doesn't have a 'discussion' subcommand,
so we use the GraphQL API to query discussions instead.

- Parse repo owner/name from INPUT_REPO or GitHub context
- Build GraphQL query for discussions with proper fields
- Transform GraphQL output to match expected format
- Maintains backward compatibility with existing jq filters

Fixes discussion-comment task failure in smoke tests.

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

* Recompile workflows using github-discussion-query tool

Recompile all workflows that import shared/github-queries-safe-input.md
to apply the GraphQL API fix for discussion queries.

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

* Fix inline github-discussion-query in daily-performance-summary

The daily-performance-summary.md workflow had an inline definition of
github-discussion-query that overrides the shared import. Updated the
inline definition to also use GraphQL API.

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

…all workflows

- Updated compiler_safe_outputs_config.go to NOT emit the discussion flag to handler config
- Added comment explaining that discussion support is always available in add_comment handler
- Recompiled all 137 workflows successfully
- Verified daily-fact.lock.yml no longer contains "discussion":true in handler config
- The discussion flag is deprecated; add_comment handler auto-detects discussion targets

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

github-actions bot commented Jan 23, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

Smoke Test: Copilot - PASS ✅

Overall: PASS ✅

Run: §21271197457

cc @pelikhan

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

GitHub MCP: ✅ Enable AWF sandbox in dev.md | Update dev workflow to build and test project
Safeinputs gh: ✅ Update AWF to v0.11.0 | Handle GitHub Actions PR creation permission errors with auto-filed issues
Serena activate: ✅
Playwright github title: ✅
Tavily search: ✅
File write: ✅
Bash cat: ✅
Discussion comment: ✅
Overall: PASS

AI generated by Smoke Codex

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

Smoke Test Results

PRs: #11415, #11410

  • ✅ GitHub MCP
  • ✅ Safe Inputs GH CLI
  • ✅ Serena MCP
  • ✅ Playwright
  • ✅ Tavily
  • ✅ File Writing
  • ✅ Bash
  • ✅ Discussion

Status: PASS

AI generated by Smoke Claude

@pelikhan pelikhan marked this pull request as ready for review January 23, 2026 02:02
@pelikhan pelikhan merged commit ac7bef0 into main Jan 23, 2026
83 checks passed
@pelikhan pelikhan deleted the copilot/update-smoke-agentic-workflows branch January 23, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants