Repository navigation
Description
What's wrong
Every CI run on main since 2026-10-13 fails in ci / .NET / Analyze & Release, with Release workflow failed: Pack failed for 1 project(s): CredentialCache (exit code 1). Tests pass on Windows, macOS and Ubuntu. Only dotnet pack fails, at package validation (Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5)):
error : API compatibility errors between 'lib/net9.0/ktsu.CredentialCache.dll' (left) and 'lib/net10.0/ktsu.CredentialCache.dll' (right):
error CP0015: Cannot change arguments of attribute 'System.Runtime.CompilerServices.NullableContextAttribute' on 'System.Diagnostics.CodeAnalysis.ExperimentalAttribute'.
error CP0014: Cannot remove attribute 'System.Runtime.CompilerServices.NullableContextAttribute(2)' from 'System.Runtime.CompilerServices.DefaultInterpolatedStringHandler'.
error CP0014: Cannot remove attribute 'System.Runtime.CompilerServices.NullableAttribute(2)' from 'System.Diagnostics.CodeAnalysis.ExperimentalAttribute.UrlFormat'.
...
All of the diagnostics are on Polyfill's embedded shim types (ExperimentalAttribute, DefaultInterpolatedStringHandler), not on this library's API. Scheduled runs passed through 2026-10-12 and have failed every day from 2026-10-13, the day Polyfill went from 11.4.3 to 11.4.5 (375f037). Seen in run 38482441346 (Oct 13) and run 41931065167 (Nov 4). I matched the cause by timing and didn't bisect, but it is the same Polyfill 11.4.5 shim drift that the sibling repositories have already fixed:
- Add CompatibilitySuppressions.xml for the Polyfill 11.4.5 shim drift [patch] DelegateTransform#91
- Add CompatibilitySuppressions.xml for the Polyfill 11.4.5 shim drift [patch] NJsonSchemaJsonConverter#112
- Regenerate CompatibilitySuppressions.xml after the Polyfill 11.4.5 bump [patch] Sorting#73
- Regenerate CompatibilitySuppressions.xml for the TFMs the SDK now builds [patch] ScopedAction#86
- Regenerate CompatibilitySuppressions.xml after the Polyfill 11.4.5 bump [patch] RoundTripStringJsonConverter#134
Unlike those repositories, CredentialCache has no CredentialCache/CompatibilitySuppressions.xml at all.
Why it matters
- The latest release is still v1.3.63-pre.3 (2026-10-09). Let consumers register their own Credential subclasses [minor] #194 (
CredentialSerialization.RegisterDerivedType, a[minor]that closes Saving a consumer-defined Credential subclass throws raw NotSupportedException on every platform store, but succeeds on InMemoryCredentialStore #171) is merged but unreleased. Consumers still get a rawNotSupportedExceptionon every platform store when they save their ownCredentialsubclass. - Any fix merged for the open bugs (TryGet on Windows and macOS frees the OS-returned plaintext buffer without zeroing it, so every load leaves a copy of the secret in freed heap #173, Windows rejects a 2400-char base64 token as over the 2560-byte limit: JSON escaping writes every '+' and non-ASCII char as \uXXXX (6 bytes) #175, Windows: a store for service "MyApp" enumerates, loads and deletes the credentials of service "MyApp:Dev", because target names are joined with ':' unescaped #176, A stored "Token":null or "Password":null loads as a found credential with a null non-nullable property, and the caller's first read throws NullReferenceException #180, macOS Save throws errSecDuplicateItem (-25299) when another writer creates the same item between find and add #183, Saving a credential leaves its plaintext JSON in ArrayPool<byte>.Shared: zeroing the byte[] from SerializeToUtf8Bytes misses System.Text.Json's pooled copy #185, RegisterDerivedType accepts subclasses System.Text.Json can't round-trip: they save but never load, and one bad registration breaks Save/TryGet for every credential type until restart #197–Linux: personas "alice" and "alice\0mallory" (or two lone-surrogate variants) share one Secret Service entry, so after a restart one loads, overwrites and deletes the other's secret #199) won't ship until pack is green.
- A
mainthat is red every day hides any new, real failure.
Suggested fix
Do what the sibling repositories above did. Build with the SDK CI uses (Windows runner, SDK 10.0.403), run dotnet pack CredentialCache/CredentialCache.csproj -c Release -p:ApiCompatGenerateSuppressionFile=true, and commit the generated CredentialCache/CompatibilitySuppressions.xml. It should cover the net9.0 → net10.0 pair.
Note: once pack passes, publishing will still hit the org-wide expired NuGet.org API key (ktsu-dev/.github#48), which is failing the other repositories' releases right now. Both have to be fixed before a release reaches nuget.org.
Acceptance criteria
dotnet pack -c ReleaseofCredentialCachesucceeds with package validation on and suppression generation off.- The next CI run on
maingets past the pack step of Analyze & Release.
Activity
matt-edmondson commentedon Nov 5, 2026
Triage
[minor]Let consumers register their own Credential subclasses [minor] #194 (closes Saving a consumer-defined Credential subclass throws raw NotSupportedException on every platform store, but succeeds on InMemoryCredentialStore #171) and any fix for the eleven open bugs (TryGet on Windows and macOS frees the OS-returned plaintext buffer without zeroing it, so every load leaves a copy of the secret in freed heap #173–Linux: personas "alice" and "alice\0mallory" (or two lone-surrogate variants) share one Secret Service entry, so after a restart one loads, overwrites and deletes the other's secret #199) cannot reach consumers, and withmainred every day a new, real failure would go unnoticed. Library behaviour is unaffected, and the fix is small and has been done before, so this is not Critical.CredentialCache/CompatibilitySuppressions.xml, generated with-p:ApiCompatGenerateSuppressionFile=trueon the CI SDK (Windows, 10.0.403), for the net9.0 → net10.0 pair. The siblings already fixed it this way (DelegateTransform#91, NJsonSchemaJsonConverter#112, Sorting#73, ScopedAction#86, RoundTripStringJsonConverter#134).dotnet pack, so Dependabot auto-merged a Polyfill bump that broke releases in ~19 repos: package validation only runs in the post-merge Release step .github#41: PR CI never runsdotnet pack, so the Polyfill bump to 11.4.5 auto-merged. Once pack passes, publishing is still blocked by NuGet.org returns 403 "The specified API key has expired" on publish, so releases fail after reaching GitHub Packages but never reach nuget.org .github#48 (the NuGet.org API key has expired). Both must be fixed before a release reaches nuget.org.mainrun gets past the pack step of Analyze & Release.Generated by Claude Code