Add CompanyName and Department to the results CSV

Add-PersonaRunResult now optionally accepts the normalized UserRecord and
pulls CompanyName/Department from it for the results.csv row, via
TryGetValue rather than the Properties dictionary indexer so a record built
without those keys doesn't throw. Kept off the PersonaDecisionResult/audit
contract on purpose - this is CSV-only, not a widening of what gets logged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-25 00:25:36 -04:00
parent 5f125c34f2
commit d1b0ac992e
6 changed files with 30 additions and 9 deletions
@@ -61,7 +61,7 @@ Failing any of these yields `Unchanged`, `WouldUpdate`, or `Skipped` — never a
(FR-020).
- **Every summary, interim and final**: `logging.resultsFileName` (default `results.csv`, written
next to the audit log) is overwritten with one row per account processed so far — Account Object
ID, UPN, and the assigned persona or outcome status.
ID, UPN, the assigned persona or outcome status, company name, and department.
- **Reconciliation** at every summary: `Processed = Matched + Unclassified + EvaluationError`
(FR-021). A mismatch is logged as an engine defect, at `Error` severity.
- **Audit records**: see [audit-record.md](audit-record.md).