From 5858df3fe05e4bed927610c37a630bf001ae60fc Mon Sep 17 00:00:00 2001 From: Oleg <18466855+EvaTheSalmon@users.noreply.github.com> Date: Tue, 21 Jul 2026 18:55:02 +0300 Subject: [PATCH] build(hygiene): ship symbols, gate warnings, align casing (#121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Four build-infrastructure gaps from the issue, plus the deployed paths that carried the same defect. Release shipped no symbols: DebugSymbols=False and DebugType=None meant every stack trace in the Serilog file landed without a file or line number. The log was never empty — exceptions are passed as objects and the template renders them, so type, message and the frame chain all arrived — but the ` in :line ` suffix did not, and on a long trace through the sync executor knowing the method is not enough to know which branch threw. DebugType=portable now, and the installer picks the PDB up on its own because it copies the publish directory whole. Nothing enforced the zero-warning state, so it could rise silently. TreatWarningsAsErrors and EnforceCodeStyleInBuild are set centrally. NuGet audit codes NU1900-NU1904 are exempt: an advisory published against a transitive package, or an unreachable audit feed, would otherwise fail CI with no change in the repository. AnalysisLevel is deliberately absent for the same reason — global.json rolls forward across feature bands, so `latest` would move on its own. EnforceCodeStyleInBuild alone did not gate the .editorconfig naming rules. The dotnet_naming_rule severities drive the IDE; build enforcement reads dotnet_diagnostic.IDE1006.severity, which was unset. Adding that one line is what makes the gate bite, and it matters because CI runs no dotnet format step and the pre-commit hook is not versioned — a fresh clone has no style enforcement at all without it. InternalsVisibleTo was declared two ways, the SDK item in Core and a raw AssemblyAttribute in UI. One spelling now, matching Core. The assembly was named Semistep while the product and every namespace are SemiStep. The name is load-bearing in XAML: eleven avares:// URIs and one assembly= reference resolve against it, and the headless suite boots the real App, so a broken rename would have failed all 615 AvaloniaFact tests as a group. It did not. The deployed C:\DISTR\Config\ and C:\DISTR\Logs\ roots are recased to match, in StartupOptions and in the installer, which duplicate those literals by hand with nothing checking that they agree. The six [InstallDelete] entries clearing the legacy flat config layout are removed rather than recased. No machine carries that layout, so the cleanup has nothing left to do. Verified: clean Release build 0 warnings 0 errors, 1444 tests passed, publish emits SemiStep.pdb, ISCC compiles the installer with the new defines, and both gates were proven to bite by introducing a violation and watching the build fail. Closes #121 Co-Authored-By: Claude Opus 4.8 (1M context) --- .editorconfig | 4 + .github/workflows/ci.yml | 4 + .run/Debug MBE.run.xml | 4 +- .run/Debug MOCVD.run.xml | 4 +- .run/Debug RIE.run.xml | 4 +- .run/Perf Gates.run.xml | 2 +- .run/Publish.run.xml | 2 +- .run/dotnet_restore.run.xml | 6 +- .zed/debug.json | 6 +- CLAUDE.md | 4 + Docs/architecture/build-and-deployment.md | 84 ++++ Docs/architecture/ui-localization.md | 4 +- Docs/perf/README.md | 2 +- Docs/plans/20260721-build-hygiene.md | 441 ++++++++++++++++++ Docs/readme.md | 2 +- Installer/SemiStep.iss | 43 +- SemiStep/Directory.Build.props | 11 +- SemiStep/SemiStep.UI/App.axaml | 6 +- SemiStep/SemiStep.UI/Assets/Icons/README.md | 2 +- .../MainWindow/RecipeToolBar.axaml | 14 +- .../Transposed/TransposedRecipeGridView.axaml | 2 +- SemiStep/SemiStep.UI/SemiStep.UI.csproj | 6 +- SemiStep/SemiStep.UI/StartupOptions.cs | 4 +- .../SemiStep.UI/Styles/DataGridStyles.axaml | 2 +- 24 files changed, 599 insertions(+), 64 deletions(-) create mode 100644 Docs/architecture/build-and-deployment.md create mode 100644 Docs/plans/20260721-build-hygiene.md diff --git a/.editorconfig b/.editorconfig index 56e85e0b..93cf8d12 100644 --- a/.editorconfig +++ b/.editorconfig @@ -174,6 +174,10 @@ csharp_wrap_before_ternary_opsigns = true #### Naming Conventions #### +# The per-rule severities below drive the IDE only. Build enforcement of naming +# (EnforceCodeStyleInBuild) reads the IDE1006 diagnostic severity. +dotnet_diagnostic.IDE1006.severity = warning + # Naming rules dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5965fd35..d3c6aeaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,14 +5,18 @@ on: branches: [master, main] paths: - ".github/workflows/ci.yml" + - ".editorconfig" - "SemiStep/**" + - "SemiStep.slnx" - "ConfigFiles/**" - "global.json" - "!**.md" pull_request: paths: - ".github/workflows/ci.yml" + - ".editorconfig" - "SemiStep/**" + - "SemiStep.slnx" - "ConfigFiles/**" - "global.json" - "!**.md" diff --git a/.run/Debug MBE.run.xml b/.run/Debug MBE.run.xml index ed0f4be8..06ef6d91 100644 --- a/.run/Debug MBE.run.xml +++ b/.run/Debug MBE.run.xml @@ -1,7 +1,7 @@ - + -