Skip to content

Add Decision Severity String Formatting and Stats #223

@codeZe-us

Description

@codeZe-us

Add a String() method on Decision and a Stats function that takes a slice of decisions and returns counts per decision type.

Contribution Guide

  • PRs go to the dev branch, not main
  • Application must explain your specific approach to this task ; generic applications will not be assigned
  • PR description must clearly describe what you built and changed
  • Link your PR to the correct issue number (e.g. Closes #12)

Implementation Guidelines
Key files: examples/go-exchange/contract-deposit-firewall/firewall/stats.go

  • Decision.String() returns "auto-credit", "manual-review", or "quarantine".
  • Stats(decisions []Decision) map[Decision]int returns count per type.
  • Update main.go to print a summary line after all scenarios: "Results: X auto-credit, Y manual-review, Z quarantine".

Expectations
What done looks like: Summary line at the end of the runner output shows correct counts matching the scenario results.

Discord for questions: codeze_us

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions