test(config-audit): add Opus 4.7 pattern fixtures (cache, redundant, imports, sonnet-era)

This commit is contained in:
Kjell Tore Guttormsen 2026-04-19 22:34:41 +02:00
commit 2a8dc8655f
11 changed files with 255 additions and 0 deletions

View file

@ -0,0 +1,43 @@
# Layer 2
Second layer of the chain. This file is imported by layer1.md and imports
layer3.md in turn, forming a 3-deep @import chain that the TOK scanner
should flag.
## Architecture Notes
The ficticious project uses a layered architecture split across:
- Application layer (HTTP adapters, CLI adapters)
- Domain layer (pure business logic)
- Infrastructure layer (databases, caches, external APIs)
## Dependency Rules
- Application depends on domain but not infrastructure.
- Infrastructure implements ports defined in the domain.
- Domain never imports from application or infrastructure.
- Cross-cutting concerns (logging, tracing) live as ports.
## Observability
- Structured logs with correlation ids.
- Metrics scraped from a `/metrics` endpoint.
- Trace spans around domain service boundaries.
- Health checks separate from metrics endpoints.
## Data Access
- Repositories return domain objects, never ORM entities.
- Database migrations numbered sequentially.
- Idempotent migrations where feasible.
- Readonly replicas for analytical queries.
## Caching
- Read-through cache for hot entities.
- TTL chosen per entity class.
- Invalidate on write, not on read miss.
- Measure hit-rate per cache bucket.
@layer3.md