file profile management#757
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 1 medium |
🟢 Metrics 144 complexity · 13 duplication
Metric Results Complexity 144 Duplication 13
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
| return Result.Invalid("No operator name provided"); | ||
| } | ||
|
|
||
| if (string.IsNullOrEmpty(request.LineTerminator)) |
There was a problem hiding this comment.
LineTerminator validation still uses IsNullOrEmpty, so whitespace-only values such as a single space will pass and get persisted. That later breaks file splitting in processing. Please reject whitespace-only input here and in the update path as well.
| return await this.FileProfileAggregateRepository.SaveChanges(aggregateResult.Data, cancellationToken); | ||
| } | ||
|
|
||
| private async Task<Result<FileProfileAggregateRoot>> LoadAggregate(CancellationToken cancellationToken, bool seedIfMissing) |
There was a problem hiding this comment.
Read operations now seed and save the aggregate on a cache miss. That turns GET into a write path and makes list/get fail if Event Store writes are unavailable. It also introduces a race for concurrent cold starts. Consider keeping seeding in startup or a dedicated initializer instead of calling LoadAggregate(..., true) from the read methods.
closes #756