Skip to content

Tighten audit Status contract and fail closed on drift - #4

Merged
TimoKuronen merged 1 commit into
mainfrom
feature/u1-report-contract
Sep 21, 2026
Merged

TimoKuronen merged 1 commit into
mainfrom
feature/u1-report-contract

Conversation

@TimoKuronen

@TimoKuronen TimoKuronen commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Tighten the Ollama output template so Status is exactly COMPLIANT or REVIEW REQUIRED, with Score and findings prioritized when budget is tight
  • Fail closed in AuditReportParser when Status is missing, empty, unknown, or only present in prose
  • Expand parser and prompt-builder unit tests for the stricter contract

Test plan

  • dotnet test CodeSmellAuditor.Core.Tests
  • Confirm a well-formed COMPLIANT report still exits 0
  • Confirm a truncated report without a Status line exits 1 / HasPassed false

- Require exact COMPLIANT / REVIEW REQUIRED Status lines in the prompt template
- Drop prose fallback so missing or unknown Status always fails
- Cover truncation and invalid Status cases in parser tests
@TimoKuronen
TimoKuronen merged commit d3ab3e7 into main Sep 21, 2026
1 check passed
@TimoKuronen
TimoKuronen deleted the feature/u1-report-contract branch October 7, 2026 09:23
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.

1 participant