Skip to content

Conversation

@jessehouwing
Copy link
Contributor

@jessehouwing jessehouwing commented Jan 5, 2026

Enhancements to handler diagnostics improve task execution compatibility, addressing user challenges with handler selection failures.

This pull request is an approach to fix the error message when no suitable task handler is found. There are still a few things that can be improved, as the list of possible handlers, deprecated handlers etc is currently hardcoded as I couldn't find an easy way to lift that info from the agent's memory.


Description

Introduce detailed diagnostics for handler selection failures, including a new HandlerDiagnostics class for analyzing task.json handlers. Update error messages and implement unit tests to ensure accurate reporting of compatibility issues.


Risk Assessment (Medium)

Changes involve new diagnostics and error handling, which may affect task execution paths but are designed to enhance user experience.


Unit Tests Added or Updated (Yes)

Unit tests for HandlerDiagnostics were implemented to verify compatibility reporting.


Additional Testing Performed

Automated tests were conducted to validate the accuracy of handler diagnostics across various scenarios.


Change Behind Feature Flag (No)

This change is integral to task execution and does not warrant a feature flag.


Tech Design / Approach

Design considerations for the HandlerDiagnostics class and error messaging were reviewed to ensure clarity and usability.


Documentation Changes Required (Yes)

Documentation will need updates to reflect new error messages and handler diagnostics features.


Logging Added/Updated (Yes)

Log statements were added to capture handler selection failures and diagnostics.


Telemetry Added/Updated (No)

No new telemetry was introduced in this update.


Rollback Scenario and Process (Yes)

A rollback plan is documented in case of unforeseen issues.


Dependency Impact Assessed and Regression Tested (Yes)

All impacted modules were analyzed, confirming no breakage of existing functionality.

- Added detailed diagnostics for handler selection failures in TaskRunner.cs, including self-hosted agent checks and specific error messages.
- Introduced HandlerDiagnostics class to analyze task.json handlers against loaded execution data, providing comprehensive reasons for handler incompatibility.
- Updated strings.json with new error messages related to handler compatibility and potential solutions for users.
- Implemented unit tests for HandlerDiagnostics to ensure accurate reporting of handler compatibility issues across various scenarios, including OS incompatibility, deprecated handlers, and unknown future handlers.
@jessehouwing jessehouwing requested review from a team as code owners January 5, 2026 15:49
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.

[BUG]: Error message for missing task handler can be a lot more specific

1 participant