Skip to content

build: keep one runtime band and construct property bags directly - #902

Draft
polewskm wants to merge 18 commits into
mainfrom
claude/confident-cerf-44sgmj
Draft

polewskm wants to merge 18 commits into
mainfrom
claude/confident-cerf-44sgmj

Conversation

@polewskm

Copy link
Copy Markdown
Contributor

Every Microsoft.Extensions, ASP.NET Core and EF Core package, the Npgsql EF Core provider and the .NET release's System packages resolve on the target framework's band at one patch, 10.0.15 ([ADR-1519](docs/decisions/1519-every-microsoft-extensions-aspnet-core-and-ef-core-package-is-on-the-target-frameworks-release-band.md)). The RequireRuntimeBand target in Directory.Build.targets fails a project that resolves one at another major, with build-guard fixture tests. Dependabot holds their major version.

The only package off the band is the Microsoft.Extensions.DependencyInjection(.Abstractions) pair. NCode.PropertyBag's floor holds it at 11.0.0, and RuntimeBandExceptions names it as the one exception, beside a comment that links #895. #895 stays open until NCodeGroup/PropertyBag ships a release on the 10.0 band.

The server registers no IPropertyBagFactory. Every operation with nothing to inherit starts from new PropertyBagDictionary(), and BannedSymbols.PropertyBag.txt bans the property-bag factories in every project. ADR-1518, ADR-1069, ADR-1127, the C# conventions, GOVERNANCE.md and the changelog describe this.

Protected paths changed:
.dockerignore
.github/dependabot.yml
.github/instructions/csharp-production.instructions.md
Directory.Build.targets
Directory.Packages.props
build/dod.ps1
build/tests/build-guards.tests.ps1

Closes #896
Refs #895


Generated by Claude Code

@polewskm
polewskm deployed to code-review November 22, 2026 02:44 — with GitHub Actions Active

@ncode-review ncode-review Bot 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.

🤖 NCode Review at 4026dc3: 6 new findings on the changed lines.

#region Constructor Tests

[Fact]
public void Constructor_RegistersNoPropertyBagFactory()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Nit: IServiceCollection local named services instead of serviceCollection F1 · conventions, rule-check

The new test declares var services = new ServiceCollection(); and uses services again at lines 16 and 19. The conventions name every IServiceCollection local serviceCollection, and that includes tests.

Consequence: The new file doesn't follow the repository's naming convention for service collections. Behavior is unaffected.

Fix: Rename services to serviceCollection in the declaration, the constructor argument and the Assert.DoesNotContain argument.

Evidence

csharp-testing.instructions.md / csharp-production.instructions.md: "Name an IServiceCollection serviceCollection", tests included.

Confidence 0.70.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Autopilot: fixed in 05ca4a3. The test names its collection serviceCollection, as csharp-testing.instructions.md asks.


Generated by Claude Code

2. A dependency is taken from a release whose target depends on the band, never forced by a pin or a suppressed
downgrade warning. While a dependency has no such release, the packages it raises are listed in the
`RuntimeBandExceptions` property of `Directory.Packages.props`, under a comment that names the dependency and links
the issue tracking its release, and stay at the version it needs: the

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Nit: Decision text names issue #​895 as bare text F2 · conventions, rule-check

Decision 2 writes "tracked in issue #​895" as plain text. ADR-1306 says a Markdown file links an issue by its address. The References section links it, but this sentence doesn't.

Consequence: GitHub doesn't autolink issue numbers inside committed files, so the reference isn't clickable in the rendered record.

Fix: Write issue [#895](https://github.com/NCodeGroup/identity/issues/895).

Evidence

ADR-1306 rule 4: a Markdown file links an issue by its address.

Confidence 0.50.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Autopilot: fixed in cb0c43d. Decision 2 links issue #895 by its address, as ADR-1306 asks.


Generated by Claude Code

Comment thread build/dod.ps1 Outdated
(ADR-1505).

The build guards stage checks the guards of Directory.Build.targets (ADR-1197, ADR-1385, ADR-1501) against fixture
The build guards stage checks the guards of Directory.Build.targets (ADR-1197, ADR-1385, ADR-1501, ADR-1519) against fixture

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Nit: Edited help line runs past 120 columns F3 · conventions, rule-check

Adding the ADR-1519 citation pushes the build-guards help line to about 128 columns, and the paragraph wasn't rewrapped.

Consequence: The line is wider than the surrounding help text, which wraps at about 120 columns.

Fix: Rewrap the paragraph so each line stays within about 120 columns.

Evidence

Rule: rewrap edited comment paragraphs to the width the file uses (about 120 columns).

Confidence 0.50.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Autopilot: fixed in 5acb9e7. The build guards paragraph of the .DESCRIPTION help is rewrapped within 120 columns, with the same words.


Generated by Claude Code

Comment thread .github/dependabot.yml
# The repository's analyzers build against the Roslyn that EF Core Design pins exactly, older than the Roslyn of every SDK global.json admits, so this version moves with EF Core Design, deliberately (ADR-1486, ADR-1493).
- dependency-name: 'Microsoft.CodeAnalysis.CSharp'
update-types: ['version-update:semver-major', 'version-update:semver-minor']
# The .NET release's packages stay on the target framework's band, so their major moves with the target framework, deliberately (ADR-1519).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Nit: Should the new major-version ignore rules name a tracking issue? F4 · rule-check

The seven new semver-major ignore rules share one comment that cites ADR-1519 and no issue, while the Dependabot rule asks for a comment naming the issue that tracks lifting the hold. Is the ADR meant to serve as the tracking record for this permanent hold?

Consequence: A reader can't tell from the file what ends the hold.

Fix: Name or file the issue that tracks the next target-framework move. If no issue is wanted, say in the comment that the hold lasts until the target framework moves.

Evidence

project-template.instructions.md, Dependabot: hold an upgrade back with an ignore rule whose comment names the issue that tracks lifting it.

Confidence 0.30.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Autopilot: not changed. The comment already says what ends the hold: the band's major "moves with the target framework, deliberately (ADR-1519)". This is a standing policy, not a hold on one upgrade waiting for an issue to lift it. It follows the form of the Microsoft.CodeAnalysis.CSharp entry just above it, whose deliberate hold also cites its ADRs and no issue.


Generated by Claude Code


_ = new IdentityServerBuilder(services);

Assert.DoesNotContain(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Nit: Absence test has no positive assertion and matches the type by string F5 · rule-check

The test only asserts that no descriptor's ServiceType.FullName is "NCode.PropertyBag.IPropertyBagFactory".

Consequence: The test still passes if the constructor registers nothing at all, or if the factory type is renamed.

Fix: Also assert that a descriptor the constructor should add is present, such as the event services or the in-process job dispatcher. If the package reference is acceptable, match by typeof(IPropertyBagFactory) instead of the string.

Evidence

Rule: a test of an absence also asserts something positive in the same run.

Confidence 0.35.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Autopilot: fixed in 05ca4a3. The test first asserts that the constructor registers IJobDispatcher, then that no NCode.PropertyBag.IPropertyBagFactory descriptor is present. The factory stays matched by its full name: BannedSymbols.PropertyBag.txt bans that type in every project, so typeof(IPropertyBagFactory) fails the build with RS0030.


Generated by Claude Code

{
#region Constructor Tests

[Fact]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Nit: Test name has no When segment F6 · rule-check

Constructor_RegistersNoPropertyBagFactory doesn't follow the Method_WhenState_ExpectedResult pattern.

Consequence: The name doesn't match the suite's naming pattern.

Fix: Rename it, for example to Constructor_WhenCreated_RegistersNoPropertyBagFactory.

Evidence

Rule: name test methods Method_WhenState_ExpectedResult.

Confidence 0.35.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Autopilot: fixed in 05ca4a3. The test is named Constructor_WhenCreated_RegistersNoPropertyBagFactory.


Generated by Claude Code

@ncode-review

ncode-review Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Superseded by the review at 5acb9e7.

@ncode-review ncode-review Bot 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.

Approved at 4026dc3: no blocker or should-fix finding remains.

@codecov

codecov Bot commented Nov 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #902      +/-   ##
==========================================
- Coverage   95.94%   95.94%   -0.01%     
==========================================
  Files        2205     2205              
  Lines       99612    99611       -1     
  Branches      202      202              
==========================================
- Hits        95570    95568       -2     
- Misses       4042     4043       +1     
Flag Coverage Δ
dotnet 95.78% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor Author

/review


Generated by Claude Code

@ncode-review

ncode-review Bot commented Nov 22, 2026

Copy link
Copy Markdown

🤖 Review complete

Verdict: ✅ Approve — Re-review of what changed since the last review at 4026dc3: 3 hunks in 3 files and changes taken back in 3 files, by correctness only. Earlier findings: F1 fixed, F2 fixed, F3 fixed, F4 answered, F5 fixed, F6 fixed. No further findings above nits.

Approval: Approved — no blocker or should-fix finding remains.

1 reviewer run — 0 findings (run details)

Reviewer Model Findings Top
correctness sonnet-5-5 0 🟢

Trial: findings are posted as review threads and in the check run. $0.07 on Amazon Bedrock, 13s, at 5acb9e7. (how to interact)

@ncode-review ncode-review Bot 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.

Approved at 5acb9e7: no blocker or should-fix finding remains.

This branch was successfully deployed

1 active (outdated) deployment
code-review — 4026dc36 Deployed Nov 22, 2026 by polewskm via review #2014
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.

Resolve the unused property-bag factory registration

1 participant