{"record":{"id":"ae926ef36e5a08fe","repo":"dagger/dagger","slug":"decode-persisted-file-lazy-payload-unsupported-la","errorCode":null,"errorMessage":"decode persisted file lazy payload: unsupported lazy kind %q","messagePattern":"decode persisted file lazy payload: unsupported lazy kind %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/file.go","lineNumber":494,"sourceCode":"\t\t\treturn nil, fmt.Errorf(\"decode persisted file withTimestamps lazy: %w\", err)\n\t\t}\n\t\tparent, err := loadPersistedObjectResultByResultID[*File](ctx, dag, persisted.ParentResultID, \"file withTimestamps parent\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &FileWithTimestampsLazy{LazyState: NewLazyState(), Parent: parent, Timestamp: persisted.Timestamp}, nil\n\tcase persistedFileLazyKindChown:\n\t\tvar persisted persistedFileChownLazy\n\t\tif err := json.Unmarshal(payload, &persisted); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"decode persisted file chown lazy: %w\", err)\n\t\t}\n\t\tparent, err := loadPersistedObjectResultByResultID[*File](ctx, dag, persisted.ParentResultID, \"file chown parent\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &FileChownLazy{LazyState: NewLazyState(), Parent: parent, Owner: persisted.Owner}, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"decode persisted file lazy payload: unsupported lazy kind %q\", lazyKind)\n\t}\n}\n\nfunc (lazy *FileBlobLazy) Evaluate(ctx context.Context, file *File) error {\n\treturn lazy.LazyState.Evaluate(ctx, \"File.blob\", func(ctx context.Context) error {\n\t\tif dir, _ := filepath.Split(lazy.Filename); dir != \"\" {\n\t\t\treturn fmt.Errorf(\"file name %q must not contain a directory\", lazy.Filename)\n\t\t}\n\t\tif err := ValidateFileName(lazy.Filename); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpermissions := lazy.Permissions\n\t\tif permissions == 0 {\n\t\t\tpermissions = 0o644\n\t\t}\n\n\t\tquery, err := CurrentQuery(ctx)\n\t\tif err != nil {","sourceCodeStart":476,"sourceCodeEnd":512,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/file.go#L476-L512","documentation":"Returned when decodePersistedFileLazy encounters a lazy-kind discriminator it does not recognize in a persisted file lazy payload. The kind string comes from the persisted blob; an unknown value means the state was written by a newer Dagger version (with a new lazy kind) or the payload is corrupted. The decoder refuses rather than misinterpreting unknown state.","triggerScenarios":"Loading a persisted lazy file whose kind field contains a value with no case in the switch (e.g. a lazy kind introduced in a newer Dagger release, a truncated/garbled kind string, or a hand-edited payload).","commonSituations":"Downgrading the engine after newer code persisted new lazy kinds; corrupted state store flipping bytes in the kind field; mixing persisted state between forks/branches with divergent kind constants.","solutions":["Upgrade Dagger to a version that supports the persisted lazy kind in the payload","Clear the incompatible persisted state and re-run the pipeline","Verify kind constants (persistedFileLazyKind*) match between the encoder and decoder in your build","Log the %q kind value to confirm whether it is a new kind or corruption"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"knownKinds := map[string]bool{\n    persistedFileLazyKindBlob: true,\n    persistedFileLazyKindContainerFile: true,\n    persistedFileLazyKindWithName: true,\n    persistedFileLazyKindWithReplaced: true,\n    persistedFileLazyKindWithTimestamps: true,\n    persistedFileLazyKindChown: true,\n}\nif !knownKinds[kind] { /* unknown kind: re-derive state or upgrade engine */ }","typeGuard":"func isKnownLazyKind(kind string) bool {\n    switch kind {\n    case persistedFileLazyKindBlob, persistedFileLazyKindContainerFile,\n        persistedFileLazyKindWithName, persistedFileLazyKindWithReplaced,\n        persistedFileLazyKindWithTimestamps, persistedFileLazyKindChown:\n        return true\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Upgrade the engine before consuming state written by newer versions","Never downgrade an engine that has already persisted state with new kinds","Validate the kind field before dispatching to the decoder","Keep kind constants in one shared package to avoid divergence"],"tags":["deserialization","persistence","version-compat","lazy-state"],"backgroundTag":"unsupported-persisted-state-version","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}