Skip to content

Fix audit export totals JSON keys - #45

Closed
Sebastefanelli wants to merge 1 commit into
prashar32:mainfrom
Sebastefanelli:fix/audit-ledger-totals-json
Closed

Fix audit export totals JSON keys#45
Sebastefanelli wants to merge 1 commit into
prashar32:mainfrom
Sebastefanelli:fix/audit-ledger-totals-json

Conversation

@Sebastefanelli

Copy link
Copy Markdown
Contributor

Summary

  • Add JSON tags to storage.LedgerTotals
  • Keep riskkernel audit export totals consistent with the rest of the JSON output
  • Add a regression test that rejects capitalized Go field names in the serialized totals object

Fixes #30

Testing

  • go test ./internal/storage -run TestLedgerTotalsJSONTags -count=1
  • go test ./...

@prashar32

Copy link
Copy Markdown
Owner

Thanks so much for this, @Sebastefanelli - and sorry for the duplicate effort! #35 landed the same fix a bit earlier, so I'm going to honor first-in and merge that one. Your standalone marshal test was clean, though - appreciated the care. If you'd like to keep contributing I'd genuinely welcome it: #38 (surfacing the tool_calls audit trail via an API/CLI) is a nicely-scoped next one, and there are more under the good first issue label. Thanks again for jumping in 🙏

@prashar32 prashar32 closed this Jun 1, 2026
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.

audit export: totals object uses Go field names instead of json tags

2 participants