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

Function ValidateMetadataSize

internal/task/validate.go:1147–1149  ·  view source on GitHub ↗

ValidateMetadataSize reports whether metadata JSON respects the shared 16 KiB guardrail.

(payload json.RawMessage, path string)

Source from the content-addressed store, hash-verified

1145
1146// ValidateMetadataSize reports whether metadata JSON respects the shared 16 KiB guardrail.
1147func ValidateMetadataSize(payload json.RawMessage, path string) error {
1148 return validateJSONSize(payload, MaxMetadataBytes, path)
1149}
1150
1151// ValidatePayloadSize reports whether a persisted JSON payload respects the shared 64 KiB guardrail.
1152func ValidatePayloadSize(payload json.RawMessage, path string) error {

Callers 14

ValidateMethod · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85
normalizeForceReleaseRunFunction · 0.85
normalizeForceFailRunFunction · 0.85
normalizeRetryRunRequestFunction · 0.85
TestPayloadSizeGuardsFunction · 0.85

Calls 1

validateJSONSizeFunction · 0.85

Tested by 1

TestPayloadSizeGuardsFunction · 0.68