package claude // The arm64 build of the pinned release, for tests only. The certified // runner target is linux/amd64: ExecutableSHA256 is the only pin a // launcher or a release trusts, and no release ships with the one below. // It is the official 2.1.312 linux-arm64 binary, as its release manifest // lists it, so a test that runs the real program can run on an arm64 CI // machine. const ExecutableSHA256Arm64 = "dc4af28917455e009d26704b82a438353a06149e825b6cdf782908b2d28661f5" // ReleasePin returns the digest of the official 2.1.312 Linux binary // built for goarch: the certified pin on amd64, the arm64 build's on // arm64. A test hands it runtime.GOARCH to check the binary on the // machine it runs on. ok is false where there is no pinned build. func ReleasePin(goarch string) (pin string, ok bool) { switch goarch { case "amd64": return ExecutableSHA256, true case "arm64": return ExecutableSHA256Arm64, true } return "", false } // ExecutableSHA256DarwinArm64 is the official 2.1.312 darwin-arm64 // binary, the one Claude Code a Mac worker runs (Mac runners spec ยง8.2). // Read on docs-t1 on 2026-11-28 (slice F task 1, S1): the release // manifest's darwin-arm64 checksum, and the sha256 of the 275988512 // bytes downloaded from the official URL. The manifest is not trusted at // runtime; this constant is. const ExecutableSHA256DarwinArm64 = "6b5ec691195e551b02c41df9f7d723f4ea61eaa03c2df90acefe3736f1aeb620" // ReleasePinFor returns the digest of the official 2.1.312 binary for // goos/goarch: the certified linux/amd64 pin, the linux/arm64 test pin, // and darwin/arm64's. ok is false everywhere else, darwin/amd64 // included: a Mac worker runs only the darwin/arm64 build. func ReleasePinFor(goos, goarch string) (pin string, ok bool) { switch goos { case "linux": return ReleasePin(goarch) case "darwin": if goarch == "arm64" { return ExecutableSHA256DarwinArm64, true } } return "", false }