Skip to content

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

Merged
kartheekp-ms merged 22 commits into
mainfrom
kartheekp-ms-arcade-tool-signing
Oct 16, 2026
Merged

kartheekp-ms merged 22 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
kartheekp-ms force-pushed the kartheekp-ms-arcade-tool-signing branch from 4f4fe49 to 8bf8e23 Compare October 6, 2026 17:22
@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

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

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 thread dotnet-package-skills/src/NuGet/PackageLister.cs Outdated
@Nigusu-Allehu
Nigusu-Allehu self-requested a review October 13, 2026 23:04
Comment thread dotnet-package-skills/src/SkillInstallService.cs Outdated
Comment thread dotnet-package-skills/src/Skills/SkillInstaller.cs

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

Unresolved validation and sanitization defects can cause unintended removals, untracked installations, and exposed escape payloads.

4 open findings
1 resolved since last review

🧠 Review effort: Balanced

Comment thread dotnet-package-skills/src/Cli/TerminalText.cs
Comment thread dotnet-package-skills/src/NuGet/PackageLister.cs Outdated
Comment thread dotnet-package-skills/src/Program.cs Outdated
Comment thread dotnet-package-skills/src/Skills/SkillDiscovery.cs

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

Unresolved subprocess timeout and manifest-entry validation issues can leave commands blocked or copied skills untracked.

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

In code that hasn't changed since last review

Medium severity Correctly report when no skills are removed

dotnet-package-skills/​src/​Cli/​OutputWriter.cs:164

removed contains only skills matching the filters and interactive selection, not the full inventory. uninstall --package Missing can therefore claim that no installed skills exist, and accepting a stale-skill picker with nothing checked can claim that no stale skills exist. Report only that no skills were removed (or would be removed for a dry run).

Medium severity Reject manifest paths that are existing directories

dotnet-package-skills/​src/​Skills/​InstallManifest.cs:369

An ordinary directory named .dotnet-package-skills.json passes this guard. Load then treats it as a missing manifest because File.Exists returns false for directories. Installation can copy skills before saving inevitably fails, while uninstall reports no tracked skills. Reject FileAttributes.Directory here so this invalid existing manifest entry fails before skill changes; this does not require transactional persistence.

🧠 Review effort: Balanced

Comment thread dotnet-package-skills/src/Infrastructure/ProcessRunner.cs

@Nigusu-Allehu Nigusu-Allehu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I reviewed this using agents as it is a lot of code and it looks good.

kartheekp-ms and others added 3 commits October 16, 2026 11:55
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>
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>
kartheekp-ms and others added 19 commits October 16, 2026 11:55
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.
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>
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>
Accept ID or ID@VERSION for install and list without guessing package-directory versions. Keep explicit and uninstall behavior, deduplicate resolved identities, and standardize shipped terminology to NuGet global-packages directory with aligned context output and focused application regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove the user-rejected longest-label padding helper and alignment-only regression. Restore original Target and Destination formatting while retaining the exact NuGet global-packages directory label and all manifest-resolved bare package selection changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use manifest versions first, then resolve only untracked bare install/list selectors from an explicit or auto-discovered target. Keep exact selectors and uninstall behavior unchanged, and cover the command, service, and native CLI contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
Allow install to reuse a genuinely empty ordinary destination directory while preserving collisions for populated folders and reparse points. Cover actual install, dry-run, nonempty entries, and linked destinations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
Fail closed when dotnet list package omits framework or top-level package data so target discovery and stale uninstall cannot treat an unrestored project as an empty reference set.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
Stop cross-version installs before mutation when a tracked skill cannot be replaced because its destination is a file, while preserving same-version collision behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
Normalize explicit relative global-packages overrides against the invocation directory while retaining the target directory for implicit NuGet configuration discovery.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
Treat an omitted topLevelPackages property as an empty package set for a present framework, matching .NET 10 SDK output while retaining fail-closed handling for projects without frameworks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
Return nested escape introducers to the outer sanitizer so interrupted CSI controls cannot expose a following escape-string payload.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
Fail closed when dotnet list package omits or nulls the root projects array while preserving an explicitly empty project list.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
Use the parsed boolean value when validating uninstall combinations so an explicit false cannot bypass target validation or trigger stale/package conflicts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
Ignore package skill directories that case-insensitively match the install manifest filename so installation cannot copy a directory onto the ownership record path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f04f4926-3512-4a7d-b18c-90dc3aa57d70
@kartheekp-ms
kartheekp-ms force-pushed the kartheekp-ms-arcade-tool-signing branch from e06e72e to a68d2db Compare October 16, 2026 18:55
@kartheekp-ms
kartheekp-ms merged commit 7ca8180 into main Oct 16, 2026
1 check passed
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.

3 participants