C.W.K.
Stream
Lesson 05 of 12 · published

Feedback loop

~13 min · feedback, speed, loop

Level 0Apprentice
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

Pass rate 가 아니라 latency 가 metric

대부분 팀은 CI 를 잘못된 숫자에 최적화해. pass rate (main 이 얼마나 자주 green 인가) 에 집착해. 그것도 중요하지만 downstream 이야. Upstream metric 은 feedback latency: 변경을 push 한 시점부터 뭐가 깨졌는지 알게 된 시점까지의 시간.

Latency 가 왜 중요하냐면: 90 분 CI run 은 그냥 느린 게 아니야. Context-switch 세금 이지. 끝날 때쯤이면 아빠는 다른 문제로 이동했고, 다른 branch 시작했고, 점심 먹으러 갔어. Failure 가 도착하면 mental model 을 다시 load 해야 해. 90 분 run 의 실제 비용은 90 분 보다 반나절에 가까워.

계층화된 feedback

실제 팀은 feedback 을 여러 속도로 쌓아:

  1. Editor (초) — type 에러, lint 경고, format 문제. LSP + format-on-save 가 commit 전에 대부분 잡아.
  2. Pre-commit hook (초) — 절대 CI 까지 가면 안 되는 빠른 check. lint, format, typo.
  3. CI (분) — main test suite. 대부분은 10 분 이하, smoke subset 은 2 분 이하 목표.
  4. Pre-deploy (분) — integration test, end-to-end, performance budget.
  5. Post-deploy (분~시간) — production smoke test, error rate dashboard, 사용자 facing observability.

계층이 빠를수록 failure 가 싸. CI 의 역할은 가능한 많은 feedback 을 더 싼 계층으로 밀어내는 거야.

Code

pre-commit hook 설정 — push 전 빠른 feedback·yaml
# .pre-commit-config.yaml
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-added-large-files
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.7.0
    hooks:
      - id: ruff
        args: [--fix]
      - id: ruff-format

External links

Exercise

가장 최근 CI run 을 end-to-end 로 시간 재. 이제 분해해: checkout 이 얼마, install 이 얼마, 실제 test 가 얼마? 적어도 하나는 bottleneck 이야. 최적화 하나 골라 (caching, parallelism, 더 작은 smoke subset) 절감 시간 추정해.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.