{"record":{"id":"df47e3fddc597e28","repo":"oracle/graal","slug":"unknown-replay-assumption-kind","errorCode":null,"errorMessage":"Unknown replay assumption kind","messagePattern":"Unknown replay assumption kind","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/replaycomp/BinaryReplayCodec.java","lineNumber":935,"sourceCode":"            case ASSUMPTION_TAG -> switch (in.readPackedUnsignedInt()) {\n                case ASSUMPTION_NO_FINALIZABLE_SUBCLASS ->\n                    new Assumptions.NoFinalizableSubclass((ResolvedJavaType) readValue(in, state));\n                case ASSUMPTION_CONCRETE_SUBTYPE -> {\n                    ResolvedJavaType subtype = (ResolvedJavaType) readValue(in, state);\n                    ResolvedJavaType context = (ResolvedJavaType) readValue(in, state);\n                    yield new DelayedDeserializationObject.ConcreteSubtypeWithDelayedDeserialization(context, subtype);\n                }\n                case ASSUMPTION_LEAF_TYPE ->\n                    new DelayedDeserializationObject.LeafTypeWithDelayedDeserialization((ResolvedJavaType) readValue(in, state));\n                case ASSUMPTION_CONCRETE_METHOD -> {\n                    ResolvedJavaType context = (ResolvedJavaType) readValue(in, state);\n                    ResolvedJavaMethod method = (ResolvedJavaMethod) readValue(in, state);\n                    ResolvedJavaMethod impl = (ResolvedJavaMethod) readValue(in, state);\n                    yield new Assumptions.ConcreteMethod(method, context, impl);\n                }\n                case ASSUMPTION_CALL_SITE_TARGET_VALUE ->\n                    new Assumptions.CallSiteTargetValue((JavaConstant) readValue(in, state), (JavaConstant) readValue(in, state));\n                default -> throw new IOException(\"Unknown replay assumption kind\");\n            };\n            case UNRESOLVED_JAVA_TYPE_TAG ->\n                UnresolvedJavaType.create(requireNonNullString(readStringReference(in, state), \"unresolved type name\"));\n            case UNRESOLVED_JAVA_METHOD_TAG ->\n                new UnresolvedJavaMethod(requireNonNullString(readStringReference(in, state), \"unresolved method name\"),\n                                (Signature) readValue(in, state), (JavaType) readValue(in, state));\n            case UNRESOLVED_JAVA_FIELD_TAG -> {\n                String name = requireNonNullString(readStringReference(in, state), \"unresolved field name\");\n                JavaType type = (JavaType) readValue(in, state);\n                JavaType holder = (JavaType) readValue(in, state);\n                yield new UnresolvedJavaField(holder, name, type);\n            }\n            case PRIMITIVE_CONSTANT_TAG -> {\n                long raw = in.readPackedSignedLong();\n                JavaKind kind = (JavaKind) readValue(in, state);\n                yield JavaConstant.forPrimitive(kind, raw);\n            }\n            case FOREIGN_CALL_DESCRIPTOR_TAG ->","sourceCodeStart":917,"sourceCodeEnd":953,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/replaycomp/BinaryReplayCodec.java#L917-L953","documentation":"Thrown when decoding an ASSUMPTION_TAG payload: the nested assumption-kind int matches none of the known assumption kinds (leaf type, concrete subtype, concrete method, call site target, delayed-deserialization variants, ...). The codec cannot reconstruct the Assumptions.Assumption and throws IOException 'Unknown replay assumption kind'. Like other 'unknown replay kind' errors it points to version skew or corruption.","triggerScenarios":"Replaying a file written by a build with new assumption kinds (the writer emitted a kind constant this reader does not define); corrupted stream misaligning the packed assumption-kind int.","commonSituations":"Cross-version replay between GraalVM builds whose Assumptions subclasses differ; extending the assumptions model without updating the binary codec.","solutions":["Regenerate the replay file with the same build that will replay it","If you added a new Assumptions.Assumption subtype, add both the writer kind constant and the reader case, and bump VERSION","Validate the file version header before parsing to fail fast"],"exampleFix":"// before\ncase ASSUMPTION_TAG -> switch (in.readPackedUnsignedInt()) {\n    ...\n    default -> throw new IOException(\"Unknown replay assumption kind\");\n};\n\n// after\n// add the new kind symmetrically on write and read sides\ncase ASSUMPTION_MY_KIND -> new Assumptions.MyKind(...);","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    result = codec.readReplay(in);\n} catch (IOException e) {\n    if (\"Unknown replay assumption kind\".equals(e.getMessage())) {\n        // reader older than writer: re-record or upgrade the reader build\n    } else throw e;\n}","preventionTips":["Pin record and replay to identical GraalVM builds","When adding Assumptions.Assumption subtypes, update the codec symmetrically and bump VERSION"],"tags":["graalvm","replay-compilation","assumptions","deserialization","version-skew"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}