{"record":{"id":"87afbe8d4cca1f12","repo":"github/copilot-sdk","slug":"failed-to-extract-runtime-wrapper-compatibility-en","errorCode":null,"errorMessage":"failed to extract runtime wrapper compatibility entrypoint: %w","messagePattern":"failed to extract runtime wrapper compatibility entrypoint: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/cmd/bundler/main.go","lineNumber":1049,"sourceCode":"\t\t\tassetName,\n\t\t\texpectedChecksum,\n\t\t\tactualChecksum,\n\t\t)\n\t}\n\n\t// The SDK release package intentionally omits the legacy SEA binary. Preserve\n\t// embeddedcli.Path compatibility by installing the runtime wrapper under the\n\t// historical copilot[.exe] name; the normal client path uses the adjacent\n\t// wrapper/runtime.node pair directly.\n\tbinaryPath := filepath.Join(destDir, binaryName)\n\twrapperName := runtimeWrapperName(binaryName)\n\tif err := extractFileFromTarball(\n\t\ttarballPath,\n\t\tdestDir,\n\t\t\"package/prebuilds/\"+runtimePlatform+\"/\"+wrapperName,\n\t\tbinaryName,\n\t); err != nil {\n\t\treturn \"\", \"\", fmt.Errorf(\"failed to extract runtime wrapper compatibility entrypoint: %w\", err)\n\t}\n\n\t// Verify binary exists\n\tif _, err := os.Stat(binaryPath); err != nil {\n\t\treturn \"\", \"\", fmt.Errorf(\"binary not found after extraction: %w\", err)\n\t}\n\n\t// Make executable on Unix\n\tif !strings.HasSuffix(binaryName, \".exe\") {\n\t\tif err := os.Chmod(binaryPath, 0755); err != nil {\n\t\t\treturn \"\", \"\", fmt.Errorf(\"failed to chmod binary: %w\", err)\n\t\t}\n\t}\n\n\tstat, err := os.Stat(binaryPath)\n\tif err != nil {\n\t\treturn \"\", \"\", fmt.Errorf(\"failed to stat binary: %w\", err)\n\t}","sourceCodeStart":1031,"sourceCodeEnd":1067,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/go/cmd/bundler/main.go#L1031-L1067","documentation":"After checksum validation, downloadCLIBinary extracts the runtime wrapper binary from package/prebuilds/<platform>/ inside the tarball. If extractFileFromTarball fails (entry missing, tar read error, or write failure), this error wraps it. It indicates the release package did not contain the expected platform-specific entrypoint.","triggerScenarios":"extractFileFromTarball(tarballPath, destDir, \"package/prebuilds/\"+runtimePlatform+\"/\"+wrapperName, binaryName) returns an error — e.g. the tar has no entry at that exact path for the detected platform.","commonSituations":"Unsupported/new runtime platform whose prebuild folder is absent from the release; release packaging change renaming the prebuilds layout; partially extracted tarball; wrong GOOS/GOARCH detection mapping to a non-existent folder.","solutions":["List the tarball contents (tar -tzf <tarball>) and confirm package/prebuilds/<platform>/<wrapperName> exists.","Verify the detected runtimePlatform is supported by the release; update bundler platform mapping if needed.","Re-download the tarball in case of corruption (checksum passed implies unlikely).","Update the bundler to a version matching the release package layout."],"exampleFix":"// before: platform dir name mismatch\n\"package/prebuilds/\" + runtimePlatform + \"/\" + wrapperName\n\n// after: normalize platform identifier to the release's naming scheme\nreleasePlatform := normalizeToReleasePlatform(runtimePlatform) // e.g. \"darwin-arm64\"\n\"package/prebuilds/\" + releasePlatform + \"/\" + wrapperName","handlingStrategy":"validation","validationCode":"// confirm the platform entry exists before extraction\nentries := listTarballEntries(tarballPath)\nwant := \"package/prebuilds/\" + runtimePlatform + \"/\" + wrapperName\nif !slices.Contains(entries, want) {\n    return fmt.Errorf(\"release lacks %s; supported: %v\", want, filterPrefix(entries, \"package/prebuilds/\"))\n}","typeGuard":null,"tryCatchPattern":"if _, _, err := downloadCLIBinary(...); err != nil {\n    if strings.Contains(err.Error(), \"compatibility entrypoint\") {\n        return fmt.Errorf(\"platform %s unsupported by this release: %w\", runtimePlatform, err)\n    }\n    return err\n}","preventionTips":["Keep the runtimePlatform naming map in sync with the release's prebuilds folder names.","Run `tar -tzf` against a fresh release to confirm expected layout before pinning versions.","Update bundler when release packaging layout changes.","Restrict supported-platform lists to assets actually shipped."],"tags":["tar","extraction","platform","go","release-package"],"backgroundTag":"file-not-found","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}