ci-cd-trigger-design
CI/CD Trigger Design
Section titled “CI/CD Trigger Design”Workflow authoring rules.
timeout-minutesmandatory — lint 5, unit 10, integration 20, cross-platform 30, e2e/release 45 (GH default 6h lets runaways run).- Paths filter any workflow >2 min p50 —
pull_request.pathsMUST mirrorpush.paths(asymmetry trap). - NEVER
paths:on required-check workflows — skipped-by-paths checks sit atExpected — Waitingforever (merge deadlock). Use step-levelif:or a stub-success job. Not safe:quality-gates.yml,release.yml. concurrency.cancel-in-progress: trueon PR workflows, group${{ github.workflow }}-${{ github.ref }}.- Filter
t1k-ci-sync[bot]—if: github.event.head_commit.author.name != 't1k-ci-sync[bot]'. - Diff-based logic requires
fetch-depth: 0— shallow default = empty diff = silent under-trigger. - Selective execution needs a kill switch —
T1K_GATE_FULL_RUN=1forces all gates (else misclassified reverts deadlock). - Selective execution needs a post-merge full-suite gate —
on: push: branches: [main], no path filter. - Runner: variables only —
runs-on: ${{ fromJSON(vars.RUNNER_CI_<size>) }}(SMALL/MEDIUM/LARGE) orvars.RUNNER_CD; never a label array, bareself-hosted, orubuntu-latest/windows-*/macos-*. A literal queues forever or lands on a donor. A new lane is a variable change inarc-github-runners. A reusable workflow keeps its ownruns-on: bump the pinned@vN. No GitHub caching on pods. Detail:docs/ci-cd-trigger-design.md§ “Rule 9”. - Size to the job.
MEDIUMis 4Gi withoom.group=1; the peak is the TEST phase — cap--maxWorkersor shard, or move toLARGE. openssh-client,ghabsent on the ARC pod image. Guard each install before an SSH fetch orghcall:command -v <tool> || { sudo apt-get update && sudo apt-get install -y <tool>; }, else exit 127.- 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”. - 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”. - CI/deploy installs
cf, neverwrangler(rules/cf-only.md). - Node pins are 26:
node-version,engines.node,.nvmrcbelow 26 failvalidate-node-floor.cjs. Detail:docs/ci-cd-trigger-design.md§ “Rule 17”.
Full details
Section titled “Full details”Rationale and examples: docs/ci-cd-trigger-design.md.