Architecture decisions
Each record says why something about TenantGuard is the way it is: the context, the decision and its consequences. Records are numbered in the order the decisions were made, and an accepted record isn’t edited later except to mark it superseded (0001).
| Record | Decision | Status | Date |
|---|---|---|---|
| 0001 | Record architecture decisions | Accepted | 2026-10-29 |
| 0002 | The runtime package depends on EF Core only | Accepted | 2026-10-29 |
| 0003 | Model validation runs as an EF Core convention | Accepted | 2026-10-29 |
| 0004 | The analyzers target netstandard2.0 on Roslyn 4.8.0 | Accepted | 2026-10-29 |
| 0005 | Build settings | Accepted | 2026-10-29 |
| 0006 | Rule IDs, messages, options, exceptions and the public API are the contract | Accepted | 2026-10-29 |
| 0007 | The public namespaces are TenantGuard and TenantGuard.Testing | Accepted | 2026-10-29 |
| 0008 | Startup validation through a hosted service, with a hosting dependency | Rejected | 2026-10-29 |
| 0009 | Startup validation through ValidateOnStart | Accepted | 2026-10-30 |
| 0010 | Target net10.0 and net11.0 | Accepted | 2026-10-30 |
| 0011 | Apache-2.0, with per-file copyright headers | Accepted | 2026-10-30 |
| 0012 | Public API for options and severity | Accepted | 2026-10-30 |
| 0013 | No allocations only where the guard can skip DetectChanges | Proposed | 2026-10-30 |
| 0014 | Writes through an owned entity are checked through its owner | Proposed | 2026-10-30 |
| 0015 | TGM003 treats an operand EF Core swaps for the context as the context | Proposed | 2026-10-30 |
| 0016 | The first release is a preview until EF Core 11 is stable | Accepted | 2026-10-31 |
| 0017 | End-to-end tests live in tests/e2e, with Finbuckle | Accepted | 2026-11-01 |
| 0018 | Test libraries beyond xUnit | Accepted | 2026-11-01 |
| 0019 | The runtime package’s folders are rings with an enforced direction | Accepted | 2026-11-01 |
| 0020 | The README follows ci-parity’s, with a package README of its own | Accepted | 2026-11-02 |
| 0021 | A docs site in Astro, built from docs/ | Accepted | 2026-11-02 |
| 0022 | The docs replace the specification, the plan and the decisions log | Accepted | 2026-11-02 |
| 0023 | The docs site uses the Rapide theme | Accepted | 2026-11-02 |
| 0024 | A .NET tool package for model validation in CI | Accepted | 2026-11-03 |
| 0025 | A package per test framework for probe rows | Accepted | 2026-11-03 |
| 0026 | TGM003 allows a captured tenant in a per-tenant model | Accepted | 2026-11-03 |
| 0027 | No source generator while compiled models refuse query filters | Accepted | 2026-11-04 |
Proposing a change
Section titled “Proposing a change”When a decision turns out to be wrong, copy the shape below into the next number with status Proposed, say what it changes and why, and stop: work on it waits until the maintainer accepts or rejects it. A record that replaces an earlier one says so, and the earlier one’s status becomes “Superseded by NNNN”.
# NNNN. Title
- Status: Proposed- Date: YYYY-MM-DD
## Context
What made the decision necessary: the forces, the constraints, what was tried.
## Decision
What changes, stated so it can be checked.
## Consequences
What becomes easier or harder, and what follows from it.