{"record":{"id":"6460871971c7462c","repo":"elastic/elasticsearch","slug":"transport-version-upper-bound-file","errorCode":null,"errorMessage":"Transport version upper bound file [{}] {}","messagePattern":"Transport version upper bound file \\[(.+?)\\] (.+?)","errorType":"exception","errorClass":"VerificationException","httpStatus":null,"severity":"error","filePath":"build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/ValidateTransportVersionResourcesTask.java","lineNumber":370,"sourceCode":"        for (String name : changedDefinitionNames) {\n            TransportVersionDefinition definition = referableDefinitions.get(name);\n            if (definition != null && resources.getReferableDefinitionFromGitBase(name) == null) {\n                boolean hasUpperBound = upperBounds.values().stream().anyMatch(ub -> ub.definitionName().equals(name));\n                if (hasUpperBound == false) {\n                    throwDefinitionFailure(definition, \"was added but no corresponding upper bounds file was changed\");\n                }\n            }\n        }\n    }\n\n    private void throwDefinitionFailure(TransportVersionDefinition definition, String message) {\n        Path relativePath = getResources().get().getDefinitionPath(definition);\n        throw new VerificationException(\"Transport version definition file [\" + relativePath + \"] \" + message);\n    }\n\n    private void throwUpperBoundFailure(TransportVersionUpperBound upperBound, String message) {\n        Path relativePath = getResources().get().getUpperBoundRepositoryPath(upperBound);\n        throw new VerificationException(\"Transport version upper bound file [\" + relativePath + \"] \" + message);\n    }\n}\n","sourceCodeStart":352,"sourceCodeEnd":373,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/ValidateTransportVersionResourcesTask.java#L352-L373","documentation":"Generic wrapper thrown by throwUpperBoundFailure for any transport-version *upper bound* file failing a structural check. The trailing message identifies the issue, e.g. 'modifies base id from X to Y' when an upper bound for a patch (patch != 0) is changed to point at a different base ID than the existing one — base IDs are immutable once a patch exists. The file path in brackets names the offending upper-bound file.","triggerScenarios":"Editing an existing upper-bound file so its definitionId().base() no longer matches the base recorded in git for that bound, while patch() != 0; re-pointing an upper bound at a different definition after release.","commonSituations":"Backport swaps an upper bound to a different definition; hand-editing the upper-bound resource file; rebasing across branches where the base allocation differs.","solutions":["Restore the original base ID in the named upper-bound file (git checkout the file if the change was unintentional).","If a new base ID is genuinely required, create a NEW upper-bound entry/definition rather than mutating a released patch bound.","Rerun the validate task to confirm."],"exampleFix":"// before: upper-bound file for v9.0.1 changed base from 8800000 to 8800100\n//   -> 'Transport version upper bound file [...] modifies base id from 8800000 to 8800100'\n// after: git checkout -- <upper-bound-file>  (revert); add a new bound for the new base instead","handlingStrategy":"validation","validationCode":"// For any existing upper bound whose patch() != 0, the base ID must equal the value in git:\n//   existingBase == upperBound.definitionId().base()  (do not mutate)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat released upper-bound base IDs as immutable.","Create a new upper bound rather than editing an existing patch bound.","Review upper-bound file diffs carefully in code review."],"tags":["build","gradle","transport-version","validation","upper-bounds"],"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T08:17:17.861Z"}