Skip to content

Add PAC copilot error triage guidance to the Manage agent #44

Description

With pac 2.12.2 (current on NuGet), several pac copilot failures only print "Sorry, the app encountered a non-recoverable error" plus an exception type. The actual reason is in pac-log.txt under the pac tool folder (on macOS ~/.dotnet/tools/.store/microsoft.powerapps.cli.tool/<version>/.../logs/pac-log.txt). The Manage agent doesn't know about this, so it can only guess.

Examples I reproduced on a throwaway agent:

  • pac copilot publish exits with code 1 and System.ArgumentException, yet the publish goes through. On one agent the exception was logged at 19:01:16 and the bot's publishedon, which was empty before, was set to 19:01:45. On another, four calls in a row all crashed, and publishedon still moved from 16:47:56 to 16:49:55 during them. This is the pac bug in PAC CLI: copilot publish fails on first attempt with "Invalid response format" due to race condition powerplatform-build-tools#1307.
  • pac copilot push failing with YamlDotNet.Core.SemanticErrorException: the console doesn't name the file, and the log only gives line and column. In my case it was an unquoted ": " in workflows/<Name>-<id>/metadata.yml.
  • pac copilot push failing on a WorkflowTool whose workflowId doesn't exist: the reason (Entity 'Workflow' With Id = ... Does Not Exist) is only in the log.

Proposal: a short error triage section in agents/copilot-studio-manage.md:

  1. On a pac crash, show the exception type and tell the user where pac-log.txt is; if the user agrees, read the last FTL entry.
  2. On a publish ArgumentException, report the CLI failure, then check whether the bot's publishedon moved past its previous value before saying whether the publish completed.
  3. After a publish, expect pac copilot push to report "Remote changes conflict" (publishing writes publishedOn), and pull before pushing.

I can open a PR for this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions