Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 5, 2025

This PR enhances the existing .github/copilot-instructions.md file with critical information to reduce CI failures and improve AI agent efficiency when working with the MSAL Android repository.

Problem Statement

While the repository already had comprehensive MSAL-specific instructions, AI agents were still experiencing CI failures due to missing build validation steps, unclear testing requirements, and lack of troubleshooting guidance for common development issues.

Solution

Enhanced the existing copilot instructions with:

Quick Start Section

Added an immediate reference guide for AI agents with essential first steps:

  • Direct links to key resources (Ai.md, snippets/, examples/)
  • Critical validation commands
  • Immediate requirements checklist

Build & Test Validation

Documented the exact Gradle commands that match the CI pipeline:

./gradlew clean msal:assembleLocal msal:testLocalDebugUnitTest msal:lintLocalDebug

CI Failure Prevention

Added specific guidance for common failure scenarios:

  • Build failures: Gradle version mismatches, dependency resolution issues
  • Test failures: Robolectric compatibility (SDK 33), JDK 17 requirements
  • Lint failures: Missing permissions, resource references, API level compliance
  • Security failures: Hardcoded secrets, URL encoding violations

Development Environment Standards

Documented critical environment requirements:

  • JDK 17 (matches CI environment)
  • MSAL build flavors (local, snapshot, dist)
  • Code style standards (4-space indentation, Javadoc requirements)

Pre-submission Checklist

Created a comprehensive validation checklist that agents can follow before submitting PRs to ensure CI success.

Troubleshooting Guide

Added solutions for common issues with builds, tests, linting, and configuration that agents frequently encounter.

Impact

This enhancement directly addresses the stated goals:

  1. Reduces likelihood of CI rejections - Clear validation steps prevent common failure patterns
  2. Improves agent efficiency - Quick start guide and direct command references minimize exploration time
  3. Provides actionable guidance - Specific commands, requirements, and solutions rather than general advice

The enhanced instructions maintain the existing comprehensive MSAL-specific guidance while adding essential repository-level development practices that ensure CI compatibility.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com

If you need me to access, download, or install something from one of these locations, you can either:


💡 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.

@fadidurah fadidurah closed this Sep 5, 2025
@Copilot Copilot AI changed the title [WIP] Your task is to "onboard" this repository to Copilot coding agent by adding a .github/copilot-instructions.md file in the repository that contains information describing how a coding agent seeing it for the first time can work most efficiently. You wi... Enhanced GitHub Copilot instructions with build validation and CI failure prevention Sep 5, 2025
Copilot finished work on behalf of fadidurah September 5, 2025 06:32
@Copilot Copilot AI requested a review from fadidurah September 5, 2025 06:32
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