Fix: agenticUserTemplateManifest.json missing from zip on repeated publish runs#286
Draft
Fix: agenticUserTemplateManifest.json missing from zip on repeated publish runs#286
Conversation
Co-authored-by: sellakumaran <147754920+sellakumaran@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix publish command failure when manifest directory exists
Fix: agenticUserTemplateManifest.json missing from zip on repeated publish runs
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the
manifest/directory already exists from a previous faileda365 publishrun,agenticUserTemplateManifest.jsonwas not reliably included inmanifest.zip, causing a server-sideBadRequest: File not found in the zip archiveerror.Root causes
Zip candidate list omitted the file:
candidateNamesin zip creation was["manifest.json", "color.png", "outline.png", "logo.png", "icon.png"]—agenticUserTemplateManifest.jsonwas never explicitly listed. It relied on a fallback that enumerates leftover directory files. On macOS, Finder creates.DS_Storewhen the user opens the folder to edit the manifest;.sorts beforea, so.DS_Storefilled the 4th slot instead.No recovery when file is absent: If the manifest directory existed but
agenticUserTemplateManifest.jsonwas missing (old CLI version, very early partial failure), the subsequentFile.ReadAllTextAsyncthrewFileNotFoundExceptionwith no recovery path.Changes
ManifestTemplateService— NewEnsureTemplateFile(workingDirectory, fileName): extracts a single embedded resource to the directory only if the file is not already there, leaving other files (including user-customizedmanifest.json) untouched.PublishCommand— After the "extract-if-dir-missing" block, explicitly check foragenticUserTemplateManifest.jsonand callEnsureTemplateFileif absent.PublishCommand— AddagenticUserTemplateManifest.jsonas the second entry incandidateNamesso it is picked up deterministically:ManifestTemplateServiceTests— 4 new unit tests coveringEnsureTemplateFile(file already exists, file extracted when missing, extracted file is valid JSON, invalid resource name returns false).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:
graph.microsoft.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-devTools/Agent365-devTools/src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/bin/Release/net8.0/Microsoft.Agents.A365.DevTools.Cli.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-devTools/Agent365-devTools/src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/bin/Release/net8.0/Microsoft.Agents.A365.DevTools.Cli.Tests.deps.json /home/REDACTED/work/Agent365-devTools/Agent365-devTools/src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/bin/Release/net8.0/testhost.dll --port 33889 --endpoint 127.0.0.1:033889 --role client --parentprocessid 4280 --telemetryoptedin false(dns block)/usr/bin/../../opt/az/bin/python3 /usr/bin/../../opt/az/bin/python3 -Im azure.cli rest --method GET --url REDACTED$filter=appId eq 'a1b2c3d4-e5f6-a7b8-c9d0-e1f2a3b4c5d6'&$select=id --headers Authorization=****** Microsoft.Agents.A365.DevTools.Cli.Tests/Services/GraphApiServiceTokenTrimTests.cs Microsoft.Agents.A365.DevTools.Cli.Tests/Services/ManifestTemplateServiceTests.cs Micr�� Microsoft.Agents.A365.DevTools.Cli.Tests/Services/Requirements/FrontierPreviewRequirementCheckTelsb_release Microsoft.Agents.A365.DevTools.Cli.Tests/Services/InteractiveGraphAuthServiceTests.cs Microsoft.Agents.A365.DevTools.Cli.Tests/Services/ConfigurationWizardServiceWebAppNameTests.cs Microsoft.Agentslsb_release Microsoft.Agents-a Microsoft.Agents.A365.DevTools.Cli.Tests/Services/Helpers/DotNetProjectHelperTests.cs Microsoft.Agents.A365.DevTools.Cli.Tests/Services/Helpers/LoggerFactoryHelperTests.cs(dns block)/usr/bin/../../opt/az/bin/python3 /usr/bin/../../opt/az/bin/python3 -Im azure.cli rest --method GET --url REDACTED$filter=appId eq 'a1b2c3d4-e5f6-a7b8-c9d0-e1f2a3b4c5d6'&$select=id --headers Authorization=******(dns block)login.microsoftonline.com/usr/bin/../../opt/az/bin/python3 /usr/bin/../../opt/az/bin/python3 -Im azure.cli login --tenant 12345678-1234-1234-1234-123456789012(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 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.