--- title: "ADR 0063: What LLM and CEL contexts exclude" --- * Status: accepted * Code: [`pkg/llm/context/assembler.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/llm/context/assembler.go) ## Context `BuildCELContext` feeds `on_cel` expressions written by repository owners, and `BuildContext` builds the data sent to an external LLM provider. Both are built from `info.Event`, which also carries tokens, raw requests and provider internals. ## Decision * The CEL event map is a hand-picked list of fields (event type, trigger target, SHA and title, branches, organization and repository, web URLs, user, webhook fields, and PR and comment fields only when populated). It is not a dump of the struct. * The following `info.Event` fields were documented as deliberately excluded: `Provider` (API tokens, webhook secrets), `Request` (raw headers and payload), `InstallationID`, `AccountID`, `GHEURL`, `CloneURL`, `SourceProjectID`, `TargetProjectID`, `State`, and `Event` (already represented by structured fields). The URLs exposed are web URLs, not git URLs. * Commit author and committer are added with name and date only. Emails are left out of the LLM context for privacy; the tests assert this even when the emails are populated. * `full_message` is added only when it differs from the title. * The PR body is not part of the context because the `Event` struct does not carry it. * The PipelineRun and Repository are converted to maps by marshalling to JSON and back, giving the CEL environment plain maps. ## Consequences * Adding a field to the CEL map is an explicit edit here and should be checked against the exclusion list above. * An `on_cel` expression cannot reference the PR description or committer emails. * The `pac` entry is an empty map when returned; the code states the caller fills it in.