Skip to content

fix: validator test messages, Issue init-only fields, IssueEntity missing props, exception middleware, squad-ci wiring#29

Merged
mpaulosky merged 3 commits into
feature/dto-refactor-and-soft-deletefrom
copilot/sub-pr-23
Feb 21, 2026
Merged

fix: validator test messages, Issue init-only fields, IssueEntity missing props, exception middleware, squad-ci wiring#29
mpaulosky merged 3 commits into
feature/dto-refactor-and-soft-deletefrom
copilot/sub-pr-23

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 21, 2026

Addresses remaining review feedback from PR #23 across five areas.

Changes

  • Validator tests: Fixed assertions to match actual FluentValidation messages ("greater than or equal to 1" / "between 1 and 100" vs the incorrect "greater than 0")

  • Issue record immutability: Soft-delete audit fields (IsArchived, ArchivedBy, ArchivedAt) changed from { get; set; } to { get; init; }, consistent with record semantics

  • IssueEntity / IssueRepository:

    • Added missing ArchivedBy and ArchivedAt properties to IssueEntity (previously referenced in ToDomain() but undeclared — compilation error)
    • Enum.Parse<IssueStatus>Enum.TryParse with ignoreCase: true and IssueStatus.Open fallback to avoid 500s on unexpected stored values
  • Exception middleware: Added UseExceptionHandler to Program.cs mapping FluentValidation.ValidationException → 400 with structured error body; previously these would surface as 500s despite endpoints declaring 400

  • squad-ci.yml: Replaced no-op echo placeholder with actual dotnet restore / build / test pipeline

// Before — throws on unknown/mismatched casing stored in MongoDB
Status: Enum.Parse<IssueStatus>(Status),

// After — safe fallback, case-insensitive
Status: Enum.TryParse<IssueStatus>(Status, ignoreCase: true, out var parsedStatus)
    ? parsedStatus
    : IssueStatus.Open,

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@github-actions
Copy link
Copy Markdown

Test Results Summary

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit b01fd49. ± Comparison against base commit 633e702.

@mpaulosky mpaulosky marked this pull request as ready for review February 21, 2026 00:21
Copilot AI review requested due to automatic review settings February 21, 2026 00:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

…ssueRepository, exception middleware, squad-ci

Co-authored-by: mpaulosky <60372079+mpaulosky@users.noreply.github.com>
Copilot AI requested a review from mpaulosky as a code owner February 21, 2026 00:21
Copilot AI changed the title [WIP] Refactor DTOs to records and finalize soft-delete audit trail fix: validator test messages, Issue init-only fields, IssueEntity missing props, exception middleware, squad-ci wiring Feb 21, 2026
@mpaulosky mpaulosky merged commit 8803035 into feature/dto-refactor-and-soft-delete Feb 21, 2026
0 of 2 checks passed
@mpaulosky mpaulosky deleted the copilot/sub-pr-23 branch February 21, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants