From 8ff7b1369a6d4c8dfc58ff3d1857600a7688febc Mon Sep 17 00:00:00 2001 From: toki Date: Sat, 13 Jun 2026 06:02:31 +0900 Subject: [PATCH] update test smoke files and docs --- Makefile | 12 +++++++++++- README.md | 2 ++ agent-test/local/agent-smoke.md | 15 ++++++++------- agent-test/local/cli-smoke.md | 12 ++++++------ agent-test/local/command-smoke.md | 12 ++++++------ agent-test/local/core-smoke.md | 12 ++++++------ agent-test/local/framework-smoke.md | 12 ++++++------ agent-test/local/pipeline-smoke.md | 12 ++++++------ agent-test/local/rules.md | 19 ++++++++++++------- agent-test/local/sample-smoke.md | 12 ++++++------ agent-test/local/scheduler-smoke.md | 12 ++++++------ apps/client/README.md | 7 +++++++ 12 files changed, 82 insertions(+), 57 deletions(-) diff --git a/Makefile b/Makefile index 2a1b141..016710c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ -.PHONY: all setup test runner-get runner-analyze runner-test runner-test-legacy-iop client-get client-analyze client-test core-test proto proto-go proto-dart +.PHONY: all setup test runner-get runner-analyze runner-test runner-test-legacy-iop client-get client-analyze client-test core-test core-run client-run-web proto proto-go proto-dart PROTOC_GEN_DART := $(shell command -v protoc-gen-dart 2>/dev/null) +OTO_CORE_ADDR ?= 0.0.0.0:18020 +OTO_WEB_PORT ?= 13020 +OTO_SERVER_HTTP_URL ?= http://localhost:18020 RUNNER_REQUIRED_TESTS := \ test/oto_agent_bootstrap_script_test.dart \ test/oto_agent_cli_test.dart \ @@ -47,6 +50,13 @@ client-test: core-test: cd services/core && go test ./... +core-run: + cd services/core && OTO_CORE_ADDR=$(OTO_CORE_ADDR) go run ./cmd/oto-core + +client-run-web: + cd apps/client && flutter run -d chrome --web-port=$(OTO_WEB_PORT) \ + --dart-define=OTO_SERVER_HTTP_URL=$(OTO_SERVER_HTTP_URL) + proto: proto-go proto-dart proto-go: diff --git a/README.md b/README.md index 5451895..f686eca 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ YAML 기반 CI/CD 파이프라인 자동화 도구 OTO의 Monorepo 프로젝트 OTO는 독립 Control Plane 제품 경로를 기준으로 포트와 환경값을 기록합니다. iop Edge 또는 wire 포트는 OTO workspace 포트 표준의 source of truth가 아닙니다. +기본 local 테스트 evidence는 원격 runner `ssh toki@toki-labs.com`의 `/Users/toki/agent-work/oto` checkout 기준으로 수집합니다. | 표면 | 표준 후보 | 호환 기준 | |------|-----------|-----------| @@ -32,6 +33,7 @@ iop Edge 또는 wire 포트는 OTO workspace 포트 표준의 source of truth가 Core를 workspace publish 포트로 띄울 때는 `OTO_CORE_ADDR=0.0.0.0:18020`처럼 listen 주소를 명시합니다. Flutter web preview는 `cd apps/client && flutter run -d chrome --web-port=13020`을 기준 후보로 둡니다. +Makefile 기준 실행은 `make core-run`과 `make client-run-web OTO_SERVER_HTTP_URL=http://toki-labs.com:18020`을 사용합니다. bootstrap command와 artifact URL 문서는 public validation 기준과 source of truth만 남기고, enrollment token이나 private release host는 런타임 환경에서만 주입합니다. ### 의존성 설치 (Setup) diff --git a/agent-test/local/agent-smoke.md b/agent-test/local/agent-smoke.md index ef6d854..537d510 100644 --- a/agent-test/local/agent-smoke.md +++ b/agent-test/local/agent-smoke.md @@ -3,7 +3,7 @@ test_env: local test_profile: agent-smoke domain: agent verification_type: smoke -last_rule_updated_at: 2026-06-10 +last_rule_updated_at: 2026-06-12 --- # agent-smoke local 테스트 @@ -26,18 +26,19 @@ last_rule_updated_at: 2026-06-10 ## 환경 -- host: -- port: backend host publish 후보 `18020`; local compatibility 기본값 `127.0.0.1:8080` +- host: `ssh toki@toki-labs.com` 원격 runner, checkout `/Users/toki/agent-work/oto` +- port: OTO Core HTTP workspace host publish `18020`; local compatibility 기본값 `127.0.0.1:8080` - runtime: Dart SDK, Go toolchain - package manager: dart pub, Go modules -- docker: +- docker: 기본 smoke는 Docker를 사용하지 않는다. - external service: 없음 - model endpoint: -- credential: +- credential: `OTO_RUNNER_RELEASE_BASE_URL`, enrollment token, private release host 원문은 tracked 파일에 기록하지 않는다. ## 포트/환경 체크리스트 -- Core publish 검증은 `OTO_CORE_ADDR=0.0.0.0:18020` 기준 후보를 사용한다. `127.0.0.1:8080`은 기존 local default compatibility로만 남긴다. +- Core publish 검증은 원격 runner에서 `make core-run` 또는 `OTO_CORE_ADDR=0.0.0.0:18020 go run ./cmd/oto-core` 기준을 사용한다. `127.0.0.1:8080`은 기존 local default compatibility로만 남긴다. +- 외부 브라우저/클라이언트가 원격 Core에 접근해야 하면 `http://toki-labs.com:18020`을 서버 URL로 사용한다. - bootstrap command는 `--server-url`을 기준 인자로 문서화한다. `--edge-url`은 script 호환 alias로만 본다. - `OTO_RUNNER_RELEASE_BASE_URL`은 `https://` scheme만 허용한다. token, credential, private release host 원문은 테스트 규칙과 tracked 문서에 쓰지 않는다. - iop Edge/wire endpoint는 독립 OTO Control Plane smoke의 필수 검증 대상이 아니다. @@ -85,7 +86,7 @@ All tests passed! ## 차단 기준 -- Dart SDK 또는 path dependency가 없어 `dart pub get`, `dart analyze`, `dart test`를 시작할 수 없는 경우 +- 원격 runner에 Dart SDK, Go toolchain, path dependency가 없어 `dart pub get`, `dart analyze`, `dart test`, `go test`를 시작할 수 없는 경우 ## 보고 항목 diff --git a/agent-test/local/cli-smoke.md b/agent-test/local/cli-smoke.md index e9a4c2b..7c6ca71 100644 --- a/agent-test/local/cli-smoke.md +++ b/agent-test/local/cli-smoke.md @@ -3,7 +3,7 @@ test_env: local test_profile: cli-smoke domain: cli verification_type: smoke -last_rule_updated_at: 2026-06-05 +last_rule_updated_at: 2026-06-12 --- # cli-smoke local 테스트 @@ -24,14 +24,14 @@ last_rule_updated_at: 2026-06-05 ## 환경 -- host: -- port: +- host: `ssh toki@toki-labs.com` 원격 runner, checkout `/Users/toki/agent-work/oto` +- port: 기본 CLI smoke는 public port를 사용하지 않는다. Core 연동이 필요하면 OTO Core HTTP `18020`을 사용한다. - runtime: Dart SDK - package manager: dart pub -- docker: +- docker: 기본 smoke는 Docker를 사용하지 않는다. - external service: 없음 - model endpoint: -- credential: +- credential: private input 원문은 tracked 파일에 기록하지 않는다. ## 명령 @@ -67,7 +67,7 @@ All tests passed! ## 차단 기준 -- Dart SDK 또는 path dependency가 없어 local command를 시작할 수 없는 경우 +- 원격 runner에 Dart SDK 또는 path dependency가 없어 command를 시작할 수 없는 경우 ## 보고 항목 diff --git a/agent-test/local/command-smoke.md b/agent-test/local/command-smoke.md index 1b174ab..d36fb10 100644 --- a/agent-test/local/command-smoke.md +++ b/agent-test/local/command-smoke.md @@ -3,7 +3,7 @@ test_env: local test_profile: command-smoke domain: command verification_type: smoke -last_rule_updated_at: 2026-06-05 +last_rule_updated_at: 2026-06-12 --- # command-smoke local 테스트 @@ -24,14 +24,14 @@ last_rule_updated_at: 2026-06-05 ## 환경 -- host: -- port: +- host: `ssh toki@toki-labs.com` 원격 runner, checkout `/Users/toki/agent-work/oto` +- port: 기본 command smoke는 public port를 사용하지 않는다. Core 연동이 필요하면 OTO Core HTTP `18020`을 사용한다. - runtime: Dart SDK - package manager: dart pub -- docker: +- docker: 기본 smoke는 Docker를 사용하지 않는다. - external service: 없음 - model endpoint: -- credential: +- credential: private input 원문은 tracked 파일에 기록하지 않는다. ## 명령 @@ -68,7 +68,7 @@ All tests passed! ## 차단 기준 -- Dart SDK 또는 path dependency가 없어 local command를 시작할 수 없는 경우 +- 원격 runner에 Dart SDK 또는 path dependency가 없어 command를 시작할 수 없는 경우 ## 보고 항목 diff --git a/agent-test/local/core-smoke.md b/agent-test/local/core-smoke.md index 28aa09e..31895fa 100644 --- a/agent-test/local/core-smoke.md +++ b/agent-test/local/core-smoke.md @@ -3,7 +3,7 @@ test_env: local test_profile: core-smoke domain: core verification_type: smoke -last_rule_updated_at: 2026-06-05 +last_rule_updated_at: 2026-06-12 --- # core-smoke local 테스트 @@ -24,14 +24,14 @@ last_rule_updated_at: 2026-06-05 ## 환경 -- host: -- port: +- host: `ssh toki@toki-labs.com` 원격 runner, checkout `/Users/toki/agent-work/oto` +- port: 기본 core runner smoke는 public port를 사용하지 않는다. OTO Core HTTP publish 검증은 `18020`을 사용한다. - runtime: Dart SDK - package manager: dart pub -- docker: +- docker: 기본 smoke는 Docker를 사용하지 않는다. - external service: 없음 - model endpoint: -- credential: +- credential: private input 원문은 tracked 파일에 기록하지 않는다. ## 명령 @@ -66,7 +66,7 @@ All tests passed! ## 차단 기준 -- Dart SDK 또는 path dependency가 없어 local command를 시작할 수 없는 경우 +- 원격 runner에 Dart SDK 또는 path dependency가 없어 command를 시작할 수 없는 경우 ## 보고 항목 diff --git a/agent-test/local/framework-smoke.md b/agent-test/local/framework-smoke.md index e5a2d76..87c3389 100644 --- a/agent-test/local/framework-smoke.md +++ b/agent-test/local/framework-smoke.md @@ -3,7 +3,7 @@ test_env: local test_profile: framework-smoke domain: framework verification_type: smoke -last_rule_updated_at: 2026-06-07 +last_rule_updated_at: 2026-06-12 --- # framework-smoke local 테스트 @@ -24,14 +24,14 @@ last_rule_updated_at: 2026-06-07 ## 환경 -- host: -- port: +- host: `ssh toki@toki-labs.com` 원격 runner, checkout `/Users/toki/agent-work/oto` +- port: Flutter client/web preview `13020`, OTO Core HTTP `18020`; package-only tests는 public port를 사용하지 않는다. - runtime: Dart SDK, Flutter SDK, Go toolchain - package manager: dart pub, flutter pub, Go modules -- docker: +- docker: 기본 smoke는 Docker를 사용하지 않는다. - external service: 없음 - model endpoint: -- credential: +- credential: dependency source credential이나 private token 원문은 tracked 파일에 기록하지 않는다. ## 명령 @@ -83,7 +83,7 @@ All tests passed! ## 차단 기준 -- Dart SDK 또는 path dependency가 없어 local command를 시작할 수 없는 경우 +- 원격 runner에 Dart SDK, Flutter SDK, Go toolchain 또는 path dependency가 없어 command를 시작할 수 없는 경우 ## 보고 항목 diff --git a/agent-test/local/pipeline-smoke.md b/agent-test/local/pipeline-smoke.md index 5c9e4f4..73be176 100644 --- a/agent-test/local/pipeline-smoke.md +++ b/agent-test/local/pipeline-smoke.md @@ -3,7 +3,7 @@ test_env: local test_profile: pipeline-smoke domain: pipeline verification_type: smoke -last_rule_updated_at: 2026-06-05 +last_rule_updated_at: 2026-06-12 --- # pipeline-smoke local 테스트 @@ -24,14 +24,14 @@ last_rule_updated_at: 2026-06-05 ## 환경 -- host: -- port: +- host: `ssh toki@toki-labs.com` 원격 runner, checkout `/Users/toki/agent-work/oto` +- port: 기본 pipeline smoke는 public port를 사용하지 않는다. Core 연동이 필요하면 OTO Core HTTP `18020`을 사용한다. - runtime: Dart SDK - package manager: dart pub -- docker: +- docker: 기본 smoke는 Docker를 사용하지 않는다. - external service: 없음 - model endpoint: -- credential: +- credential: private input 원문은 tracked 파일에 기록하지 않는다. ## 명령 @@ -66,7 +66,7 @@ All tests passed! ## 차단 기준 -- Dart SDK 또는 path dependency가 없어 local command를 시작할 수 없는 경우 +- 원격 runner에 Dart SDK 또는 path dependency가 없어 command를 시작할 수 없는 경우 ## 보고 항목 diff --git a/agent-test/local/rules.md b/agent-test/local/rules.md index 3545cfd..53e2853 100644 --- a/agent-test/local/rules.md +++ b/agent-test/local/rules.md @@ -1,11 +1,12 @@ --- test_env: local -last_rule_updated_at: 2026-06-10 +last_rule_updated_at: 2026-06-12 --- # local 테스트 규칙 **현재 문서를 반드시 끝까지 정독하고 작업한다. 다 읽지 않고 즉각 작업은 금지한다.** +**기본 local 테스트 환경은 원격 runner다. 현재 workspace checkout에서의 `git diff --check`와 문서/문법 수준 확인은 편집 직후 preflight로만 사용하고, Dart/Flutter/Go/runtime evidence는 원격 runner 기준으로 판단한다.** ## 공통 규칙 @@ -19,19 +20,21 @@ last_rule_updated_at: 2026-06-10 ## 기본 환경 -- host: -- port: +- host: 기본 실행 host는 `ssh toki@toki-labs.com` 원격 runner이며, checkout 기준 위치는 `/Users/toki/agent-work/oto`다. +- port: OTO Core HTTP workspace host publish `18020`, Flutter client/web preview `13020`. 제품 local fallback `127.0.0.1:8080`은 compatibility 경로로만 해석한다. - runtime: Dart SDK, Flutter SDK, Go toolchain - package manager: dart pub, flutter pub, Go modules -- docker: +- docker: 기본 local smoke는 Docker를 사용하지 않는다. - external service: 없음 - model endpoint: -- credential: +- credential: `OTO_RUNNER_RELEASE_BASE_URL`, enrollment token, private release host 원문은 tracked 파일에 기록하지 않고 원격 환경 또는 사용자 제공 값에서만 주입한다. ## Workspace 포트/환경 체크리스트 -- OTO Core host publish 후보는 backend `18020`이다. 로컬 실행 기본값 `127.0.0.1:8080`은 compatibility 경로로만 해석한다. -- Flutter client/web preview 후보는 frontend `13020`이다. preview 포트와 `OTO_SERVER_HTTP_URL` 서버 연결 URL을 혼동하지 않는다. +- OTO Core host publish 표준은 backend `18020`이다. 원격 runner에서 Core를 띄울 때는 `make core-run` 또는 `OTO_CORE_ADDR=0.0.0.0:18020 go run ./cmd/oto-core` 기준으로 검증한다. +- Flutter client/web preview 표준은 frontend `13020`이다. preview 포트와 `OTO_SERVER_HTTP_URL` 서버 연결 URL을 혼동하지 않는다. +- 원격 runner에서 외부 브라우저/클라이언트가 Core에 접근해야 하면 `OTO_SERVER_HTTP_URL=http://toki-labs.com:18020`로 명시한다. remote-local process만 접근하면 `http://localhost:18020`도 허용한다. +- OTO owned wire/agent transport port는 아직 확정하지 않는다. 현재 `OTO_SERVER_WIRE_URL` fallback은 compatibility 값으로 보고 workspace project-owned slot에 넣지 않는다. - `OTO_RUNNER_RELEASE_BASE_URL`과 bootstrap command 검증은 source of truth와 validation 기준만 기록한다. secret, token, private release host 원문은 tracked 문서와 테스트 규칙에 남기지 않는다. - 독립 OTO Control Plane 검증에서 iop Edge/wire 포트를 OTO workspace 포트 표준으로 간주하지 않는다. @@ -57,8 +60,10 @@ last_rule_updated_at: 2026-06-10 - Setup: `make client-get` 또는 `cd apps/client && flutter pub get` - Lint: `make client-analyze` 또는 `cd apps/client && flutter analyze` - Test: `make client-test` 또는 `cd apps/client && flutter test` + - Web preview: `make client-run-web OTO_SERVER_HTTP_URL=http://toki-labs.com:18020` 또는 `cd apps/client && flutter run -d chrome --web-port=13020 --dart-define=OTO_SERVER_HTTP_URL=http://toki-labs.com:18020` - **services/core** (Go OTO Server): - Test: `make core-test` 또는 `cd services/core && go test ./...` + - Run: `make core-run` 또는 `cd services/core && OTO_CORE_ADDR=0.0.0.0:18020 go run ./cmd/oto-core` - **packages/flutter/oto_console** (Flutter OTO console package): - Setup: `cd packages/flutter/oto_console && flutter pub get` - Lint: `cd packages/flutter/oto_console && flutter analyze` diff --git a/agent-test/local/sample-smoke.md b/agent-test/local/sample-smoke.md index b4ba5f9..08ca2bd 100644 --- a/agent-test/local/sample-smoke.md +++ b/agent-test/local/sample-smoke.md @@ -3,7 +3,7 @@ test_env: local test_profile: sample-smoke domain: sample verification_type: smoke -last_rule_updated_at: 2026-06-05 +last_rule_updated_at: 2026-06-12 --- # sample-smoke local 테스트 @@ -24,14 +24,14 @@ last_rule_updated_at: 2026-06-05 ## 환경 -- host: -- port: +- host: `ssh toki@toki-labs.com` 원격 runner, checkout `/Users/toki/agent-work/oto` +- port: 기본 sample smoke는 public port를 사용하지 않는다. Core 연동이 필요하면 OTO Core HTTP `18020`을 사용한다. - runtime: Dart SDK - package manager: dart pub -- docker: +- docker: 기본 smoke는 Docker를 사용하지 않는다. - external service: 없음 - model endpoint: -- credential: +- credential: private input 원문은 tracked 파일에 기록하지 않는다. ## 명령 @@ -66,7 +66,7 @@ All tests passed! ## 차단 기준 -- Dart SDK 또는 path dependency가 없어 local command를 시작할 수 없는 경우 +- 원격 runner에 Dart SDK 또는 path dependency가 없어 command를 시작할 수 없는 경우 ## 보고 항목 diff --git a/agent-test/local/scheduler-smoke.md b/agent-test/local/scheduler-smoke.md index 43af9bf..47aa96f 100644 --- a/agent-test/local/scheduler-smoke.md +++ b/agent-test/local/scheduler-smoke.md @@ -3,7 +3,7 @@ test_env: local test_profile: scheduler-smoke domain: scheduler verification_type: smoke -last_rule_updated_at: 2026-06-05 +last_rule_updated_at: 2026-06-12 --- # scheduler-smoke local 테스트 @@ -24,14 +24,14 @@ last_rule_updated_at: 2026-06-05 ## 환경 -- host: -- port: +- host: `ssh toki@toki-labs.com` 원격 runner, checkout `/Users/toki/agent-work/oto` +- port: 기본 scheduler smoke는 public port를 사용하지 않는다. Core 연동이 필요하면 OTO Core HTTP `18020`을 사용한다. - runtime: Dart SDK - package manager: dart pub -- docker: +- docker: 기본 smoke는 Docker를 사용하지 않는다. - external service: 없음 - model endpoint: -- credential: +- credential: private input 원문은 tracked 파일에 기록하지 않는다. ## 명령 @@ -66,7 +66,7 @@ All tests passed! ## 차단 기준 -- Dart SDK 또는 path dependency가 없어 local command를 시작할 수 없는 경우 +- 원격 runner에 Dart SDK 또는 path dependency가 없어 command를 시작할 수 없는 경우 ## 보고 항목 diff --git a/apps/client/README.md b/apps/client/README.md index 8808a29..da0ccc7 100644 --- a/apps/client/README.md +++ b/apps/client/README.md @@ -45,5 +45,12 @@ compile-time define: flutter run -d chrome --web-port=13020 --dart-define=OTO_SERVER_HTTP_URL=http://localhost:18020 ``` +Remote runner evidence uses the same preview port. When the Core server is +host-published from `/Users/toki/agent-work/oto`, pass the remote host URL: + +```bash +make client-run-web OTO_SERVER_HTTP_URL=http://toki-labs.com:18020 +``` + The current app-level fallback `http://localhost:8080` remains a local compatibility default until the runtime default is intentionally migrated.