Skip to content

Harden audit outcomes, rule loading, and Ollama testability - #8

Merged
TimoKuronen merged 1 commit into
mainfrom
feature/harden-audit-outcomes
Sep 30, 2026
Merged

TimoKuronen merged 1 commit into
mainfrom
feature/harden-audit-outcomes

Conversation

@TimoKuronen

@TimoKuronen TimoKuronen commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Distinguish tool/wiring failures from model review verdicts via AuditOutcome (exit 0 passed, 1 review required, 2 failed); skip critique persistence on tool failure
  • Move sniff-system rule selection into AuditEngine.LoadSystemRulesAsync and centralize path validation; batch mode shares CLI error handling with sniff
  • Inject HttpClient into OllamaAiOrchestrator with fake-handler unit tests; sort rule and target enumeration for deterministic prompts

Test plan

  • dotnet test on CodeSmellAuditor.slnx (Release): 79 passing
  • Exit 0 when every audited target reports Status: COMPLIANT
  • Exit 1 when any target reports Status: REVIEW REQUIRED and none are tool failures
  • Exit 2 when Ollama is unreachable or returns an empty/error stream, and no new critique file appears under WorkstationStorage/Reports/
  • Exit 2 with a clean ERROR line (no unhandled crash) for a missing --stack folder in batch mode
  • sniff-system still loads Rules/Architecture/ plus optional --stack packs from Rules/Stacks/

Distinguish tool failures from review verdicts (exit 0/1/2), move system rule policy into Core, inject HttpClient for orchestrator tests, and sort rule/target enumeration.
@TimoKuronen
TimoKuronen merged commit 01e69cb into main Sep 30, 2026
1 check passed
@TimoKuronen
TimoKuronen deleted the feature/harden-audit-outcomes branch September 30, 2026 08: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.

1 participant