Skip to content

Remove the Issue Summarizer workflow and update GenAI prompt generation#1502

Merged
pelikhan merged 12 commits intomainfrom
genaiscript-2
Oct 11, 2025
Merged

Remove the Issue Summarizer workflow and update GenAI prompt generation#1502
pelikhan merged 12 commits intomainfrom
genaiscript-2

Conversation

@pelikhan
Copy link
Contributor

  • Deleted the issue-summarizer-genaiscript.md workflow file.
  • Refactored the prompt generation logic in shared/genaiscript.md to use echo commands instead of sed for better readability and maintainability.
  • Updated the smoke-genaiscript.lock.yml and smoke-genaiscript.md files to trigger on pushes to the lock file, ensuring workflows are executed on relevant changes.

- Deleted the `issue-summarizer-genaiscript.md` workflow file.
- Refactored the prompt generation logic in `shared/genaiscript.md` to use echo commands instead of sed for better readability and maintainability.
- Updated the `smoke-genaiscript.lock.yml` and `smoke-genaiscript.md` files to trigger on pushes to the lock file, ensuring workflows are executed on relevant changes.
@pelikhan
Copy link
Contributor Author

@copilot the imports section should not be part of the rendered prompt. See below when rendering smoke-genaiscript.md

- name: Create prompt
        env:
          GITHUB_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
          GITHUB_AW_SAFE_OUTPUTS: ${{ env.GITHUB_AW_SAFE_OUTPUTS }}
        run: |
          mkdir -p $(dirname "$GITHUB_AW_PROMPT")
          cat > $GITHUB_AW_PROMPT << 'EOF'
          
          ```yaml
          ---
          imports:
            - shared/genaiscript.md
          ---
          ```
          
          Review the last 5 merged pull requests in this repository and post summary in an issue.
          
          EOF

Copy link
Contributor

Copilot AI commented Oct 10, 2025

@pelikhan I've opened a new pull request, #1503, to work on those changes. Once the pull request is ready, I'll request review from you.

pelikhan and others added 7 commits October 10, 2025 23:55
…cs section and adding exclusion for package manager directories in visualization guidelines
…est suite (#1503)

* Initial plan

* Fix: Remove imports frontmatter from rendered prompt

Fixed bug where HTML comments in imported workflow files were not being properly removed when they contained code blocks. The issue was in the XML comment removal logic which was checking for code blocks before processing XML comments, causing code blocks within HTML comments to be preserved instead of removed.

Changed the logic in xml_comments.go to:
1. Check if we're in a code block first (code blocks take precedence)
2. If in a code block, preserve everything (ignore XML comment processing)
3. If NOT in a code block, process XML comments and skip lines that are within comments
4. This ensures code blocks INSIDE XML comments are removed, while XML comments INSIDE code blocks are preserved

This fix ensures that documentation in imported files (like shared/genaiscript.md and shared/simonw-llm.md) is not included in the generated prompts.

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

* Add extensive test suite for XML comment removal

Added comprehensive test coverage for xml_comments.go with 6 new test functions and 60+ test cases:

1. TestRemoveXMLCommentsCodeBlocksInComments - Tests the specific bug fix where code blocks inside XML comments should be removed (not preserved)

2. TestRemoveXMLCommentsEdgeCases - Tests boundary conditions including:
   - Empty/whitespace inputs
   - Unclosed/unmatched comment markers
   - Very long comments
   - Multiple consecutive comments
   - Incomplete code blocks in comments

3. TestExtractCodeBlockMarker - Tests code block marker extraction with various scenarios:
   - Different marker types (backticks, tildes)
   - Different marker counts (3, 4, 5, etc.)
   - With/without language specifiers
   - Invalid markers

4. TestIsValidCodeBlockMarker - Tests validation of code block markers

5. TestIsMatchingCodeBlockMarker - Tests matching logic for opening/closing markers:
   - Same type matching
   - Different type non-matching
   - Marker count requirements

6. TestRemoveXMLCommentsFromLine - Tests single-line processing:
   - Complete/partial comments
   - Multiline comment boundaries
   - Multiple comments per line

7. TestRemoveXMLCommentsComplexNesting - Tests complex scenarios:
   - Interleaved comments and code blocks
   - Code blocks containing comment-like content
   - Various nesting patterns

Total: 572 lines of test code covering main functions and helper functions.

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>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review October 11, 2025 00:45
@github-actions
Copy link
Contributor

Agentic Changeset Generator triggered by this pull request

github-actions bot and others added 4 commits October 11, 2025 00:48
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…nutes and update safety prompt configuration.
… processing

- Deleted the issue triage workflow for LLM from `.github/workflows/issue-triage-llm.md`.
- Removed the lock file for the Genaiscript workflow from `.github/workflows/shared/genaiscript.lock.yml`.
- Removed the lock file for the Simonw LLM workflow from `.github/workflows/shared/simonw-llm.lock.yml`.
- Deleted the shared configuration for Simonw LLM from `.github/workflows/shared/simonw-llm.md`.
- Updated the smoke test workflow for Genaiscript to include allowed tools for GitHub.
@pelikhan pelikhan merged commit 2f1ec6d into main Oct 11, 2025
14 checks passed
@pelikhan pelikhan deleted the genaiscript-2 branch October 11, 2025 00:57
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