Resl1030 Domain Boundary Typed Error Crossing Warning

title: RESL1030 — Domain Boundary Typed Error Crossing [Warning]


Warns when a Result<T, TError> with a domain-specific typed error is passed directly to a method marked [DomainBoundary] without calling .MapError() first. Prevents domain-specific error surfaces from leaking across architectural layers.

Mark a method as a boundary with [DomainBoundary] (optional layer label for documentation):

// ⚠️ RESL1030: 'ApplicationEntry' receives Result<T, DomainError> directly.
// Call .MapError() before crossing the [DomainBoundary].

[DomainBoundary("Application")]
void ApplicationEntry(Result<Order, AppError> result) { }

// Caller — domain layer passes typed result directly:
var domainResult = orderService.FindOrder(id);
ApplicationEntry(domainResult);   // ← RESL1030 fires here

// ✅ Map before crossing:
ApplicationEntry(domainResult.MapError(e => new AppError(e.Message)));

Attribute: [DomainBoundary] / [DomainBoundary("Application")] — in REslava.Result namespace.

Note: Phase 2 implementation — fires on any Result<T, TError> argument passed to a boundary method. Data-flow suppression (MapError chain detection) is a future refinement.