Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

Summary

Successfully implemented all requirements and addressed all PR review feedback:

✅ Review Feedback Addressed (Final)

  1. Case-insensitive PING-COPILOT trigger - Added lowercase variant to workflow conditional
  2. Multi-line PING-COPILOT support - Changed regex to [\s\S]+ to capture multi-line requests
  3. Dynamic version fetching - Fetch latest version from GitHub Releases API instead of hardcoding
  4. Version detection consistency - Use lowercase content variable consistently
  5. Remove overly broad regex - Removed fallback /(\d+\.\d+\.\d+)/ pattern to avoid false positives
  6. Pagination for releases - Use github.paginate to fetch all releases, not just 100
  7. Show all label explanations - Display label explanations even for very old versions
  8. Extract duplicate code - Created reusable detectMsalVersion() helper function
  9. Update documentation - Use placeholders/relative dates instead of hardcoded versions/dates
  10. Remove ALL hardcoded versions - Replaced remaining "8.1.1" references with dynamic latestVersion variable
  11. Remove duplicate instructions - Consolidated instructions in primary file, reference from secondary files
  12. Remove PR documentation artifacts - Removed copilot-features-examples.md, IMPLEMENTATION_SUMMARY.md, and QUICK_START.md
  13. Replace NEW qualifiers with dates - Changed "NEW:" to dated ordered list entries (added December 2025)

📁 Files Changed

Modified (1 file):

  • .github/issue-responses/README.md (replaced "NEW" qualifiers with dated entries)

🎯 Key Improvements

  • PING-COPILOT: Now properly case-insensitive and supports multi-line requests
  • Version Detection: More reliable with pagination, no false positives
  • Dynamic Versions: Latest version fetched at runtime via API - NO hardcoded versions anywhere
  • Code Quality: Removed duplication with helper function
  • Maintainability: Zero hardcoded versions to update, single source of truth for instructions
  • Documentation Structure: Clear separation - detailed instructions in copilot-instructions.md, templates in customer-communication-guidelines.md
  • Cleaner Repository: Removed PR documentation artifacts that don't serve ongoing operational value
  • Better Documentation: Uses dated entries instead of "NEW" qualifiers for clarity and maintainability

🧪 Testing Recommendations

  1. Test PING-COPILOT with lowercase: ping-copilot: test
  2. Test multi-line: PING-COPILOT: line 1\nline 2
  3. Verify dynamic version in all responses (bug reports, PING-COPILOT follow-ups, version notes)
  4. Test with very old version to see all labels explained
Original prompt

Update the reference instructions for the Copilot agent in the AzureAD/microsoft-authentication-library-for-android repo to include:

  1. Version-aware triage:

    • If an issue cites an MSAL version older than 1.5 years (determined from the release page), apply a 'very-old-msal' label and primarily respond by informing the user that support is unavailable for such versions and advising them to upgrade.
  2. Label transparency:

    • Whenever the agent applies a label (such as 'bug', 'very-old-msal', or 'triage-issue'), the agent should always explain the reasoning for the label choice in its response.
  3. "triage-issue" label usage:

    • When an issue may require a code fix or further engineering investigation, the agent should add a 'triage-issue' label and explain why.
  4. User-triggerable follow-up via special phrase:

    • Since direct bot mentions are not supported, add to the instructions and add to every initial issue response: users can trigger a follow-up Copilot analysis by commenting PING-COPILOT: <their question/request> in the issue, and the agent should listen for this phrase and respond accordingly (as supported by the app backend).
  5. Ensure the response templates and documentation in .github/copilot-instructions.md and any guidance for the handler implementation reflect the above changes. Include usage examples where beneficial.

This pull request was created from Copilot chat.


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

AB#3482361

Copilot AI changed the title [WIP] Update reference instructions for Copilot agent Add version-aware triage, label transparency, and user-triggered follow-up for Copilot agent Dec 30, 2025
Copilot AI requested a review from fadidurah December 30, 2025 06:18
@fadidurah fadidurah marked this pull request as ready for review December 30, 2025 06:25
@fadidurah fadidurah requested a review from a team as a code owner December 30, 2025 06:25
Copilot AI review requested due to automatic review settings December 30, 2025 06:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the automated issue triage system for MSAL Android with three major features: version-aware triage (automatically detecting and handling unsupported MSAL versions >1.5 years old), label transparency (requiring explanations for all label applications), and a PING-COPILOT mechanism (allowing users to trigger follow-up analysis via special comment syntax). The changes aim to reduce support burden for old versions, improve communication clarity, and enable iterative troubleshooting within single issue threads.

Key Changes

  • Version-aware triage: Detects MSAL versions via regex, queries GitHub Releases API to calculate age, applies very-old-msal label and provides upgrade guidance for versions >548 days old
  • Label transparency: All label applications now include structured explanations in responses; added triage-issue label criteria for issues requiring engineering investigation
  • PING-COPILOT follow-up: New workflow job responding to comments containing PING-COPILOT: <question>, providing context-aware guidance based on keywords and original issue content

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
.github/workflows/copilot-issue-response.yml Core implementation: adds version detection logic (lines 64-116), label application (179-182, 203-205), version-prioritized response generation (268-285), label explanation section (287-309), PING-COPILOT footer (370-376), and new handle_ping_copilot job (603-767)
.github/copilot-instructions.md Adds three new sections (238-397): version-aware triage guidelines, label transparency requirements with examples, and PING-COPILOT usage instructions for AI agents
.github/issue-responses/customer-communication-guidelines.md Documents new features with templates and examples: version detection rules, unsupported version response template, label explanation templates, triage-issue criteria, and PING-COPILOT protocol
.github/issue-responses/copilot-features-examples.md New 565-line file providing comprehensive real-world scenarios demonstrating all three features with expected responses, chained follow-ups, and testing guidelines
.github/issue-responses/README.md Updates directory guide to reference new features and examples file; adds user-facing PING-COPILOT documentation
.github/issue-responses/QUICK_START.md New 254-line quick reference for reviewers: 6-minute test scenarios, configuration details, file changes summary, troubleshooting tips
.github/issue-responses/IMPLEMENTATION_SUMMARY.md New 290-line technical deep-dive: implementation details, algorithm explanations, example workflows, rollout considerations, future enhancements

…port, dynamic version fetching, pagination, and remove overly broad regex

Co-authored-by: fadidurah <[email protected]>
@fadidurah
Copy link
Collaborator

@copilot Let

@fadidurah
Copy link
Collaborator

@copilot I feel the instructions added to copilot-instructions.md and customer-communication-guidelines.md around the PING-COPILOT Keyword and the msal version traige are very similar, do we really need to include these notes in both files? Let's only have them in the relavent github issues files if we can help it and can still guarantee that the agent will follow these instructions when handling github issues

…md, reference copilot-instructions.md as primary source

Co-authored-by: fadidurah <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 31, 2025

@copilot I feel the instructions added to copilot-instructions.md and customer-communication-guidelines.md around the PING-COPILOT Keyword and the msal version traige are very similar, do we really ne...

Fixed in 83d57a4. Removed duplicate instructions from customer-communication-guidelines.md and added references to copilot-instructions.md as the primary source.

Changes:

  • Removed detailed version-aware triage implementation guidelines (version detection patterns, age calculation, API endpoints)
  • Removed detailed PING-COPILOT implementation guidelines (how it works, when to respond, benefits)
  • Kept only communication templates and response examples in customer-communication-guidelines.md
  • Added note at the top: "For detailed implementation guidelines... see .github/copilot-instructions.md sections 6.1-6.3"

Since copilot-instructions.md is marked as "PRIMARY SOURCE OF TRUTH" for AI agents and is explicitly referenced at the top, agents will follow the detailed instructions there while using the templates from customer-communication-guidelines.md for formatting responses.

@fadidurah
Copy link
Collaborator

@copilot What is the purpose of the new files added?

.github/issue-responses/copilot-features-examples.md
.github/issue-responses/IMPLEMENTATION_SUMMARY.md
.github/issue-responses/QUICK_START.md

Copy link
Contributor Author

Copilot AI commented Dec 31, 2025

@copilot What is the purpose of the new files added?

.github/issue-responses/copilot-features-examples.md...

These three files were created as PR documentation to help reviewers understand the changes:

copilot-features-examples.md (614 lines)

  • Comprehensive examples showing 15+ real-world scenarios
  • Demonstrates expected agent behavior with complete conversations
  • Shows what responses look like for version triage, label transparency, and PING-COPILOT
  • Listed in README for team members to understand automated triage behavior

IMPLEMENTATION_SUMMARY.md (300+ lines)

  • Technical implementation details (code changes, line numbers, algorithms)
  • Maintenance documentation for future updates
  • Not referenced by primary AI agent files

QUICK_START.md (254 lines)

  • 6-minute testing guide for PR reviewers
  • Step-by-step test scenarios with expected results
  • Not referenced by primary AI agent files

Recommendation: The last two files (IMPLEMENTATION_SUMMARY.md and QUICK_START.md) are PR review artifacts that don't serve ongoing value and can be removed. The copilot-features-examples.md could potentially be useful for team members but is not needed for the AI agent to function - the primary instructions are in copilot-instructions.md and customer-communication-guidelines.md.

@fadidurah
Copy link
Collaborator

@copilot Let's remove these files

@fadidurah
Copy link
Collaborator

@copilot .github/issue-responses/copilot-features-examples.md
.github/issue-responses/IMPLEMENTATION_SUMMARY.md
.github/issue-responses/QUICK_START.md

@fadidurah
Copy link
Collaborator

@copilot Let's remove these files .github/issue-responses/copilot-features-examples.md .github/issue-responses/IMPLEMENTATION_SUMMARY.md .github/issue-responses/QUICK_START.md

…EMENTATION_SUMMARY.md, and QUICK_START.md

Co-authored-by: fadidurah <[email protected]>
Copy link
Contributor Author

Copilot AI commented Jan 5, 2026

@copilot Let's remove these files .github/issue-responses/copilot-features-examples.md .github/issue-responses/IMPLEMENTATION_SUMMARY.md .github/issue-responses/QUICK_START.md

Removed in f0f24d4. Deleted all three PR documentation files:

  • .github/issue-responses/copilot-features-examples.md (614 lines)
  • .github/issue-responses/IMPLEMENTATION_SUMMARY.md (300+ lines)
  • .github/issue-responses/QUICK_START.md (254 lines)

Also updated .github/issue-responses/README.md to remove references to these files. The core functionality remains intact in copilot-instructions.md and customer-communication-guidelines.md.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

Copilot AI requested a review from fadidurah January 7, 2026 05:17
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

✅ Work item link check complete. Description contains link AB#3482361 to an Azure Boards work item.

@github-actions github-actions bot changed the title Add version-aware triage, label transparency, and user-triggered follow-up for Copilot agent Add version-aware triage, label transparency, and user-triggered follow-up for Copilot agent, Fixes AB#3482361 Jan 7, 2026
@fadidurah fadidurah merged commit 9d777f3 into dev Jan 7, 2026
28 of 34 checks passed
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.

4 participants