docs: ADR 0002 pack gate + trim Directory.Build narration - #785
Conversation
Appending a positional-record parameter removes the old constructor, so package validation fails CP0002 until a suppression is checked in and later deleted with the baseline bump. Drop incident history from the repo-shell comments and keep the constraints those comments exist for. Co-authored-by: Tyler Kron <tylerkron@gmail.com>
PR Summary by QodoDocument package-validation gate and streamline build comments
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
…trimmed reasons ADR 0002's pack-gate note read as if the current tree already fails package validation. It does not: the note is about a future PR that appends a positional-record parameter. Reworded to say so, and corrected against an actual pack with a probe parameter appended: CP0002 fires for the old-arity constructor and Deconstruct on both TFMs, and a stale suppression fails the pack with "Unnecessary suppressions found", so removing it at the baseline bump is required. Restored the load-bearing reasons the trim lost: the rule names and the every-await scope for CA2007, the precise CA1707 api_surface=all fallout (private static readonly _camelCase fields, verified by building with it), why the generated file cannot be annotated for RS0041, and why EmbedUntrackedSources restates an SDK default. Comments only; no setting, severity or MSBuild value changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 2ddf907 |
|
Qodo-clean, CI green — ready for review |
Summary
ADR 0002 says that appending a parameter to a public positional record is not a breaking change. It never says that
dotnet packstill fails when you do it. The next contributor who appends a record field would hitCP0002from package validation with nothing in the ADR explaining it. Separately, the comments in.editorconfig,Directory.Build.propsandDirectory.Build.targetshad grown into project history (file counts, "Daqifi.Mcp never opted in", "#644 shipped with none of this"), which buried the reasons a maintainer actually needs.This PR changes only the ADR and comments. It changes no analyzer severity, TFM, MSBuild property or build logic.
ci.yml,DEVICE_INTERFACES,CONTRIBUTING.md, and the packed README consumer policy are untouched.dotnet packwithCP0002for the old-arity constructor andDeconstruct(both TFMs) against the nuget.org baseline. That is expected under this decision. The same PR treats it as the intentional breakCONTRIBUTING.md("The published package is the second opinion") describes: remove the old signatures fromPublicAPI.Shipped.txtand check in the generatedCompatibilitySuppressions.xml. The suppressions must then be removed in the change that bumpsPackageValidationBaselineVersion, because a stale suppression fails the pack as "Unnecessary suppressions found"..editorconfig. Drops the 142-vs-~200 namespace-style story and the lists of files. Each rule keeps its name and reason:SynchronizationContext(bug(transport): sync Connect()/factory helpers deadlock under a SynchronizationContext — connect path lacks ConfigureAwait(false) #495).publicbecauseallflags private static readonly_camelCasefields.Directory.Build.props. Drops the "Daqifi.Mcp never opted in" note and the chore(build): decide whether Daqifi.Mcp should multi-target net9.0;net10.0 like Daqifi.Core #643 TFM-asymmetry story. Keeps "do not set TargetFramework here" and theTargetFrameworkTestspointer.Directory.Build.targets. Drops "Daqifi.Mcp shipped with none of this (chore(build): the published Daqifi.Mcp package has no license, project URL, repository URL, tags, or SourceLink #644)" and shortens the EmbedUntrackedSources paragraph to one line: it restates an SDK default on purpose, so nobody removes it as redundant. Keeps theIsPackableimport-order note, the coverlet/ContinuousIntegrationBuildwarning, and the explicitCompanycomment.Verification
origin/mainwith this branch: the.editorconfignon-comment lines are identical, and the comment-stripped C14N XML of bothDirectory.Build.*files is identical. So no values, conditions or severities changed.ChannelAcquisitionStatistics: CP0002 fired for the ctor andDeconstructon net9.0 and net10.0.-p:ApiCompatGenerateSuppressionFile=truewrotesrc/Daqifi.Core/CompatibilitySuppressions.xml, and the next pack consumed it automatically. After I reverted the probe, that file failed the pack as unnecessary. Nothing from the probe is committed.api_surface = all. Only a private static readonly_camelCasefield and seven private SCREAMING_SNAKE consts were reported; instance_camelCasefields were not.dotnet build Daqifi.Core.slnis clean, anddotnet pack src/Daqifi.Core/Daqifi.Core.csprojpasses on this tree.🤖 Generated with Claude Code