Reorganize source and tests around domain-aligned namespaces - #103
Conversation
Mechanical move of the Core Protocol/ grab-bag and Transport strays into
domain homes: Display/{Protocol,Session,Catalog}, Leds/, Devices/
(+Identity/, +Profiles/ absorbing the former Profiles/ root), Tuning/,
with ReportElicit joining Transport/. Namespaces follow folders under
the unchanged FanaBridge root namespace; Col03FrameClassifier's stale
FanaBridge.Protocol declaration corrected to FanaBridge.Transport.
Core-subject tests move to tests/FanaBridge.Tests/Core/<domain>/
mirroring their subjects (per-project-root convention: Core/, Plugin/,
Updater/).
One reference-form change rides along: IFanatecLedModuleHost's
Profiles.WheelCapabilities parameter is now unqualified under
using FanaBridge.Devices.Profiles (the old prefix resolved via an
ancestor namespace that no longer exists).
No behavior, API, visibility, or resource changes; RootNamespace,
Resources/, and root-namespace Log are untouched. 748/748 tests green;
ILRepack merged build clean.
…gin.* (issue #102) The plugin's Adapters/ grab-bag is gone: Display/{Drivers,DisplaySettings}, Leds/, Devices/, Settings/ (absorbing root FanatecPluginSettings), ControlMapper/, and UI/ (IDevicePanelFactory). DiagnosticsReport's stale FanaBridge.Protocol declaration corrected to its Diagnostics home. Plugin production namespaces now carry the per-project root FanaBridge.Plugin.<path> (ratified on #102): the shipped DLL merges all assemblies, so the Core/plugin boundary must survive in type names. Core keeps clean FanaBridge.* namespaces. Documented exceptions: FanatecPlugin and the root logging types stay in namespace FanaBridge (the plugin FQN is persisted user state in SimHub); ConverterCaptureProbe is deferred to the friend-access commit. Domain taxonomies are project-local (also ratified): plugin nouns match Core where the capability genuinely spans both sides; the one-type Display/Host segment was flattened into Display/. Plugin-subject tests move to tests/FanaBridge.Tests/Plugin/<domain>/, and ItmTelemetryTests split by true subject: 30 mapper tests now in Plugin/Display/Drivers/ItmTelemetryMapperTests, 11 protocol tests remain in Core. Mechanical throughout: no behavior, API, visibility, or literal changes; all AttachDelegate keys and settings strings byte-identical. 748/748 tests green; ILRepack merged build clean.
…end access (issue #102) The probe is SimHub-free and used Core internals (Col03FrameClassifier, WheelEngage) — the sole reason FanaBridge.Core granted InternalsVisibleTo("FanaBridge"). It now lives in Core/Diagnostics beside FanatecSoftwareMonitor, and the production friend grant is gone; the merged build proves the plugin needs no Core internals. Tests keep their own grant and move to Core/Diagnostics. 748/748 tests green; ILRepack merged build clean.
…ent (issue #102) Namespaces now spell their location, ratified on #102 after review: Core declares FanaBridge.Core.<folder> (RootNamespace made truthful; embedded profile resources verified loading — the loader matches a '.Profiles.' manifest segment, not the root). The plugin declares FanaBridge.<folder>; the shipped FanaBridge.dll therefore exports FanaBridge.* from the shell and FanaBridge.Core.* from the merged library, so ownership stays readable in stack traces while every directory spells its namespace. Riding on the same surface: - SimHubLogSink joins its mapped FanaBridge.Logging home; the net48 ModuleInitializer polyfill splits into Properties/ (pragma'd). - UI/ subdivides by feature (Settings/, Wizard/, Devices/) ahead of the display editor; BAML resource URIs regenerate internally (verified). - Layout enforcement is compiler-native — IDE0130 at error severity with EnforceCodeStyleInBuild — rather than a bespoke guard test. Exceptions are two in-file pragmas (root-namespace Log, the polyfill) plus the SimHub reflection shim in tests, each with its reason at the site. - tests/Contracts/ hosts repo/external-contract tests: the XAML x:Class layout check (markup is outside the analyzer's reach) and the SimHub enum snapshot. - docs/architecture.md records the layers, the namespace rule, and the frozen names invisible to the compiler. Mechanical throughout; all SimHub-facing strings byte-identical; the persisted FanaBridge.FanatecPlugin type name is untouched and now path-conformant. 749/749 tests green; merged build exports verified; IDE0130 fail-on-violation verified with a planted file.
…test, frozen-names completeness, using order From the whole-branch review: the XAML layout test now fails loudly if it scans zero files; docs/architecture.md gains the Control Mapper variant-id row, a note that SimHub's resolve cache is hash-invalidated (cache state, not durable state), and a pointer to the tests README for the shim exception; one using block re-sorted.
|
Important Review skippedToo many files! This PR contains 135 files, which is 35 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (135)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…conformance, taxonomy clarification Four XML doc crefs broken by the namespace moves are fully qualified (doc generation is off, so no build warning fired). ILogSink splits out of Log.cs into its conformant FanaBridge.Core.Logging home, shrinking the root-namespace exception to exactly the physics-required Log type. docs/architecture.md now states explicitly that domain folders are navigational taxonomy, not directional boundaries — assembly references are the only compiler-enforced direction.
…pragma allowlist Two contract facts close the governance gaps in compiler-native layout enforcement: IDE0130 trusts the mutable RootNamespace and compares case-insensitively, so the four RootNamespace values are now pinned ordinally; and pragma exceptions were self-service, so IDE0130 pragma mentions are now a closed three-file allowlist with a dormancy check. The XAML layout contract also gains the (WPF-capable) test project. Both facts plant-verified. 751/751 green.
The IDE0130 allowlist scan now matches actual #pragma directives instead of raw mentions, eliminating the Contracts/ directory exemption that let new files there suppress the analyzer unchecked. The RootNamespace pin now requires exactly one declaration per csproj — MSBuild evaluation is last-one-wins, so a duplicate element could silently redefine the effective value while the first-element check passed. Both fixes plant-verified.
Closes #102.
Mechanical reorganization of the codebase into domain folders with a literal path == namespace rule, per the issue and its ratified amendments.
What changed
8cb7d74): theProtocol/grab-bag dissolved intoDisplay/{Protocol,Session,Catalog},Leds/,Devices/{Identity,Profiles}(absorbing the formerProfiles/root),Tuning/; connection/identity types moved out ofTransport/; Core-subject tests re-homed undertests/.../Core/<domain>/.df27a88):Adapters/dissolved intoDisplay/,Leds/,Devices/,Settings/,ControlMapper/,UI/; stale namespace declarations corrected; plugin-subject tests re-homed; one mixed test suite split by true subject.cb29e3a, isolated as required):ConverterCaptureProbeis SimHub-free and moved into Core, removing the productionInternalsVisibleTogrant — the merged build now proves the plugin needs no Core internals.1f58560): every declaration equals its project directory root plus relative folder path (FanaBridge.Core.*/FanaBridge.*/FanaBridge.Updater.*/FanaBridge.Tests.*), with truthfulRootNamespacein every project. Enforcement is compiler-native — IDE0130 at error severity withEnforceCodeStyleInBuild— plus a small contract test for XAMLx:Class(outside the analyzer's reach). Exceptions are two pragma'd files with in-file reasons (root-namespaceLog, theModuleInitializerpolyfill) and the SimHub reflection shim in tests.UI/is subdivided by feature (Settings/,Wizard/,Devices/) ahead of upcoming display work. Rules and frozen names are documented indocs/architecture.md.a9f2cd2): review fixes — vacuous-pass guard in the XAML contract test, frozen-names completeness, using order.Not changed
No behavior, member-signature, visibility, or type-short-name changes; fully-qualified names change by design (namespaces are the point of this PR — no external consumers exist, as this is a plugin, not a library). No serialization or SimHub-facing string changes — all
AttachDelegate/AddEventkeys, settings filenames, and the persistedFanaBridge.FanatecPlugintype name are byte-identical. Project graph and single-DLL ILRepack packaging unchanged.Verification
FanaBridge.FanatecPluginexport confirmed in the merged DLL; embedded wheel profiles verified loading under the new manifest names.x:Class.Remaining before merge
UI/subdivision changed internal BAML resource URIs; regeneration verified, rendering has no automated coverage).