{"record":{"id":"e53625bfb65c921d","repo":"vxcontrol/pentagi","slug":"invalid-time-end-format-use-iso-8601-e-g-2026-0","errorCode":null,"errorMessage":"invalid time_end format (use ISO 8601, e.g. 2026-01-02T15:04:05Z): %w","messagePattern":"invalid time_end format \\(use ISO 8601, e\\.g\\. 2026-01-02T15:04:05Z\\): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/tools/graphiti_search.go","lineNumber":353,"sourceCode":"func (t *graphitiSearchTool) handleTemporalWindowSearch(\n\tctx context.Context,\n\tgroupID string,\n\targs GraphitiSearchAction,\n\tobservationObject *graphiti.Observation,\n) (string, error) {\n\t// Validate temporal parameters\n\tif args.TimeStart == \"\" || args.TimeEnd == \"\" {\n\t\treturn \"\", fmt.Errorf(\"time_start and time_end are required for temporal_window search\")\n\t}\n\n\ttimeStart, err := parseGraphitiTime(args.TimeStart)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"invalid time_start format (use ISO 8601, e.g. 2026-01-02T15:04:05Z): %w\", err)\n\t}\n\n\ttimeEnd, err := parseGraphitiTime(args.TimeEnd)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"invalid time_end format (use ISO 8601, e.g. 2026-01-02T15:04:05Z): %w\", err)\n\t}\n\n\tif timeEnd.Before(timeStart) {\n\t\treturn \"\", fmt.Errorf(\"time_end must be after time_start\")\n\t}\n\n\tmaxResults := args.MaxResults.Int()\n\tif maxResults <= 0 {\n\t\tmaxResults = DefaultTemporalMaxResults\n\t}\n\n\treq := graphiti.TemporalSearchRequest{\n\t\tQuery:       args.Query,\n\t\tGroupID:     &groupID,\n\t\tTimeStart:   timeStart,\n\t\tTimeEnd:     timeEnd,\n\t\tMaxResults:  maxResults,\n\t\tObservation: observationObject,","sourceCodeStart":335,"sourceCodeEnd":371,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/graphiti_search.go#L335-L371","documentation":"Returned by the graphiti_search tool's temporal_window handler (backend/pkg/tools/graphiti_search.go) when args.TimeEnd cannot be parsed by parseGraphitiTime as ISO 8601 (e.g. 2026-01-02T15:04:05Z). Input validation error from the LLM tool call; fix by supplying a valid ISO 8601 timestamp for time_end.","triggerScenarios":"Calling graphiti_search with search_type=\"temporal_window\" and a malformed time_end value (wrong layout, locale format, invalid timezone) while time_start parsed fine.","commonSituations":"Agents writing 'now' or 'today' as time_end; truncated timestamps like \"2026-08-31T24:00\"; seconds omitted or fractional-second layout mismatches.","solutions":["Format time_end as ISO 8601, e.g. 2026-08-31T23:59:59Z","Ensure both time_start and time_end use the same canonical layout","Inspect the wrapped cause for the precise parsing failure"],"exampleFix":"// before\n{\"time_end\": \"31/08/2026\"}\n// after\n{\"time_end\": \"2026-08-31T23:59:59Z\"}","handlingStrategy":"validation","validationCode":"te, err := time.Parse(time.RFC3339, args.TimeEnd)\nif err != nil {\n    return fmt.Errorf(\"time_end must be ISO 8601 (RFC3339): %w\", err)\n}","typeGuard":"func validISO8601(s string) bool {\n    _, err := time.Parse(time.RFC3339, s)\n    return err == nil\n}","tryCatchPattern":null,"preventionTips":["Validate both timestamps with the same parser before the call","Never hardcode locale-formatted dates in tool payloads","Generate time_end programmatically (e.g. time.Now().UTC().Format(time.RFC3339))"],"tags":["validation","date-format","iso8601","graphiti"],"backgroundTag":"invalid-date-format","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}