Skip to content

ci-cd-trigger-design

Workflow authoring rules.

  1. timeout-minutes mandatory — lint 5, unit 10, integration 20, cross-platform 30, e2e/release 45 (GH default 6h lets runaways run).
  2. Paths filter any workflow >2 min p50 — pull_request.paths MUST mirror push.paths (asymmetry trap).
  3. NEVER paths: on required-check workflows — skipped-by-paths checks sit at Expected — Waiting forever (merge deadlock). Use step-level if: or a stub-success job. Not safe: quality-gates.yml, release.yml.
  4. concurrency.cancel-in-progress: true on PR workflows, group ${{ github.workflow }}-${{ github.ref }}.
  5. Filter t1k-ci-sync[bot] — if: github.event.head_commit.author.name != 't1k-ci-sync[bot]'.
  6. Diff-based logic requires fetch-depth: 0 — shallow default = empty diff = silent under-trigger.
  7. Selective execution needs a kill switch — T1K_GATE_FULL_RUN=1 forces all gates (else misclassified reverts deadlock).
  8. Selective execution needs a post-merge full-suite gate — on: push: branches: [main], no path filter.
  9. Runner: variables only — runs-on: ${{ fromJSON(vars.RUNNER_CI_<size>) }} (SMALL/MEDIUM/LARGE) or vars.RUNNER_CD; never a label array, bare self-hosted, or ubuntu-latest/windows-*/macos-*. A literal queues forever or lands on a donor. A new lane is a variable change in arc-github-runners. A reusable workflow keeps its own runs-on: bump the pinned @vN. No GitHub caching on pods. Detail: docs/ci-cd-trigger-design.md § “Rule 9”.
  10. Size to the job. MEDIUM is 4Gi with oom.group=1; the peak is the TEST phase — cap --maxWorkers or shard, or move to LARGE.
  11. openssh-client, gh absent on the ARC pod image. Guard each install before an SSH fetch or gh call: command -v <tool> || { sudo apt-get update && sudo apt-get install -y <tool>; }, else exit 127.
  12. Monorepo: affected-only. Build/test changed workspaces + dependents (bun --filter "...[<base>]"); deploy targets from the dependency graph. Root/lockfile/unknown → full. Detail: docs/ci-cd-trigger-design.md § “Rules 12–14”.
  13. Every service MUST have CI/CD from day one: auto-deploy on default-branch push, gated on that commit’s CI, never by hand. Missing = a gap. Detail: docs/ci-cd-trigger-design.md § “Rule 15”.
  14. CI/deploy installs cf, never wrangler (rules/cf-only.md).
  15. Node pins are 26: node-version, engines.node, .nvmrc below 26 fail validate-node-floor.cjs. Detail: docs/ci-cd-trigger-design.md § “Rule 17”.

Rationale and examples: docs/ci-cd-trigger-design.md.