Rename namespace and package to ptr727.Utilities#384
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #384 +/- ##
===========================================
+ Coverage 40.23% 40.62% +0.38%
===========================================
Files 10 10
Lines 1009 1024 +15
Branches 97 99 +2
===========================================
+ Hits 406 416 +10
- Misses 577 580 +3
- Partials 26 28 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Renames the Utilities library’s NuGet package id and root namespace from InsaneGenius.Utilities to ptr727.Utilities, updates Sandbox and tests to match, and includes related analyzer-suppression cleanups plus a culture-invariant fix for byte-size formatting.
Changes:
- Renamed namespaces/usings across library, tests, and Sandbox; updated
PackageId,RootNamespace,AssemblyName, andInternalsVisibleTo. - Added GlobalUsings for logging/Serilog/xUnit and removed redundant per-file
usingdirectives. - Made
Format.BytesToKibi/BytesToKilooutput culture-invariant and localized several analyzer suppressions to[SuppressMessage].
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| UtilitiesTests/UtilitiesTests.csproj | Updates test project metadata to new package/namespace naming and assembly name. |
| UtilitiesTests/UtilitiesTests.cs | Updates test project namespace and adjusts the (now-empty) fixture type. |
| UtilitiesTests/StringHistoryTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/StringCompressionTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/StringCompressionAsyncTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/LogOptionsTests.cs | Moves to new test namespace and relies on global xUnit usings. |
| UtilitiesTests/GlobalUsings.cs | Adds global using Xunit; to centralize test imports. |
| UtilitiesTests/FormatTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/FileTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/FileExAsyncTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/ExtensionsTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/DownloadTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/DownloadAsyncTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/ConsoleTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/CommandLineTests.cs | Moves to new test namespace and removes redundant fixture field/ctor usage. |
| UtilitiesTests/.editorconfig | Removes now-unneeded test suppressions after fixture cleanup. |
| Utilities/Utilities.csproj | Renames package/root namespace and aligns assembly name and InternalsVisibleTo target. |
| Utilities/StringHistory.cs | Renames library namespace to ptr727.Utilities. |
| Utilities/StringCompression.cs | Renames library namespace to ptr727.Utilities. |
| Utilities/LogOptions.cs | Renames library namespace and relies on global logging using. |
| Utilities/GlobalUsings.cs | Adds global using Microsoft.Extensions.Logging; for the library. |
| Utilities/Format.cs | Renames namespace and makes byte formatting culture-invariant. |
| Utilities/FileExOptions.cs | Renames library namespace to ptr727.Utilities. |
| Utilities/FileEx.cs | Renames namespace, relies on global logging using, and adds targeted CA5394 suppressions. |
| Utilities/Extensions.cs | Renames namespace, relies on global logging using, and adds targeted CA1034 suppression. |
| Utilities/Download.cs | Renames namespace, relies on global logging using, updates product naming, and adds targeted CA1024/CA1054 suppressions. |
| Utilities/ConsoleEx.cs | Renames library namespace to ptr727.Utilities. |
| Utilities/CommandLineEx.cs | Renames library namespace to ptr727.Utilities. |
| Utilities/.editorconfig | Updates analyzer suppression approach to prefer symbol-scoped [SuppressMessage] where appropriate. |
| Sandbox/Sandbox.csproj | Renames Sandbox root namespace to ptr727.Utilities.Sandbox. |
| Sandbox/Program.cs | Updates usings to the renamed namespaces and relies on global Serilog using. |
| Sandbox/LoggerFactory.cs | Renames Sandbox namespace and relies on global Serilog using. |
| Sandbox/GlobalUsings.cs | Adds global using Serilog; for the Sandbox project. |
| README.md | Updates docs for new package id/namespace and marks breaking changes consistently. |
| HISTORY.md | Documents the breaking rename and related release notes for v3.7. |
| codecov.yml | Updates commentary to reference the renamed library. |
| AGENTS.md | Updates repository agent documentation to the new published package name. |
Fold the namespace/package rename into the breaking 3.7 release and align with the ptr727.* style of the sibling LanguageTags project. - Rename InsaneGenius.Utilities -> ptr727.Utilities across namespaces, PackageId and RootNamespace; use bare AssemblyName (Utilities / UtilitiesTests) and InternalsVisibleTo, matching LanguageTags (breaking). - Move localized library suppressions CA1024/CA1034/CA1054/CA5394 from Utilities/.editorconfig to symbol-scoped [SuppressMessage] attributes, per CODESTYLE's narrowest-scope preference. - Remove dead test suppressions CA1307 and CA2007, and drop the unused IClassFixture _fixture fields and the empty IDisposable fixture, removing the CA1823/IDE0052/CA1063 suppressions. - Make Format.BytesToKibi/BytesToKilo culture-invariant via FormattableString.Invariant, fixing locale-dependent decimal digits. - Add GlobalUsings.cs to the library (Microsoft.Extensions.Logging) and Sandbox (Serilog); add global using Xunit to the tests. - Document both breaking 3.7 changes (namespace and logging) consistently in README and HISTORY. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
ptr727
force-pushed
the
feature/rename-namespace-ptr727
branch
from
July 10, 2026 02:39
3404faf to
d9e9b0d
Compare
…xture - Use a deliberate "ptr727.Utilities" constant for the HttpClient User-Agent product name instead of deriving it from the bare "Utilities" assembly name, resolving the assembly-name/fallback inconsistency. - Remove the now-empty UtilitiesTests fixture and drop IClassFixture<UtilitiesTests> from all test classes; the LogOptions collection (separate LogOptionsCollectionDefinition) is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Identify the caller (consuming executable) for the HttpClient User-Agent instead of hardcoding or falling back to this library's own assembly: try the managed entry assembly name, then the OS-level process executable name (Environment.ProcessPath), then a generic value. Assembly-to-file metadata is unreliable under NativeAOT (dotnet/runtime#122457), so this avoids Assembly.GetExecutingAssembly()/Location. The User-Agent is added via ProductInfoHeaderValue.TryParse so a non-token app name cannot throw. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Per AGENTS.md comment rules (no naming other repos), state the NativeAOT limitation without the external issue reference. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
If the derived product name is not a valid HTTP token (e.g. a process executable name with spaces), fall back to Unknown/<version> so a User-Agent header is always set, matching the prior always-set behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Break the ignore-note comment after the clause comma so the two lines read naturally instead of splitting "the shipped ptr727.Utilities library". Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
ptr727
added a commit
that referenced
this pull request
Jul 10, 2026
Promotes the `ptr727.Utilities` rename from `develop` to `main`, folded into the breaking **3.7** release. Full detail and review history in #384. ## Highlights - **Rename (breaking):** `InsaneGenius.Utilities` -> `ptr727.Utilities` across namespaces, `using` directives, `PackageId`, and `RootNamespace`; bare `AssemblyName` (`Utilities` / `UtilitiesTests`) and `InternalsVisibleTo`, matching the sibling `LanguageTags` project. Both 3.7 breaking changes (namespace **and** the logging model) are marked consistently in README and HISTORY. - **Analyzer suppressions:** localized library exceptions (CA1024/CA1034/CA1054/CA5394) moved to symbol-scoped `[SuppressMessage]`; dead test suppressions (CA1307/CA2007) and the vestigial `IClassFixture` fixture removed (CA1823/IDE0052/CA1063). - **Bug fix:** `Format.BytesToKibi`/`BytesToKilo` are now culture-invariant. - **HttpClient User-Agent:** derived from the consuming application (AOT-safe), always sets a header. - **GlobalUsings.cs** added per project. ## Verification - 133/133 tests, 0 warnings, clean `dotnet format` + editorconfig, NativeAOT publish verified. - All #384 review threads resolved; Copilot's final pass generated no new comments. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This was referenced Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the library from
InsaneGenius.Utilitiestoptr727.Utilities, folded into the breaking 3.7 release, and aligns the identifier style with the siblingLanguageTagsproject. Also includes a set of analyzer-suppression and formatting cleanups surfaced while doing the rename.Changes
Namespace / package rename (breaking)
InsaneGenius.Utilities->ptr727.Utilitiesacross all namespaces,usingdirectives,PackageId, andRootNamespace.AssemblyName(Utilities,UtilitiesTests) andInternalsVisibleTo, matching theptr727.LanguageTags/LanguageTagssplit upstream.(breaking)notation.Analyzer suppressions (CODESTYLE alignment)
CA1024,CA1034,CA1054,CA5394moved fromUtilities/.editorconfigto symbol-scoped[SuppressMessage]attributes with justifications (narrowest scope;CA1034matches the CODESTYLE example).CA1307,CA2007) that a probe build proved never fire.IClassFixture_fixturefields and the emptyIDisposabletest fixture, which eliminates theCA1823/IDE0052/CA1063suppressions entirely.Bug fix — culture-dependent byte formatting
Format.BytesToKibi/BytesToKiloused{value:F}with no precision, so the fractional digit count followed the ambient culture. Now usesFormattableString.Invariant, making output deterministic. Fixes 6 tests that fail under non-en-US / POSIX (C.UTF-8) number formatting.GlobalUsings
GlobalUsings.csto the library (Microsoft.Extensions.Logging) and Sandbox (Serilog); addedglobal using Xunit;to the tests. Removed the now-redundant per-fileusingdirectives.Verification
dotnet build -c Release— 0 warnings, 0 errors (underTreatWarningsAsErrors).dotnet test— 133 / 133 pass (was 127/6 locally; the 6 were the culture bug fixed here).dotnet format style --verify-no-changes --severity=info— clean..editorconfig.Related
LogOptions.CreateLoggerread-once (TOCTOU) fix that this repo already carries.🤖 Generated with Claude Code