source-build-investigation

Diagnose source-build failures in dotnet/dotnet VMR CI builds.

1.2k|337|Updated Oct 13, 2022
One-click install
npx skills add https://github.com/dotnet/dotnet --skill source-build-investigation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: source-build-investigation
Source: https://github.com/dotnet/dotnet/tree/main/.github/skills/source-build-investigation
Command: npx skills add https://github.com/dotnet/dotnet --skill source-build-investigation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Investigating source-build failures in the dotnet/dotnet VMR requires navigating complex CI artifacts, prebuilt package reports, poison leak detection, and multi-repo build ordering, which is difficult without deep knowledge of the source-build pipeline.

Core Features & Use Cases

  • Prebuilt Package Analysis: Interpret prebuilt-usage.xml reports to identify which packages lack source-built equivalents and trace them to direct or transitive dependencies.
  • Poison and Binary Leak Detection: Diagnose poisoned package leaks and unexpected new binaries flagged by the finish-source-only validation step.
  • Stage 2 Build Triage: Investigate failures that occur only in offline stage 2 (bootstrapping) legs that rebuild the product with the source-built SDK.
  • Use Case: A CI leg named SB_CentOSStream10_Online_MsftSdk_x64 fails with a prebuilt error. Use this Skill to download the prebuilt-usage.xml from the build artifacts, identify the offending package version, and determine whether it needs an SBRP reference package or a build-order fix.

Quick Start

Investigate why the SB_CentOSStream10_Online_MsftSdk_x64 leg failed in build 20240501.3 and identify the prebuilt packages causing the failure.

Frequently Asked Questions about source-build-investigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I investigate a source-build failure in dotnet/dotnet CI?

Download the BuildLogs artifact from the failing SB_ leg and inspect artifacts/log/Release/prebuilt-usage.xml for prebuilt package usages. The File field in each usage entry encodes which repo and project pulled in the prebuilt package.

What is a prebuilt package in .NET source-build?

A prebuilt is a Microsoft-built binary package used during the build instead of one compiled from source. Source-build flags these because Linux distributions must build .NET entirely from source, and prebuilts violate that requirement.

What is the difference between SBRP and PSB packages?

SBRP (source-build-assets) provides API-only reference stubs with throw-null implementations that satisfy compile-time references but cannot execute. PSB (previously-source-built) packages are real executable nupkgs downloaded from the prior source-build during the Prep step.

Why does a build fail only in stage 2 but not stage 1?

Stage 2 rebuilds the product using the source-built SDK from stage 1, so failures indicate dependencies that work with Microsoft-built inputs but not source-built ones. Common causes include analyzer behavior differences or version mismatches between expected and source-built packages.

How do I fix a poison leak detection failure?

Poison failures mean Microsoft-built binaries leaked into the final output, detected via marked PSB assemblies. Review the poison report in the build logs, trace which repo introduced the leaked assembly, and ensure it resolves the source-built version instead.

When should this Skill not be used for CI failures?

Do not use it for regular CI test failures, codeflow staleness, dependency flow tracing, crash dumps, or general NuGet package management unrelated to source-build. It applies only to failures in SB_ prefixed job legs.