--- title: "ADR 0057: Follow-up intents are stored on the run annotation, bounded and without the trigger comment" --- * Status: accepted * Code: [`pkg/pipelinerungroup/followup.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/pipelinerungroup/followup.go) ## Context A follow-up is a `.tekton` definition that waits on other definitions of the same event (`on-pipelinerun` annotation). Its intent has to survive until the dependencies finish, so it is serialised as JSON into the `keys.FollowUps` annotation of a run of the group (`stampFollowUps`). Annotations of one Kubernetes object share a 256KB budget, and the run annotations of the original event are lossy, so the event fields needed later must be captured explicitly. ## Decision * `FollowUpEvent` captures only the event fields from which CEL and template variables are computed. The trigger comment is deliberately not stored: it is user controlled and unbounded, so `trigger_comment` is empty for a follow-up. * `ParamFilters` records the filter that selected each custom param, never its value. * `AddFollowUps` enforces `maxFollowUpsSize` (64KB) and returns an error beyond it. * `ConsumeFollowUp` calls `stampFollowUps` with the limit disabled: an accepted follow-up must always be consumable, and a terminal state only adds a few bytes. * `FollowUpsPatch` sends a merge patch; an absent annotation is sent as `null`, because a merge patch only deletes a key that way. * `FollowUpName` builds a deterministic run name from the definition name and group id, validated as a PipelineRun name; the ID is also the identity used to replace an entry on re-add. ## Consequences * A group with many or large follow-ups fails at planning time rather than at patch time. * Follow-ups never see the comment that triggered the event. * The code does not show why 64KB was chosen beyond being under the 256KB shared limit. * `Event` is absent on follow-ups stored by older versions; `ParamFilterOutcomes` returns nil for them.