This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Sort attributes and rule inputs before hashing for deterministic output Bazel's proto output can return attributes and rule inputs in non-deterministic order across invocations (due to Java HashMap iteration order internally). This caused ~2.5% of target hashes to differ between runs of the same commit. Sort attributes by name and rule inputs by label before feeding them into the hasher to ensure stable hashes regardless of Bazel's output ordering. Note: this changes all existing hashes since the ordering is now canonical. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>