{"record":{"id":"ff213126d6474391","repo":"vxcontrol/pentagi","slug":"invalid-time-start-format-use-iso-8601-e-g-2026","errorCode":null,"errorMessage":"invalid time_start format (use ISO 8601, e.g. 2026-01-02T15:04:05Z): %w","messagePattern":"invalid time_start 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":348,"sourceCode":"\t}\n\treturn input\n}\n\n// handleTemporalWindowSearch performs time-bounded search\nfunc (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,","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/graphiti_search.go#L330-L366","documentation":"The time_start parameter of a temporal_window search could not be parsed as a valid ISO 8601 timestamp by parseGraphitiTime. The wrapped error (%w) carries the underlying parse failure. This is an argument-format validation error raised before any network call.","triggerScenarios":"Passing time_start in a non-ISO-8601 format such as \"01/02/2026\", \"yesterday\", \"2026-08-01 10:00\" (space instead of T may fail depending on the parser), or a value with an invalid timezone.","commonSituations":"LLM agents emitting human-readable dates; locale-formatted timestamps; milliseconds vs seconds confusion; missing timezone designator.","solutions":["Format time_start as ISO 8601, e.g. 2026-01-02T15:04:05Z","Use an explicit UTC 'Z' offset to avoid timezone parsing issues","Check the wrapped %w cause in the error for the exact parse failure"],"exampleFix":"// before\n{\"time_start\": \"August 1st 2026\"}\n// after\n{\"time_start\": \"2026-08-01T00:00:00Z\"}","handlingStrategy":"validation","validationCode":"ts, err := time.Parse(time.RFC3339, args.TimeStart)\nif err != nil {\n    return fmt.Errorf(\"time_start must be ISO 8601 (RFC3339), e.g. 2026-01-02T15:04:05Z: %w\", err)\n}","typeGuard":"func validISO8601(s string) bool {\n    _, err := time.Parse(time.RFC3339, s)\n    return err == nil\n}","tryCatchPattern":null,"preventionTips":["Format all timestamps with time.Format(time.RFC3339) at the source","Use explicit UTC 'Z' offsets","Reject human-readable date strings before invoking the tool"],"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"}