Gitaly Avoidance Audit — Report
**`Ci::Pipeline` / Pipeline cache**
- `expire_pipeline_cache_service.rb:94` — `commit_pipelines_path(project, pipeline.commit) if pipeline.sha && pipeline.commit.present?` → drop the `pipeline.commit.present?` check and pass `pipeline.sha`. Path helper accepts a sha. Fires on every pipeline state transition.
**Release**
- `release_presenter.rb:6-10` — `commit_path` checks `release.commit && ...` then uses `release.commit.id`. Replace with `release.sha`. Hot path: every release card / list row.
**GraphQL types — defer the Gitaly fetch**
- `types/release_type.rb:61-65` — fetches `release.project.commit_by(oid: release.sha)` per release. Move to a `BatchLoader` keyed by project so a list of releases resolves with one `list_commits_by_ref_name`-style batch instead of N round trips.
- `types/deployment_type.rb:54-57` — same N+1 shape on deployment lists; batch via `repository.commits_by(oids: [...])`.
Part of solving the Gitaly load issues discussed in https://gitlab.com/gitlab-org/gitlab/-/work_items/598188
issue