You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d246074
Browse filesBrowse the repository at this point in the historyBrowse files
|**ArchUnitNET**|Slightly richer rules (constraints across assemblies). Pick when NetArchTest can't express it. |
61
-
|**Roslyn analyzer**|Syntactic patterns inside code (`IgnoreQueryFilters` call, raw `Guid` in command, …). |
60
+
|**Mono.Cecil (IL scan)**|What a method body does — a constructor called, a member read — which NetArchTest's type-level rules cannot express. It ships with NetArchTest; there is no ArchUnitNET in this repository. |
61
+
|**Roslyn analyzer**|A syntactic pattern the build itself should fail on — `throw new DomainException(...)` outside an invariant guard is `LS0001`. |
// pseudo-code; replace `GetOwningModuleNamespace(...)` with the real
77
82
// owning-namespace resolver helper that lives next to the test. The
@@ -110,32 +115,36 @@ Patterns to follow:
110
115
111
116
### Step 4: Common architecture-test families
112
117
113
-
**The shipped set is fourteen files, not a family per topic.** Add yours to the one whose
118
+
**The shipped set is eighteen files, not a family per topic.** Add yours to the one whose
114
119
subject it shares:
115
120
116
121
| File | What it covers |
117
122
|------|----------------|
118
-
|`ModuleDependencyTests.cs`|Dependency direction between module packages, plus a planted-violation meta test that proves the scanner still detects one. |
119
-
|`PersistenceConventionTests.cs`|`row_version` mapping, ambient-unit-of-work enlistment, the Docker trait, and the `migrate` recipe's chain coverage and credential redaction. |
120
-
|`TenancyConventionTests.cs`| The ADR-0036 **request-edge** rules — what may read a host, where the effective host and `app.resolving_host` are computed, and the assertion budget's independence from `ICacheService`. Source scans, because three of the four banned inputs appear only as string literals. |
121
-
|`TenantScopingTests.cs`| The correspondence between the `[TenantOwned]` / `[OrganizationScoped]` markers, the EF global query filters, and the Row Level Security policies. |
123
+
|`ModuleDependencyTests.cs`|The dependency matrix — each module layer, and the core `Application`, an allow-list over its IL and its project references — the Domain's one EF Core exception for Vogen's emitted converters, plus a planted-violation meta test that proves the scanner still detects one. |
124
+
|`PersistenceConventionTests.cs`|`row_version` mapping, ambient-unit-of-work enlistment and the ban on fanning out over its connection, the Docker trait, and the `migrate` recipe's chain coverage and credential redaction. |
125
+
|`TenancyConventionTests.cs`| The ADR-0036 **request-edge** rules — what may read a host, where the effective host and `app.resolving_host` are computed, the assertion budget's independence from `ICacheService`, and the host resolver's lack of outbound dependencies — and who may set a session variable: the out-of-band setters' read-only transactions and the ban on setting `app.scope`. Mostly source scans, because most of the banned inputs are header names and SQL that appear only as string literals. |
126
+
|`TenantScopingTests.cs`| The correspondence between the `[TenantOwned]` / `[OrganizationScoped]` markers, the EF global query filters, and the Row Level Security policies, down to the tenant term in both of a policy's clauses. |
122
127
|`TenantContextConstructionTests.cs`| How a tenant context comes into existence and who may write it: the factory's single entry point, the constructor's one call site, the enumerated accessor writers, and the composite-key organization read. |
|`CrossCuttingFoundationTests.cs`| Pipeline order, `Result<T>` returns, topic naming, and the direct-reference bans (Sentry, `DeploymentMode`, `IEventBus`, provider SDK exceptions). |
129
+
|`CrossCuttingFoundationTests.cs`| Pipeline order, `Result<T>` returns, topic naming, and the direct-reference bans (Sentry, `DeploymentMode`, `IEventBus`, the cache clients, the Hub, provider SDK exceptions). |
125
130
|`RequestSurfaceTests.cs`| What the step-4 authority ceiling admits: the two request markers, their permitted sets, the shape of the attributes themselves, and the ban on request shapes MediatR runs with no pipeline. |
126
131
|`PlatformAdminScopeConventionTests.cs`| The single sanctioned `BYPASSRLS` path: who may resolve the keyed platform data source, where connection strings are read, the entry gate, and what the scope must not touch. |
127
-
|`RepositoryLayoutTests.cs`|`No_Source_Folder_Named_Verticals` and the single-frontend-app rule. |
132
+
|`RepositoryLayoutTests.cs`|`No_Source_Folder_Named_Verticals`, the single-frontend-app rule, and the commit-subject grammar — checked by running the `commit-msg` hook. |
128
133
|`AggregateWriteTests.cs`| The one sanctioned cross-aggregate write, and the count of aggregate roots a handler's ports can write that keeps it at one. |
129
134
|`CustomizationRegistryTests.cs`| The closed renderer registries that exist twice — in C# and in TypeScript — and stop the two drifting. |
130
-
|`AuditConventionTests.cs`| The audit aggregate's shape, the closed-set columns against their `CHECK`s, append-only enforcement at the source level, and the `OperationType` table. |
135
+
|`AuditConventionTests.cs`| The audit aggregate's shape, the closed-set columns against their `CHECK`s, append-only enforcement at the source level, the closed set of `audit_log` writers, and the `OperationType` table. |
136
+
|`EntitlementConventionTests.cs`| The entitlement socket: which types may name `platform_entitlement_cache`'s entity, and whose SQL may touch its rows. |
137
+
|`EntitlementKeyTests.cs`| The entitlement vocabulary: where a feature, limit or killswitch key may be spelled, and which keys the tenant's own flag table admits. |
138
+
|`DomainModelTests.cs`| The shape every aggregate carries: identity equality declared once, and an aggregate root's id generated rather than hand-written. |
139
+
|`DomainGenericityTests.cs`| The genericity guarantee: no name the platform ships — backend, database, audit slug, key, renderer or frontend — carries a domain term. |
131
140
|`AuditCoverageTests.cs`| The catalogue ↔ matrix join, keyed on request types discovered from every backend assembly, in both directions — plus the module-has-a-matrix rule. |
132
141
133
-
Rules for surfaces no file covers yet — permissions, entitlement, event bus, Hub
134
-
contract — are **Registered** in
142
+
Rules for surfaces no file covers yet — permissions, the Hub adapters and endpoints — are
143
+
**Registered** in
135
144
[the catalogue](../../../docs/standards/21-architecture-tests-catalogue.md) against
136
145
the phase that ships the code they inspect. Check its Status line before assuming a
137
146
net is under you, and create a new file only when your rule's subject is not one of
138
-
the fourteen above.
147
+
the eighteen above.
139
148
140
149
> **The tenancy rules live in three files, and the split is by subject, not by ADR.**
141
150
> All three cite ADR-0036, so "put it with the other ADR-0036 rules" is not a usable
0 commit comments