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
+2 -2
View File
@@ -47,8 +47,8 @@ configuration look identical if zero-match rules are omitted, and that distincti
you are looking for. Its header shows elapsed wall-clock time since the run started.
Each summary also (re)writes `logging.resultsFileName` (default `results.csv`, next to the audit log)
with one row per account processed so far — Object ID, UPN, and assigned persona/status — for an
operator who wants the current population breakdown without parsing NDJSON.
with one row per account processed so far — Object ID, UPN, assigned persona/status, company name,
and department — for an operator who wants the current population breakdown without parsing NDJSON.
## Exit codes