Filed from the second-wave repository audit (issue 50/100). See the audit summary for full category context.
- Location:
.github/workflows/pr-test-gate.yml (fully duplicates ci.yml's contracts-test and backend-test jobs)
- Problem: Both workflows trigger on
pull_request to main and run the same test suites; pr-test-gate.yml's Rust job additionally has no Swatinem/rust-cache step (present in ci.yml), so contracts are rebuilt from a cold cache on every PR in addition to the already-cached build in ci.yml.
- Evidence: Side-by-side job definitions in the two workflow files cover identical test scopes.
- Suggested implementation: Consolidate into one workflow (or have
pr-test-gate.yml depend on/reuse ci.yml's job results via workflow_run/reusable workflows) and add the missing rust-cache step if any duplication remains.
- Acceptance criteria: Contracts/backend tests run exactly once per PR push, verified by comparing total CI minutes before/after.
- Difficulty: M
- Expected impact: Meaningfully reduces CI cost and PR feedback latency (two full Postgres+Prisma+Vitest+Cargo runs currently happen per push).
.github/workflows/pr-test-gate.yml(fully duplicatesci.yml'scontracts-testandbackend-testjobs)pull_requesttomainand run the same test suites;pr-test-gate.yml's Rust job additionally has noSwatinem/rust-cachestep (present inci.yml), so contracts are rebuilt from a cold cache on every PR in addition to the already-cached build inci.yml.pr-test-gate.ymldepend on/reuseci.yml's job results viaworkflow_run/reusable workflows) and add the missing rust-cache step if any duplication remains.