MCPcopy Create free account
hub / github.com/compozy/agh / ClampSummaryCount

Function ClampSummaryCount

internal/task/types.go:567–576  ·  view source on GitHub ↗

ClampSummaryCount converts an internal count to the compact Summary count representation.

(count int)

Source from the content-addressed store, hash-verified

565
566// ClampSummaryCount converts an internal count to the compact Summary count representation.
567func ClampSummaryCount(count int) int32 {
568 switch {
569 case count <= 0:
570 return 0
571 case count > int(maxSummaryCount):
572 return maxSummaryCount
573 default:
574 return int32(count)
575 }
576}
577
578// Reference is the human-meaningful task identity used in enriched read models.
579type Reference struct {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected