{"record":{"id":"7a962cf03fd90d75","repo":"temporalio/temporal","slug":"task-key-fire-time-must-have-unix-nano-value-0","errorCode":null,"errorMessage":"task key fire time must have unix nano value >= 0, got %v","messagePattern":"task key fire time must have unix nano value >= 0, got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/history/tasks/key.go","lineNumber":46,"sourceCode":")\n\nfunc NewImmediateKey(taskID int64) Key {\n\treturn Key{\n\t\tFireTime: DefaultFireTime,\n\t\tTaskID:   taskID,\n\t}\n}\n\nfunc NewKey(fireTime time.Time, taskID int64) Key {\n\treturn Key{\n\t\tFireTime: fireTime,\n\t\tTaskID:   taskID,\n\t}\n}\n\nfunc ValidateKey(key Key) error {\n\tif key.FireTime.UnixNano() < defaultFireTimeUnixNano {\n\t\treturn fmt.Errorf(\"task key fire time must have unix nano value >= 0, got %v\", key.FireTime.UnixNano())\n\t}\n\n\tif key.TaskID < 0 {\n\t\treturn fmt.Errorf(\"task key ID must >= 0, got %v\", key.TaskID)\n\t}\n\n\treturn nil\n}\n\nfunc (left Key) CompareTo(right Key) int {\n\tif left.FireTime.Before(right.FireTime) {\n\t\treturn -1\n\t} else if left.FireTime.After(right.FireTime) {\n\t\treturn 1\n\t}\n\n\tif left.TaskID < right.TaskID {\n\t\treturn -1","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/service/history/tasks/key.go#L28-L64","documentation":"Error \"task key fire time must have unix nano value >= 0, got %v\" thrown in temporalio/temporal.","triggerScenarios":"Thrown at service/history/tasks/key.go:46 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}