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

Method Validate

internal/task/validate.go:914–922  ·  view source on GitHub ↗

Validate reports whether the run result respects the shared result-size guardrail.

(path string)

Source from the content-addressed store, hash-verified

912
913// Validate reports whether the run result respects the shared result-size guardrail.
914func (r RunResult) Validate(path string) error {
915 if err := ValidateResultSize(r.Value, nestedPath(path, "value")); err != nil {
916 return err
917 }
918 if hasRawClaimTokenField(r.Value) {
919 return fmt.Errorf("%w: %s must not contain raw lease credentials", ErrValidation, nestedPath(path, "value"))
920 }
921 return nil
922}
923
924// Validate reports whether the run failure contains a message and bounded metadata.
925func (r RunFailure) Validate(path string) error {

Callers 3

autonomyCompleteMethod · 0.95

Calls 3

ValidateResultSizeFunction · 0.85
hasRawClaimTokenFieldFunction · 0.85
nestedPathFunction · 0.70

Tested by

no test coverage detected