-
Notifications
You must be signed in to change notification settings - Fork 46
Use XML comment markers for agentic workflow detection #13309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updated expired_entity_search_helpers.cjs to match both "> AI generated by" and "> Workflow:" patterns - Added test for issue #12669 with Workflow prefix format - Added test to verify ephemerals.extractExpirationDate handles issue #12669 format - All JavaScript tests pass (3276 tests) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| const agenticPattern = /^> AI generated by/m; | ||
| // Check if created by an agentic workflow | ||
| // Matches either "> AI generated by" or "> Workflow:" at start of line | ||
| const agenticPattern = /^> (?:AI generated by|Workflow:)/m; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot use the XML comment with workflow id or workflow name instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use XML comment markers (gh-aw-workflow-id: or gh-aw-agentic-workflow:) instead of text patterns. This matches the pattern used in other parts of the codebase like close_older_issues.cjs. Changed in commit 0566d31.
|
@copilot the helper to detect if a text is agentically generated should be based on xml comments and it should be a helper function in the JavaScript file that creates the xml comment. Add tests. |
Changed detection from text patterns ("> AI generated by" or "> Workflow:") to
XML comment markers (gh-aw-workflow-id or gh-aw-agentic-workflow). This is more
reliable and consistent with other workflow detection in the codebase.
Updated tests to:
- Add XML markers to all test cases
- Test issue #12669 correctly NOT being found (lacks XML markers)
- Add new tests for both gh-aw-workflow-id and gh-aw-agentic-workflow markers
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Smoke Test: Claude - 21597335533Last 2 Merged PRs:
Test Results: Overall Status: PASS ✅
|
The agentic maintenance workflow's expired entity detection needs to identify issues created by agentic workflows. Based on code review feedback, this now uses XML comment markers instead of text pattern matching.
Change
Updated detection logic in
expired_entity_search_helpers.cjsto use XML comment markers:This approach is more reliable and consistent with other workflow detection patterns in the codebase (e.g.,
close_older_issues.cjs).Why This Matters
XML comment markers (
<!-- gh-aw-workflow-id: ... -->or<!-- gh-aw-agentic-workflow: ... -->) are the authoritative identifiers for agentic workflow-generated content. Issues without these markers are not managed by agentic workflows and should not be auto-closed.Tests Updated
gh-aw-workflow-idandgh-aw-agentic-workflowmarker typesIssue #12669 Context
Issue #12669 was not detected because it lacks XML comment markers. This is correct behavior - without these markers, the issue is not managed by an agentic workflow and should not be auto-closed.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.