--- title: "ADR 0032: Bitbucket Cloud commit status keys are capped at 40 characters" --- * Status: accepted * Code: [`pkg/provider/provider.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/provider/provider.go) (`GetBBCloudStatusKey`, `getNameHash`) ## Context Bitbucket Cloud limits the commit status key to 40 characters. The key identifies the status, so two PipelineRuns must not collapse to the same key after shortening. ## Decision `GetBBCloudStatusKey` picks, in order: * `"{ApplicationName} / {OriginalPipelineRunName}"` when both are set and the result is at most 40 characters * otherwise `OriginalPipelineRunName`, and when that is longer than 40 characters, its first 33 characters plus `-` plus the first 6 hex characters of its [SHA-256](https://issues.redhat.com/browse/SHA-256) (33 + 1 + 6 = 40) * `ApplicationName` truncated to 40 characters when no PipelineRun name is set ## Consequences * A long combined name falls back to the PipelineRun name alone, dropping the application name from the key. * The hash suffix keeps distinct long names with a shared 33-character prefix apart, with a 6-hex-digit collision space. * The application-name-only case is truncated without a hash, so long application names sharing a 40-character prefix collide.