Skip to content

Import dotnet-package-skills tool and add pipelines for CI/CD - #12

Open
kartheekp-ms wants to merge 10 commits into
mainfrom
kartheekp-ms-arcade-tool-signing
Open

kartheekp-ms wants to merge 10 commits into
mainfrom
kartheekp-ms-arcade-tool-signing

Conversation

@kartheekp-ms

@kartheekp-ms kartheekp-ms commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Import dotnet-package-skills code to this repo and add CI/CD pipelines.

Flow

  • One shared Windows stage and one eng\common\build.cmd invocation per job.
  • Public/PR: native restore, build, C# application tests, pack, and unsigned NuGet build artifacts. No signing invocation or production signing resources.
  • Official: the same native actions plus Arcade/MicroBuild recursive signing: nested assemblies first, pack, then sign the NuGet package. Signed packages use 1ES-governed build artifacts.
  • Signing preserves strong-name identities and uses 3PartySHA2 for the third-party YAML library.

YamlDotNet 18.1.0 replaces SharpYaml for skill-description parsing, preserving the existing frontmatter behavior. The MIT license uses Arcade-compatible formatting while retaining the NuGet copyright and permission grant.

Removal advice names --stale or --package options instead of constructing shell commands from repository paths. Install/uninstall are not transactional in this prerelease; failed copying or manifest persistence can leave changed skills and a stale or partial manifest.

Validation: Public build 1628511 passed for exact head 29372775b33bd28939aafda55bd2420c29487d7c, with 924 tests per framework and a nonempty NuGet artifact. Real official signing remains pending trusted-main mirror parity and owner-approved signing resources.

@kartheekp-ms
kartheekp-ms added this pull request to stack #13 October 6, 2026 03:12
Base automatically changed from kartheekp-ms-arcade-pipeline-onboarding to main October 6, 2026 17:22
kartheekp-ms and others added 2 commits October 6, 2026 10:22
Import the verified product delta above Arcade onboarding, preserve portable tool identity and functional coverage, adopt native versions and trusted release guards, and use scoped Arcade signing with artifact-only pipelines.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Server-side Azure expansion resolves steps forwarded through the common job relative to that job template. Use a root-absolute tool steps reference and cover it with a regression test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@kartheekp-ms
kartheekp-ms force-pushed the kartheekp-ms-arcade-tool-signing branch from 4f4fe49 to 8bf8e23 Compare October 6, 2026 17:22
kartheekp-ms and others added 5 commits October 6, 2026 10:51
Use one shared Windows stage and one Arcade restore/build/test/pack invocation per job. Official trusted-main builds add native recursive signing; both pipelines publish NuGet build artifacts. Remove custom validators, wrapper scripts, pipeline-only tests and redundant template layers while preserving the original application suite and shared foundation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use YamlDotNet 18.1.0 event parsing while preserving bounded frontmatter reads, nesting limits, metadata guards, and blank descriptions. Add focused application regressions for blank trailing blocks and update the existing third-party signing mapping without changing the minimal pipelines.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Revert only the PR-specific license heading and reserved-rights formatting at the user request. Keep the original main license text and do not change or disable Arcade validation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore only the MIT heading and reserved-rights line with user approval so the enabled Arcade license check passes. Preserve the NuGet copyright and full MIT grant; no pipeline or validation settings change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Removed outdated origin and rules sections from CONTRIBUTING.md to streamline the document.
@kartheekp-ms kartheekp-ms changed the title Build and sign dotnet-package-skills with Arcade Import dotnet-package-skills tool and add pipelines for CI/CD Oct 6, 2026
@kartheekp-ms
kartheekp-ms requested a balanced review from Copilot October 6, 2026 21:27
@kartheekp-ms
kartheekp-ms marked this pull request as ready for review October 6, 2026 21:27
@kartheekp-ms
kartheekp-ms requested a review from a team as a code owner October 6, 2026 21:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved sanitization, symlink safety, target traversal, version validation, and artifact-publication issues could cause security or reliability failures.

Review effort: Balanced
Findings: 2 High severity · 3 Medium severity

Open (5)
What changed in this PR

Imports the dotnet-package-skills .NET tool and integrates it into the repository’s Arcade build, test, packaging, and signing workflows.

Changes:

  • Adds the multi-targeted CLI, interactive terminal UI, package discovery, installation tracking, and locking.
  • Adds comprehensive unit tests and contributor documentation.
  • Adds shared public/official pipelines with NuGet packaging and official signing.
File Description
README.md Documents the tool and build workflow.
LICENSE Updates MIT license formatting.
eng/​Signing.props Imports tool signing configuration.
eng/​Build.props Adds the tool solution to the build.
eng/​pipelines/​pr.yml Uses the shared public stage.
eng/​pipelines/​official.yml Adds guarded official and release builds.
eng/​pipelines/​dotnet-package-skills/​stage.yml Defines build, test, pack, sign, and artifact steps.
eng/​pipelines/​dotnet-package-skills/​Signing.props Configures package and assembly signing.
eng/​pipelines/​dotnet-package-skills/​README.md Documents pipeline behavior and prerequisites.
dotnet-package-skills/​DotnetPackageSkills.slnx Defines the tool solution.
dotnet-package-skills/​Directory.Build.props Configures shared build and test properties.
dotnet-package-skills/​CONTRIBUTING.md Documents development workflow.
dotnet-package-skills/​.gitignore Excludes generated files.
dotnet-package-skills/​src/​DotnetPackageSkills.csproj Configures the packaged multi-target tool.
dotnet-package-skills/​src/​Program.cs Implements commands and orchestration.
dotnet-package-skills/​src/​PackageSkillsException.cs Defines actionable user errors.
dotnet-package-skills/​src/​Skills/​BundledSkill.cs Defines skill records.
dotnet-package-skills/​src/​Skills/​SkillDiscovery.cs Discovers package-provided skills.
dotnet-package-skills/​src/​Skills/​SkillDescriptionReader.cs Parses bounded YAML frontmatter.
dotnet-package-skills/​src/​Skills/​InstallManifest.cs Persists installed-skill ownership.
dotnet-package-skills/​src/​Skills/​DestinationLock.cs Serializes destination operations.
dotnet-package-skills/​src/​NuGet/​TargetLocator.cs Locates projects and solutions.
dotnet-package-skills/​src/​NuGet/​PackageCoordinate.cs Parses package coordinates.
dotnet-package-skills/​src/​NuGet/​PackageLister.cs Reads direct package references.
dotnet-package-skills/​src/​NuGet/​PackagePathResolver.cs Resolves package cache paths.
dotnet-package-skills/​src/​NuGet/​GlobalPackagesLocator.cs Locates the NuGet cache.
dotnet-package-skills/​src/​Infrastructure/​ProcessRunner.cs Runs external processes safely.
dotnet-package-skills/​src/​Infrastructure/​DotnetCli.cs Wraps dotnet invocation.
dotnet-package-skills/​src/​Cli/​TerminalText.cs Sanitizes and lays out terminal text.
dotnet-package-skills/​src/​Cli/​SkillPicker.cs Implements interactive selection.
dotnet-package-skills/​src/​Cli/​PickerLayout.cs Calculates picker pagination.
dotnet-package-skills/​src/​Cli/​OutputWriter.cs Formats user-facing reports.
dotnet-package-skills/​src/​Cli/​ITerminal.cs Abstracts terminal operations.
dotnet-package-skills/​src/​Cli/​InteractiveSkills.cs Maps skills into picker choices.
dotnet-package-skills/​src/​Cli/​InteractiveScreen.cs Manages alternate terminal screens.
dotnet-package-skills/​src/​Cli/​ConsoleViewport.cs Handles viewport operations.
dotnet-package-skills/​src/​Cli/​CommandLineDiagnostics.cs Sanitizes framework diagnostics.
dotnet-package-skills/​tests/​DotnetPackageSkills.Tests.csproj Configures multi-target tests.
dotnet-package-skills/​tests/​TempDirectory.cs Provides temporary test directories.
dotnet-package-skills/​tests/​FakeTerminal.cs Simulates terminal behavior.
dotnet-package-skills/​tests/​TerminalTextTests.cs Tests terminal text handling.
dotnet-package-skills/​tests/​TargetLocatorTests.cs Tests target discovery.
dotnet-package-skills/​tests/​SkillDiscoveryTests.cs Tests skill discovery and names.
dotnet-package-skills/​tests/​PickerLayoutTests.cs Tests picker layout and pagination.
dotnet-package-skills/​tests/​PackagePathResolverTests.cs Tests package path normalization.
dotnet-package-skills/​tests/​PackageListerTests.cs Tests package-list parsing.
dotnet-package-skills/​tests/​PackageCoordinateTests.cs Tests coordinate validation.
dotnet-package-skills/​tests/​OutputLayoutTests.cs Tests report whitespace and layout.
dotnet-package-skills/​tests/​InteractiveSkillsTests.cs Tests interactive choices.
dotnet-package-skills/​tests/​InstallManifestTests.cs Tests manifest validation and persistence.
dotnet-package-skills/​tests/​GlobalPackagesLocatorTests.cs Tests cache-path parsing.
dotnet-package-skills/​tests/​DestinationLockTests.cs Tests destination locking.
dotnet-package-skills/​tests/​CommandLineTests.cs Tests command-line behavior.
dotnet-package-skills/​tests/​CommandLineDiagnosticsTests.cs Tests diagnostic sanitization.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dotnet-package-skills/src/Cli/TerminalText.cs
Comment thread dotnet-package-skills/src/Skills/InstallManifest.cs
Comment thread dotnet-package-skills/src/NuGet/PackageCoordinate.cs Outdated
Comment thread dotnet-package-skills/src/NuGet/TargetLocator.cs Outdated
Comment thread eng/pipelines/dotnet-package-skills/stage.yml Outdated
Removed the 'Build from source' and 'License' sections from the README.
Preserve repeated escape introducers, validate and normalize consumed NuGet versions with NuGet.Versioning, reject linked manifest file entries, prune ignored and inaccessible target subtrees, and require nonempty native package staging. Add application regressions and update only affected behavior guidance; keep the minimal Arcade pipelines and bounded link-check scope.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Destination mutations are not transactionally synchronized with the manifest, and additional path, shell-escaping, and terminal-capability issues remain.

2 open findings
5 resolved since last review
Previously missed (4)

In code that hasn't changed since last review

Medium severity Require VT-capable terminals before entering interactive screens

dotnet-package-skills/​src/​Cli/​SkillPicker.cs:46

A non-redirected stream is not necessarily a VT-capable terminal. On Unix with TERM=dumb (or another terminal lacking the xterm alternate-buffer extension), this check passes and EnterInteractiveScreen emits raw ESC[?1049h/cursor-control sequences instead of rejecting interactive mode. Track interactive-screen capability separately from color support and fail with the existing guidance before emitting control sequences.

Medium severity Combine stdout and stderr diagnostics instead of discarding stdout

dotnet-package-skills/​src/​Infrastructure/​ProcessRunner.cs:13

When both streams contain text, any nonblank stderr output discards stdout entirely. Since dotnet commonly writes the actionable MSBuild/NuGet failure to stdout while a warning may appear on stderr, users can receive only the warning. Combine both non-empty streams in the diagnostic.

Medium severity Enforce portable skill-folder names on every OS

dotnet-package-skills/​src/​Skills/​SkillDiscovery.cs:72

On Unix, Path.GetInvalidFileNameChars() allows Windows-invalid names such as foo:bar, control characters, and reserved device names such as CON. Those names can be installed and committed, but then make the shared repository unusable on Windows; control-only names can also render as blank in reports and the picker. Use a fixed portable skill-folder policy (including Windows reserved characters/device names) on every OS.

Low severity Clarify bounded frontmatter parsing versus uninterpreted instructions

dotnet-package-skills/​README.md:499

This contradicts the preceding frontmatter section and the implementation: interactive install/uninstall reads and parses SKILL.md YAML through SkillDescriptionReader. Clarify that Markdown instructions are never interpreted, while bounded frontmatter is read for descriptions.

🧠 Review effort: Balanced

Comment thread dotnet-package-skills/src/SkillInstallService.cs Outdated
Comment thread dotnet-package-skills/src/Skills/SkillInstaller.cs
Remove repository-path command reconstruction and quoting plumbing from stale and package-conflict advice. Preserve the distinct removal options and sanitized report context, add focused application message regressions, and document the user-deferred non-transactional prerelease limitation without changing mutation behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

An incomplete package graph can be treated as zero references, causing uninstall --stale to remove every tracked skill.

1 open finding
2 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Low severity Document partial changes after failed non-transactional commands

dotnet-package-skills/​README.md:320

This claims every stopped command leaves the destination unchanged, but the non-transactional behavior documented at lines 542-545 (and in the PR description) says copy or manifest-write failures can leave partial skill changes and a stale manifest. Scripts should not rely on exit code 1 as evidence that nothing changed.

Low severity Clarify that SKILL.md YAML frontmatter is parsed

dotnet-package-skills/​README.md:500

This contradicts the interactive behavior documented at lines 224-228 and implemented by SkillDescriptionReader: the tool does read and parse YAML frontmatter inside SKILL.md. Narrow the statement to the Markdown/instruction body so users receive an accurate description of what package content is parsed.

🧠 Review effort: Balanced

Comment on lines +98 to +104
var report = Deserialize(json);

// Key on (id, version) because each resolved version has its own folder in the global
// packages cache. Keeping all versions also lets skill discovery report name collisions.
var found = new Dictionary<(string Id, string Version), PackageReferenceInfo>();

foreach (var framework in report.Projects?.SelectMany(p => p.Frameworks ?? []) ?? [])
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