rara/agent-test/dev/control-plane-smoke.md
toki d67b128344
Some checks are pending
ci / validate (push) Waiting to run
add agent-test
2026-07-18 23:55:20 +09:00

3.1 KiB

test_env test_profile domain verification_type last_rule_updated_at
dev control-plane-smoke control-plane smoke 2026-07-18

control-plane-smoke dev 테스트

읽기 조건

  • control-plane 코드, 제어 상태 스키마·쿼리, 실행 진입점을 원격 환경에서 검증할 때

적용 범위

  • apps/control-plane/, packages/go/controlplane/, db/migrations/, db/queries/

분류

  • domain: control-plane
  • verification_type: smoke
  • scope: 원격 runner의 수명주기 API, 제어 상태, PostgreSQL readiness 검증

환경

  • host: ssh toki@toki-labs.com
  • repo root: /Users/toki/agent-work/rara-dev
  • port: Control Plane 127.0.0.1:18070, PostgreSQL host publish 후보 127.0.0.1:15470
  • runtime: Go 1.26
  • package manager: Go modules
  • docker: login shell의 Docker Desktop/Engine 27.4.0, 실행 전 daemon 재확인
  • external service: readiness와 상태 API 검증에는 PostgreSQL 필요
  • model endpoint: 해당 없음
  • credential: database credential 원문은 문서와 출력에 남기지 않는다.

명령

  • setup: make setup
  • lint: 변경한 Go 파일의 gofmt 상태와 diff 확인
  • unit: go test ./packages/go/controlplane/... ./packages/go/database/...
  • smoke: go build -o /tmp/rara-control-plane ./apps/control-plane/cmd/control-plane
  • service: PostgreSQL 준비 후 RARA_LISTEN=127.0.0.1:18070과 주입된 RARA_DATABASE_URL로 binary를 실행하고 /healthz, /readyz, /v1/status 확인
  • e2e: 현재 baseline 없음
  • model: 해당 없음
  • full-cycle: make test && make build

필수 검증

  • 원격 checkout의 HEAD가 검증 대상 source와 일치한다.
  • control-plane과 database package 테스트가 통과한다.
  • control-plane binary가 원격 runner에서 빌드된다.
  • DB 원본 변경 시 make sqlc 후 생성물 diff와 CI의 sqlc diff 기준을 확인한다.
  • PostgreSQL이 준비된 경우 18070에서 health, readiness, status 응답을 확인한다.

보조 검증

  • lsof -nP -iTCP:18070 -sTCP:LISTEN으로 시작 전 충돌과 종료 후 반환을 확인한다.
  • PostgreSQL host publish가 필요하면 15470 점유 여부를 별도로 확인한다.

판정 기준

  • source identity가 일치하고 테스트·빌드가 exit code 0으로 종료한다.
  • service smoke를 수행한 경우 health와 readiness가 성공하고 /v1/status가 응답한다.
  • PostgreSQL 미준비 시 source test/build 통과와 service smoke 차단을 구분해 보고한다.

기준 출력 예시

ok   git.toki-labs.com/toki/rara/packages/go/...

차단 기준

  • 원격 checkout 부재·source 불일치, Go 1.26 부재, 18070 점유
  • service smoke에 필요한 PostgreSQL 또는 안전한 database credential 주입 부재

보고 항목

  • 원격 branch/HEAD:
  • 실행한 명령:
  • 성공한 검증:
  • 실패/차단된 검증:
  • 생략 사유:
  • 남은 위험:

금지 사항

  • local test 결과를 원격 service evidence로 보고하지 않는다.
  • 운영 secret이나 개인 database URL을 문서와 로그에 남기지 않는다.
  • 생성된 sqlc 파일을 직접 고쳐 테스트를 통과시키지 않는다.