--- title: "ADR 0052: Malformed execution-order entries are skipped, not indexed" --- * Status: accepted * Code: [`pkg/queue/queue_manager_interface.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/queue/queue_manager_interface.go), [`pkg/queue/queue_manager.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/queue/queue_manager.go) ## Context The execution-order annotation on a PipelineRun is a comma-separated list of `namespace/name` keys that a user can edit. `FilterPipelineRunByState` reads it and `InitQueues` calls it for every repository when the watcher starts, before workers run. The code's own notes say a panic here took the watcher down and repeated on every restart. ## Decision * `SplitPrKey` trims whitespace, requires exactly one `/` with a non-empty namespace and name, and rejects segments that `rest.IsValidPathSegmentName` refuses (`.`, `..`, or containing `%`). * The path-segment check exists because such a segment makes the Tekton client fail locally with an error that is not a NotFound. `FilterPipelineRunByState` only skips NotFound, so any other error is returned and would abort `InitQueues`. * `FilterPipelineRunByState` logs a warning for a malformed entry and continues. `InitQueues` also skips a PipelineRun that has no execution-order annotation and keeps initializing the remaining runs and repositories. * Runs that are not found are dropped silently; other read errors are returned. ## Consequences * One bad annotation no longer blocks startup, but its entry is ignored for queueing. * New callers that turn a key into a client call should go through `SplitPrKey`.