Consolidate roadmap updates, archive moves, and validation routing changes

This commit is contained in:
toki 2026-06-08 19:02:21 +09:00
parent 1673ba5628
commit 95aeabb271
19 changed files with 1404 additions and 70 deletions

View file

@ -20,6 +20,14 @@ bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_matrix.sh
프로토콜 또는 공개 API 변경은 호환성 작업으로 다룬다. 관련 문서를 갱신하고, 필요한 경우 protobuf binding을 재생성하며, 전체 검증 매트릭스가 통과해야 한다.
### 런타임 포트와 테스트 포트
Proto Socket은 라이브러리이며 frontend/backend runtime service port를 소유하지 않는다. 애플리케이션 서버가 사용할 host/port는 소비자가 정한다.
README의 `9090` 예시는 소비자 애플리케이션용 샘플 포트이며 test matrix reserved 대역이 아니다. 저장소의 cross-language/cross-runtime runner는 충돌을 줄이기 위해 `29090-29899` local port 대역을 테스트 전용 workspace 예외로 사용한다.
Dart.web 검증은 local Chrome이 없을 때 runner가 구성된 SSH remote browser host에서 실행할 수 있다. WSS 검증은 테스트용 self-signed certificate의 SPKI를 허용하는 Chrome wrapper를 사용하며, tracked 문서에는 credential, token, private endpoint 값을 기록하지 않는다.
---
## 설계 원칙
@ -113,6 +121,7 @@ class MyClient extends ProtobufClient {
// 3. server를 구현한다.
class MyServer extends ProtobufServer {
// 9090 is an application example port, not a proto-socket reserved test port.
MyServer() : super('0.0.0.0', 9090, (socket) => MyClient(socket));
@override
@ -174,6 +183,7 @@ func parserMap() protoSocket.ParserMap {
func main() {
ctx := context.Background()
// 9090 is an application example port, not a proto-socket reserved test port.
server := protoSocket.NewTcpServer("127.0.0.1", 9090, func(conn net.Conn) *protoSocket.TcpClient {
return protoSocket.NewTcpClient(conn, 30, 10, parserMap())
})

View file

@ -27,6 +27,13 @@ repo_root="$(cd "$script_dir/../../../../.." && pwd)"
log_dir="$(mktemp -d "${TMPDIR:-/tmp}/proto-socket-matrix.XXXXXX")"
run_started_at="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
run_record_stamp="$(date -u +%Y%m%d-%H%M%S)"
remote_web_env_file="$repo_root/agent-test/local/remote-web.env"
if [ -f "$remote_web_env_file" ]; then
set -a
# shellcheck disable=SC1090
. "$remote_web_env_file"
set +a
fi
remote_web_host="${PROTO_SOCKET_DART_WEB_REMOTE:-toki@toki-labs.com}"
remote_web_root_expr="${PROTO_SOCKET_DART_WEB_REMOTE_ROOT:-~/agent-work}"
remote_web_repo_name="${PROTO_SOCKET_DART_WEB_REMOTE_REPO:-proto-socket-dart-web}"

View file

@ -30,8 +30,11 @@ Proto Socket은 여러 언어와 플랫폼에서 일관되게 동작하는 얇
- [안정화 기준선](milestones/stability-baseline.md) - 상태: 완료; 목표: 현재 5개 언어 구현을 완성형 후보로 보고 안정성 판단과 유지 기준을 정리한다.
- [수신 큐와 처리 순서 보장](archive/phase/stability-maintenance/milestones/inbound-queue-ordering.md) - 상태: 완료; 목표: 현재 5개 언어 구현에 per-connection 수신 큐와 언어별 worker gateway 후보를 도입해 수신 처리 순서, 자동 응답 출력 순서, thread-safe한 공유 상태 접근, 대량 처리 성능 개선 가능성을 보장한다.
- [고성능 병렬 운용 기준선과 최적화](archive/phase/stability-maintenance/milestones/high-performance-parallel-operations.md) - 상태: 완료; 목표: 현재 5개 언어 구현의 병렬 운용 성능을 언어별/transport별로 측정하고 gateway, queue, worker, serialization 병목을 최적화한다.
- [워크스페이스 포트/환경 표준화](milestones/workspace-port-env-standardization.md) - 상태: [진행중]; 목표: proto-socket이 runtime service port를 소유하지 않는다는 점과 cross-language test runner의 fixed local port 대역을 workspace 표준 예외로 문서화한다.
- [언어별 성능 병목 개선](milestones/performance-hotspot-optimization.md) - 상태: [계획]; 목표: 측정 결과에서 확인된 Dart TCP fixed latency/large payload 및 isolate receive path hardening, TypeScript WS large payload, Kotlin WS latency/slow-mix 검증 모델, TypeScript gateway `worker_threads` overhead 병목을 안정성 hard gate와 단일 mandatory receive path 원칙을 유지하면서 개선하고, Go/Python reference 기준점을 보강한다.
- [언어별 성능 병목 개선](archive/phase/stability-maintenance/milestones/performance-hotspot-optimization.md) - 상태: 완료; 목표: 측정 결과에서 확인된 Dart TCP fixed latency/large payload 및 isolate receive path hardening, TypeScript WS large payload, Kotlin WS latency/slow-mix 검증 모델, TypeScript gateway `worker_threads` overhead 병목을 안정성 hard gate와 단일 mandatory receive path 원칙을 유지하면서 개선하고, Go/Python reference 기준점을 보강한다.
- [워크스페이스 포트/환경 표준화](archive/phase/stability-maintenance/milestones/workspace-port-env-standardization.md) - 상태: 완료; 목표: proto-socket이 runtime service port를 소유하지 않는다는 점과 cross-language test runner의 fixed local port 대역을 workspace 표준 예외로 문서화한다.
- [변경 기반 테스트 라우팅 정형화](milestones/change-aware-test-routing.md) - 상태: [진행중]; 목표: 마지막 통과 테스트 지점과 현재 변경 내용을 분석해 기능, 속도, 안정성 테스트 중 필요한 검증 범위를 자동 선택하고, 언어별 anchor x5와 야간 장시간 측정을 분리한다.
- [야간 대용량 패킷 성능 기준선](milestones/nightly-large-payload-baseline.md) - 상태: [진행중]; 목표: 64KB/1MB payload 성능 baseline과 회귀 판단을 실행 host local time 20:00 이후 야간 window에서 별도 수집해 주간 작업 부하 편차와 분리한다.
- [대용량 WS/병렬 전송 후속 최적화](milestones/large-payload-followup-optimization.md) - 상태: [스케치]; 목표: 야간 기준선에서 병목이 유지되는 row를 근거로 TypeScript WS 1MB, WS fixed latency, Kotlin WS 1MB, Dart large-packet guard 후보를 후속 최적화로 구체화한다.
### 남은 native platform 포팅

View file

@ -10,7 +10,7 @@
## 상태
[검토중]
[완료]
## 구현 잠금
@ -146,16 +146,16 @@ Kotlin TCP는 현재 same-language 기준에서 안정적인 유지 대상이다
## 완료 리뷰
- 상태: 요청
- 상태: 승인
- 요청일: 2026-06-07
- 완료 근거:
- 모든 기능 Task와 각 Task의 검증 evidence가 `[x]` 상태다.
- `perf-regression``agent-task/archive/2026/06/m-performance-hotspot-optimization/16_perf_regression/complete.log``agent-test/runs/20260607-041332-proto-socket-performance-full.md`를 근거로 완료했다.
- `compat-matrix``agent-task/archive/2026/06/m-performance-hotspot-optimization/17+16_compat_matrix/complete.log``agent-test/runs/20260607-115737-proto-socket-full-matrix.md`를 근거로 완료했다.
- 리뷰 필요:
- [ ] 사용자가 완료 결과를 확인했다
- [ ] archive 이동을 승인했다
- 리뷰 코멘트: Milestone은 완료 후보 상태다. 사용자가 완료 결과를 확인하고 archive 이동을 승인하면 `[완료]` 전환 및 archive 이동을 진행한다.
- [x] 사용자가 완료 결과를 확인했다
- [x] archive 이동을 승인했다
- 리뷰 코멘트: 2026-06-08 사용자 요청으로 `[완료]` 전환 및 archive 이동을 진행했다.
## 범위 제외

View file

@ -0,0 +1,72 @@
# 워크스페이스 포트/환경 표준화
## 목표
Proto Socket은 runtime service port를 소유하지 않는 라이브러리지만, cross-language/cross-runtime test runner에서 고정 local port 대역을 사용한다. 이 Milestone은 proto-socket의 fixed test port 대역을 workspace 포트 표준의 예외로 명확히 기록하고, remote Dart web/Chrome fallback 환경도 raw secret 없이 재현 가능한 기준으로 정리한다.
## 단계
안정화와 유지
## 상태
[완료]
## 구현 잠금
- 상태: 해제
- 결정 필요: 없음
## 범위
- runtime service/frontend/backend 포트 없음 상태를 명시
- cross-language/cross-runtime test runner의 fixed local port 대역을 workspace 표준 예외로 문서화
- remote Dart web/Chrome fallback runner와 WSS/SPKI wrapper 환경을 테스트 runner 예외로 정리
- 일반 예시 포트와 test matrix reserved 대역이 다른 프로젝트 host publish 포트와 충돌하지 않도록 기준 정리
- private SSH host, credential, token 값은 tracked 문서에 쓰지 않고 runner 책임 경계만 기록
## 기능
### Epic: [exception] Proto-socket port exception
Proto Socket의 테스트용 포트 사용을 제품 runtime 포트와 구분한다.
- [x] [no-runtime-port] proto-socket은 frontend/backend runtime service port를 소유하지 않는다는 기준을 README/test 문서에서 확인 가능하게 정리한다. (evidence: `README.md``런타임 포트와 테스트 포트`, `agent-test/local/rules.md`의 공통 규칙)
- [x] [test-port-range] cross-language fixed local port 대역 `29090-29899`를 workspace 표준 예외로 문서화하고 충돌 방지 기준을 남긴다. (evidence: `agent-test/local/rules.md`, `agent-test/local/proto-socket-full-matrix.md`, `agent-test/local/proto-socket-performance-baseline.md`; `rg --sort path -o --no-filename "\b29[0-9]{3}\b" ...` 결과 min `29090`, max `29899`)
- [x] [example-ports] 예제/문서의 `9090`류 포트가 test matrix reserved 대역과 제품 host publish 대역을 오해하게 만들지 않는지 점검한다. (evidence: `README.md``9090` 설명과 Dart/Go quick start 주석)
- [x] [remote-web-runner] Dart web/Chrome remote fallback, WSS/SPKI wrapper, SSH runner 경계는 raw secret 없이 테스트 환경 예외로 정리한다. (evidence: `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_matrix.sh`가 ignored `agent-test/local/remote-web.env`를 먼저 읽는다. `agent-test/local/rules.md`, `agent-test/local/proto-socket-full-matrix.md`, `agent-test/local/dart-smoke.md`가 local 설정 책임과 SSH 인증 경계를 기록한다. `rg`로 tracked test docs의 raw remote host/path 제거 확인)
## 작업 동기화
- 2026-06-08 기준 활성 `agent-task/` 작업 파일은 없다.
- 기능 Task [no-runtime-port], [test-port-range], [example-ports], [remote-web-runner]는 작은 문서 작업으로 직접 처리했고, runner 기본값 변경 같은 동작 변경은 이번 범위에서 제외해 별도 plan을 만들지 않았다.
- `언어별 성능 병목 개선` Milestone은 `[완료]` 후 archive로 이동했으므로, 신규 작업의 기본 배치 대상은 아니다.
## 완료 리뷰
- 상태: 승인됨
- 요청일: 2026-06-08
- 완료 근거:
- README와 local test docs가 proto-socket의 runtime service port 비소유 원칙과 test runner fixed port 대역 `29090-29899`를 설명한다.
- README quick start의 `9090` 예시는 소비자 애플리케이션 샘플 포트로 표시했고, test matrix reserved 대역과 분리했다.
- Dart.web remote fallback과 WSS/SPKI wrapper는 ignored local env 파일과 runner 설정 경계로 정리했고, tracked test docs에는 raw credential/token/private endpoint를 남기지 않았다.
- 리뷰 필요:
- [x] 사용자가 완료 결과를 확인했다
- [x] archive 이동을 승인했다
- 리뷰 코멘트: 2026-06-08 사용자 요청으로 `[완료]` 전환 및 archive 이동을 진행했다.
## 범위 제외
- wire format, proto schema, nonce 의미 변경
- performance hotspot 개선 작업
- package registry release 작업
- C# 또는 Swift 포팅
- private SSH credential, host token, certificate secret 기록
## 작업 컨텍스트
- 관련 경로: `agent-test/local/`, `agent-ops/skills/project/run-proto-socket-test-matrix/`, `dart/`, `go/`, `kotlin/`, `python/`, `typescript/`, `examples/`
- 표준선(선택): `29090-29899`는 workspace frontend/backend/backend-artifact 대역이 아니라 proto-socket test runner 전용 reserved range다.
- 선행 작업: workspace 공통 포트 inventory 정리
- 후속 작업: test docs와 runner script의 port drift 방지
- 확인 필요: 없음

View file

@ -0,0 +1,108 @@
# 변경 기반 테스트 라우팅 정형화
## 목표
사용자가 "테스트 해봐"처럼 테스트 범위를 직접 지정하지 않아도, 마지막 통과 테스트 지점과 현재 변경 내용을 분석해 기능 테스트, 속도 테스트, 안정성 테스트 중 필요한 검증을 자동으로 고른다. 명시 요청은 "속도 테스트 해봐", "안정성 테스트 해봐", "전체 테스트 해봐" 세 라우팅으로 분리하고, 언어별 변경은 수정 언어 중심 x5 또는 양방향 x5를 기본 기준점으로 삼으며, 장시간/대용량 측정은 야간 window로 분리한다.
## 단계
안정화와 유지
## 상태
[진행중]
## 구현 잠금
- 상태: 해제
- 결정 필요: 없음
## 범위
- 마지막 PASS 테스트 record와 현재 변경 파일을 기반으로 테스트 범위를 추론한다.
- 테스트 종류를 `functional`, `performance`, `stability` 세 축으로 정형화한다.
- 사용자-facing 라우팅은 `테스트 해봐`, `속도 테스트 해봐`, `안정성 테스트 해봐`, `전체 테스트 해봐` 4개로 정형화한다.
- 언어별 변경은 Dart, Go, Kotlin, Python, TypeScript 중 수정 언어를 anchor로 잡아 server x5, client x5, 또는 both x5로 라우팅한다.
- x5의 self 방향은 cross pair가 아니라 해당 언어 same-language/unit 또는 same-language transport row로 채운다.
- Dart.web/Dart.web(WSS)는 server-capable 5개 언어 x5에는 넣지 않고, full functional matrix 또는 Dart.web/browser 관련 변경에서 필수 client coverage로 유지한다.
- proto/schema, codec, framing, communicator, transport, queue/gateway, benchmark/test runner 변경은 더 넓은 검증 범위로 승격한다.
- 속도와 안정성 테스트는 quick/daytime과 full/nightly 기준을 분리한다.
- 정기 full test는 매 변경 gate와 별도 성격으로 둔다.
- 각 라우팅은 `run_test_by_change.sh`, `run_speed_test.sh`, `run_stability_test.sh`, `run_full_test.sh` shell entrypoint로 관리하고, shell 내부에서 기존 `run_matrix.sh`, `run_performance.sh`, `run_stress.sh`를 조합한다.
## 기능
### Epic: [change-classifier] 변경 내용 분류
테스트 요청 시 현재 diff가 어떤 검증 범위를 요구하는지 판단한다.
- [x] [last-pass-point] `agent-test/runs/`의 요청 라우팅과 맞는 최신 PASS record와 git ref를 기준으로 마지막 테스트 지점을 찾는다. 검증: PASS record가 없을 때는 현재 diff 기준 보수 라우팅으로 fallback한다.
- [x] [diff-source] 마지막 PASS ref, 현재 HEAD, uncommitted 변경을 합쳐 실제 테스트 대상 diff를 만든다. 검증: commit된 변경과 작업트리 변경이 동시에 있어도 누락하지 않는다.
- [x] [path-domain-map] 변경 파일을 언어 구현, proto/schema, transport, communicator, queue/gateway, performance harness, test docs, docs-only로 분류한다. 검증: 각 분류가 선택한 테스트 kind와 scope에 반영된다.
- [ ] [risk-escalation] codec/framing/proto/communicator 변경은 수정 언어 범위를 넘어 full 또는 wider functional gate 후보로 승격한다. 검증: protocol-relevant 변경이 smoke test만으로 끝나지 않는다.
### Epic: [functional-routing] 기능 테스트 라우팅
일반 수정 후 항상 실행할 최소 기능 기준점을 정한다.
- [ ] [anchor-language-x5] 언어 구현 변경은 수정 언어 중심 server x5 또는 client x5를 선택한다. 검증: server-only/client-only 변경은 해당 방향 x5를 실행 후보로 만든다.
- [ ] [anchor-language-both-x5] transport, codec, communicator, public API 변경은 수정 언어 기준 양방향 x5를 선택한다. 검증: 같은 언어 self 방향은 same-language 검증으로 채우고 중복 방향은 결과에서 한 번만 센다.
- [ ] [dart-web-coverage] Dart.web/Dart.web(WSS)는 full functional matrix와 browser client 관련 변경에서 필수 coverage로 유지한다. 검증: full functional route가 기존 Dart.web/WSS client 열을 누락하지 않는다.
- [ ] [full-functional-periodic] 정기 full 또는 넓은 protocol 변경은 functional full 5x5와 Dart.web/WSS client coverage를 선택한다. 검증: 전체 cross matrix가 매 변경 기본값이 아니라 정기/고위험 변경용으로 분리된다.
### Epic: [performance-stability-routing] 속도/안정성 라우팅
성능과 안정성은 목적을 분리하되, 측정 row에는 stability hard gate를 같이 남긴다.
- [ ] [daytime-performance-quick] 성능 영향 가능 변경은 낮 시간 quick performance를 선택한다. 검증: quick 결과는 변경 후 속도 참고값이며 야간 baseline으로 기록하지 않는다.
- [ ] [daytime-stability-quick] queue, gateway, concurrency, transport 변경은 낮 시간 quick stability/stress를 선택한다. 검증: timeout, nonce mismatch, type mismatch, FIFO violation, pending leak, queue/gateway backlog가 hard gate로 남는다.
- [ ] [nightly-heavy-routing] sustained, high parallel, 1MB payload, 장시간 leak 확인은 20:00 이후 full/nightly 후보로 분리한다. 검증: 낮 시간 full 장시간 측정은 baseline 완료 근거로 쓰이지 않는다.
- [ ] [periodic-full-routing] 정기 full test는 functional full 5x5와 performance/stability nightly full을 구분해 실행 후보를 만든다. 검증: 정기 full이 매 수정 gate와 분리된다.
### Epic: [user-entrypoints] 사용자 요청 4분류
사용자가 길게 지정하지 않아도 요청 문장으로 테스트 의도를 안정적으로 고른다.
- [ ] [auto-test-route] `테스트 해봐`는 마지막 PASS 지점과 현재 diff를 분석해 functional/performance/stability 중 필요한 범위를 자동 선택한다. 검증: 변경 내용 분석 결과와 선택한 테스트 범위를 실행 전에 보고한다.
- [ ] [speed-test-route] `속도 테스트 해봐`는 performance 중심으로 라우팅하고, 낮 시간 quick과 야간 full 후보를 분리한다. 검증: 장시간/1MB/full이 20:00 이전에 baseline으로 처리되지 않는다.
- [ ] [stability-test-route] `안정성 테스트 해봐`는 timeout, nonce/type mismatch, FIFO, pending leak, queue/gateway backlog 중심으로 라우팅한다. 검증: 성능 수치가 좋아도 hard gate 위반 row는 PASS가 아니다.
- [ ] [full-test-route] `전체 테스트 해봐`는 functional full 5x5를 기본으로 실행하고, performance/stability full은 시간대에 따라 즉시 실행 또는 nightly pending으로 분리한다. 검증: 실행하지 않은 야간 full 항목을 PASS로 보고하지 않는다.
### Epic: [skill-and-runner-contract] 스킬과 runner 계약
스킬이 선택한 라우팅을 실제 명령으로 연결한다.
- [ ] [routing-skill] 프로젝트 스킬 또는 기존 `run-proto-socket-test-matrix` 스킬에 "작업된 내용을 바탕으로 테스트" 요청 라우팅 절차를 추가한다. 검증: 사용자가 언어와 테스트 종류를 지정하지 않아도 변경 분석 결과와 선택한 검증 범위를 먼저 보고한다.
- [ ] [auto-test-shell] `run_test_by_change.sh` 자동 라우팅 shell을 추가해 `테스트 해봐` 요청의 기본 실행 단위로 쓴다. 검증: 마지막 PASS 지점, 변경 분류, 선택된 하위 command가 결과 기록에 남는다.
- [ ] [speed-test-shell] `run_speed_test.sh` 속도 전용 shell을 추가해 quick/daytime과 full/nightly 후보를 관리한다. 검증: 성능 관련 변경에서 기존 `run_performance.sh`/`run_stress.sh`를 직접 외우지 않아도 실행된다.
- [ ] [stability-test-shell] `run_stability_test.sh` 안정성 전용 shell을 추가해 quick stress와 nightly long-run 후보를 관리한다. 검증: stability hard gate 요약이 별도 결과로 남는다.
- [ ] [full-test-shell] `run_full_test.sh` 전체 테스트 shell을 추가해 functional full과 nightly heavy 후보를 분리한다. 검증: 기존 `run_matrix.sh --all`과 performance/stability full이 한 결과 계약 안에서 구분된다.
- [ ] [anchor-runner-options] 필요한 경우 각 shell 또는 기존 runner에 `--anchor <lang>``--direction server|client|both` 또는 동등한 개별 명령 조합을 추가한다. 검증: 수정 언어 중심 x5를 full 5x5 없이 실행할 수 있다.
- [ ] [test-profile-docs] `agent-test/local/rules.md`와 관련 profile 문서에 4개 shell entrypoint와 주야간 분리 기준을 반영한다. 검증: 테스트 문서만 읽어도 네 라우팅의 명령과 판정 기준을 알 수 있다.
- [ ] [result-report-contract] 결과 보고에 선택 이유, 실행 명령, 결과 record, skipped/nightly-pending 항목을 남긴다. 검증: 실행하지 않은 야간 full을 PASS로 오인하지 않는다.
## 완료 리뷰
- 상태: 없음
- 요청일: 없음
- 완료 근거: 없음
- 리뷰 필요:
- [ ] 사용자가 완료 결과를 확인했다
- [ ] archive 이동을 승인했다
- 리뷰 코멘트: 없음
## 범위 제외
- 이번 마일스톤은 실제 성능 최적화를 수행하지 않는다.
- 모든 변경마다 full 5x5 또는 full performance를 강제하지 않는다.
- shell entrypoint는 기존 runner를 대체하는 대형 rewrite가 아니라, 사용자 요청 라우팅과 결과 계약을 고정하는 얇은 wrapper로 둔다.
- "기능 테스트 해봐"는 별도 사용자-facing 라우팅으로 확장하지 않고, `테스트 해봐`의 변경 기반 functional gate 또는 `전체 테스트 해봐`의 full functional gate로 처리한다.
- 야간 record 없이 장시간/대용량 baseline을 확정하지 않는다.
- C#/Swift 포팅, package registry release, 외부 CI/CD runner 연결은 포함하지 않는다.
## 작업 컨텍스트
- 관련 경로: `agent-ops/skills/project/run-proto-socket-test-matrix/SKILL.md`, `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_matrix.sh`, `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_performance.sh`, `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_stress.sh`, `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/`, `agent-test/local/rules.md`, `agent-test/local/proto-socket-full-matrix.md`, `agent-test/local/proto-socket-performance-baseline.md`, `agent-test/runs/`
- 선행 작업: 없음
- 후속 작업: `야간 대용량 패킷 성능 기준선`, `대용량 WS/병렬 전송 후속 최적화`
- 표준선: 기본 사용자 요청은 "변경 내용 기반 자동 라우팅"으로 처리하고, 사용자가 명시적으로 범위를 지정하면 그 범위를 우선한다.

View file

@ -0,0 +1,74 @@
# 대용량 WS/병렬 전송 후속 최적화
## 목표
야간 대용량 패킷 기준선에서 병목이 유지되는 row를 근거로, 64KB/1MB WebSocket 및 병렬 전송 성능을 추가 개선한다. 기준선 수집 전에는 구현하지 않고, 후보 범위와 판정 기준을 정리하는 스케치 상태로 둔다.
## 단계
안정화와 유지
## 상태
[스케치]
## 승격 조건
- [ ] `야간 대용량 패킷 성능 기준선`에서 20:00 이후 full performance record가 수집됐다.
- [ ] `야간 대용량 패킷 성능 기준선`에서 payload focused record가 수집됐다.
- [ ] TypeScript WS 1MB, WS fixed latency, Kotlin WS 1MB, Dart large-packet guard 중 1차 구현 대상을 선택했다.
- [ ] 선택한 대상의 성공 기준이 throughput, p99, memory, stability hard gate 관점에서 정리됐다.
## 구현 잠금
- 상태: 잠금
- 결정 필요:
- 야간 기준선 결과를 보고 1차 개선 대상을 선택해야 한다.
- 성능 개선 목표를 절대값, 이전 대비 비율, reference 대비 위치 중 어떤 기준으로 볼지 정해야 한다.
## 범위
- 야간 기준선에서 재현되는 병목 row만 구현 대상으로 삼는다.
- TypeScript WS 1MB, WS 계열 fixed latency, Kotlin WS 1MB, Dart large-packet 회귀 방지를 우선 후보로 둔다.
- stability hard gate는 timeout, nonce mismatch, response type mismatch, FIFO violation, pending leak, queue/gateway backlog leak 0을 유지한다.
- 성능 개선은 cross-language matrix와 focused payload/stress record로 검증한다.
## 기능
### Epic: [evidence-selection] 기준선 기반 후보 선정
야간 record로 실제 구현 대상을 좁힌다.
- [ ] [night-evidence-review] 야간 full/focused record에서 64KB/1MB TCP/WS rows를 비교해 병목이 남은 row를 분류한다. 검증: 주간 exploratory record만으로 구현 대상을 선택하지 않는다.
- [ ] [primary-target] 1차 개선 대상 row와 제외 대상을 정한다. 검증: 선택 사유가 야간 record의 throughput, p99, memory, stability hard gate에 근거한다.
### Epic: [candidate-paths] 최적화 후보 경로
후보별로 구현 위험과 검증 방법을 분리한다.
- [ ] [typescript-ws-1mb-path] TypeScript WS 1MB 병목이 야간에도 유지되면 mask/protobuf/parse queue 경로를 우선 분석한다.
- [ ] [ws-fixed-latency-path] WS 계열 fixed latency가 야간에도 유지되면 transport별 공통 지연 경로와 언어별 worker/gateway path를 분리해 분석한다.
- [ ] [kotlin-ws-guard] Kotlin WS 1MB는 야간 record에서 개선 유지 여부를 확인하고, 회귀가 보이면 별도 구현 대상으로 승격한다.
- [ ] [dart-large-packet-guard] Dart TCP/WS 1MB는 기존 개선이 유지되는지 감시하고, 회귀가 보이면 guard 또는 path hardening 대상으로 승격한다.
## 완료 리뷰
- 상태: 없음
- 요청일: 없음
- 완료 근거: 없음
- 리뷰 필요:
- [ ] 사용자가 완료 결과를 확인했다
- [ ] archive 이동을 승인했다
- 리뷰 코멘트: 없음
## 범위 제외
- 야간 기준선 없이 코드 최적화에 들어가지 않는다.
- C#/Swift 포팅, package registry release, 외부 CI/CD runner 연결은 포함하지 않는다.
- Go/Python reference path를 불필요하게 변경하지 않는다.
## 작업 컨텍스트
- 관련 경로: `agent-roadmap/milestones/nightly-large-payload-baseline.md`, `agent-test/local/proto-socket-performance-baseline.md`, `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_performance.sh`, `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_stress.sh`
- 선행 작업: `야간 대용량 패킷 성능 기준선`
- 표준선: 이 마일스톤은 야간 기준선 결과를 받은 뒤 `[계획]`으로 승격한다.

View file

@ -0,0 +1,78 @@
# 야간 대용량 패킷 성능 기준선
## 목표
대용량 payload 성능은 주간 작업 부하에 따른 편차가 크므로, 64KB/1MB 패킷 전송 성능의 기준선과 회귀 판단은 작업 부하가 낮은 야간 시간대에 별도로 수집한다. 주간 결과는 문제 재현이나 방향성 확인용 exploratory record로만 보고, baseline 또는 완료 판정 근거로 쓰지 않는다.
## 단계
안정화와 유지
## 상태
[진행중]
## 구현 잠금
- 상태: 해제
- 결정 필요: 없음
## 범위
- 64KB/1MB payload 중심의 TCP/WS 성능 baseline을 야간 전용 record로 수집한다.
- 야간 실행 조건은 테스트 실행 host의 local time 기준 20:00 이후로 둔다.
- 가능하면 20:00-06:00 사이의 idle window에서 실행하고, 작업 중인 foreground build/test/editor 부하가 큰 시간대는 baseline에서 제외한다.
- Dart, Go, Kotlin, Python, TypeScript의 TCP/WS payload rows를 같은 host/runtime/profile에서 비교한다.
- TypeScript WS 1MB, Dart TCP/WS 1MB, Kotlin WS 1MB처럼 주간 측정에서 병목 또는 편차가 컸던 row를 우선 감시한다.
- stability hard gate는 기존 성능 기준과 동일하게 timeout, nonce mismatch, response type mismatch, FIFO violation, pending leak, queue/gateway backlog leak 0을 요구한다.
- 주간 측정 결과는 회귀 판정에 직접 쓰지 않고, 야간 재측정 후보를 고르는 참고 자료로만 사용한다.
## 기능
### Epic: [night-window] 야간 실행 조건
대용량 payload baseline은 낮 시간 작업 부하와 분리한다.
- [ ] [time-window-rule] 64KB/1MB payload baseline 후보는 실행 host local time 기준 20:00 이후 시작한 record만 인정한다. 검증: 결과 기록의 실행 일시와 host timezone 또는 실행 메모가 야간 조건을 확인 가능하게 남는다.
- [ ] [daytime-policy] 20:00 이전에 수집한 대용량 payload 결과는 exploratory record로 표시하고, baseline/regression 완료 근거에서 제외한다. 검증: milestone 완료 근거에 주간 record가 baseline으로 쓰이지 않는다.
### Epic: [payload-baseline] 대용량 payload 기준선
작업 부하가 낮은 시간대에 같은 profile을 반복해 편차를 줄인다.
- [ ] [night-full-record] 20:00 이후 `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_performance.sh --full`을 실행해 야간 full performance record를 남긴다. 검증: same-language, cross-language, TypeScript gateway 구성요소가 모두 기록되고 대용량 payload rows가 포함된다.
- [ ] [payload-focused-record] 20:00 이후 `run_stress.sh --full --profile payload` 계열 focused record를 수집해 64KB/1MB TCP/WS rows를 별도로 확인한다. 검증: Dart, Go, Kotlin, Python, TypeScript payload rows가 stability hard gate 0으로 기록된다.
- [ ] [repeatability] 필요하면 서로 다른 야간 window에서 최소 2회 이상 반복해 p99/throughput 편차를 비교한다. 검증: 같은 host/runtime/profile의 night records끼리 비교하고, 편차가 큰 row는 baseline 확정 대신 watchlist로 남긴다.
### Epic: [large-packet-watchlist] 큰 패킷 병목 감시
기존 최적화가 실제 idle 조건에서도 유지되는지 확인한다.
- [ ] [dart-large-packet] Dart TCP/WS 64KB/1MB rows가 야간 기준에서도 안정성 hard gate를 유지하고, 주간 대비 방향성이 개선으로 유지되는지 확인한다.
- [ ] [kotlin-ws-large-packet] Kotlin WS 64KB/1MB rows의 p99, throughput, memory, queue backlog를 야간 기준으로 다시 확인한다.
- [ ] [typescript-ws-large-packet] TypeScript WS 1MB row를 야간 기준으로 재측정하고, 병목이 여전히 남으면 다음 최적화 후보로 분리한다.
- [ ] [reference-large-packet] Go/Python TCP/WS 1MB rows를 야간 reference fast/medium path로 확정한다.
## 완료 리뷰
- 상태: 없음
- 요청일: 없음
- 완료 근거: 없음
- 리뷰 필요:
- [ ] 사용자가 완료 결과를 확인했다
- [ ] archive 이동을 승인했다
- 리뷰 코멘트: 없음
## 범위 제외
- 이번 마일스톤은 즉시 코드 최적화를 수행하지 않는다.
- 야간 record 없이 주간 결과만으로 성능 회귀 또는 개선을 확정하지 않는다.
- 서로 다른 host/runtime/profile의 절대 throughput/p99를 직접 비교하지 않는다.
- package registry release, 외부 CI/CD runner 연결, C#/Swift 포팅은 포함하지 않는다.
## 작업 컨텍스트
- 관련 경로: `agent-test/local/proto-socket-performance-baseline.md`, `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_performance.sh`, `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_stress.sh`, `agent-test/runs/`
- 선행 작업: `언어별 성능 병목 개선`, `성능 기록 판정 자동화`
- 후속 작업: `대용량 WS/병렬 전송 후속 최적화` 스케치에서 야간 기준에서도 병목이 유지되는 row를 구현 후보로 승격한다.
- 표준선: 대용량 payload baseline은 실행 host local time 기준 20:00 이후 시작한 결과만 인정한다.

View file

@ -1,63 +0,0 @@
# 워크스페이스 포트/환경 표준화
## 목표
Proto Socket은 runtime service port를 소유하지 않는 라이브러리지만, cross-language/cross-runtime test runner에서 고정 local port 대역을 사용한다. 이 Milestone은 proto-socket의 fixed test port 대역을 workspace 포트 표준의 예외로 명확히 기록하고, remote Dart web/Chrome fallback 환경도 raw secret 없이 재현 가능한 기준으로 정리한다.
## 단계
안정화와 유지
## 상태
[진행중]
## 구현 잠금
- 상태: 해제
- 결정 필요: 없음
## 범위
- runtime service/frontend/backend 포트 없음 상태를 명시
- cross-language/cross-runtime test runner의 fixed local port 대역을 workspace 표준 예외로 문서화
- remote Dart web/Chrome fallback runner와 WSS/SPKI wrapper 환경을 테스트 runner 예외로 정리
- 일반 예시 포트와 test matrix reserved 대역이 다른 프로젝트 host publish 포트와 충돌하지 않도록 기준 정리
- private SSH host, credential, token 값은 tracked 문서에 쓰지 않고 runner 책임 경계만 기록
## 기능
### Epic: [exception] Proto-socket port exception
Proto Socket의 테스트용 포트 사용을 제품 runtime 포트와 구분한다.
- [ ] [no-runtime-port] proto-socket은 frontend/backend runtime service port를 소유하지 않는다는 기준을 README/test 문서에서 확인 가능하게 정리한다.
- [ ] [test-port-range] cross-language fixed local port 대역 `29090-29899`를 workspace 표준 예외로 문서화하고 충돌 방지 기준을 남긴다.
- [ ] [example-ports] 예제/문서의 `9090`류 포트가 test matrix reserved 대역과 제품 host publish 대역을 오해하게 만들지 않는지 점검한다.
- [ ] [remote-web-runner] Dart web/Chrome remote fallback, WSS/SPKI wrapper, SSH runner 경계는 raw secret 없이 테스트 환경 예외로 정리한다.
## 완료 리뷰
- 상태: 없음
- 요청일: 없음
- 완료 근거: 없음
- 리뷰 필요:
- [ ] 사용자가 완료 결과를 확인했다
- [ ] archive 이동을 승인했다
- 리뷰 코멘트: 없음
## 범위 제외
- wire format, proto schema, nonce 의미 변경
- performance hotspot 개선 작업
- package registry release 작업
- C# 또는 Swift 포팅
- private SSH credential, host token, certificate secret 기록
## 작업 컨텍스트
- 관련 경로: `agent-test/local/`, `agent-ops/skills/project/run-proto-socket-test-matrix/`, `dart/`, `go/`, `kotlin/`, `python/`, `typescript/`, `examples/`
- 표준선(선택): `29090-29899`는 workspace frontend/backend/backend-artifact 대역이 아니라 proto-socket test runner 전용 reserved range다.
- 선행 작업: workspace 공통 포트 inventory 정리
- 후속 작업: test docs와 runner script의 port drift 방지
- 확인 필요: 없음

View file

@ -0,0 +1,114 @@
# CODE REVIEW cloud G07 - m-change-aware-test-routing/01_change_classifier_core
## 구현 요약
- 상태: 구현 완료
- 변경 파일: `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh` (신규)
- 계획 파일: `PLAN-cloud-G07.md`
## Roadmap Targets
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `last-pass-point`
- `diff-source`
- `path-domain-map`
## 계획 대비 변경 사항
- PLAN에서 언급한 `test_route_common.sh` 또는 `run_test_by_change.sh --classify-only` 두 방안 중 단일 파일 `run_test_by_change.sh`로 구현.
- 출력 계약은 key: value 줄 + Markdown 표 혼합 형식으로 구현 (후속 task에서 grep/sed로 파싱 가능).
## 검증 결과
### 필수 명령
```
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only
```
출력 (요약):
```
route: auto
last_pass_record: agent-test/runs/20260607-115737-proto-socket-full-matrix.md
last_pass_ref: 83a8b22
fallback_reason: (없음)
changed_file_count: 14
detected_languages: 없음
detected_domains: docs,test-docs
docs_only: no
untracked_included: yes
```
변경 파일 14개가 언어/도메인 분류 표로 출력됨.
### route별 동작
| route | last_pass_ref | profile |
|-------|--------------|---------|
| auto | 83a8b22 | proto-socket-full-matrix |
| speed | 85b86fc | proto-socket-performance-quick |
| stability | 85b86fc | proto-socket-stress-full |
| full | 83a8b22 | proto-socket-full-matrix |
### 보조 명령
```
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --help
# → 사용법 출력 확인
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route bad
# → exit code 2, 오류 메시지 출력 확인
git diff --check -- agent-ops/skills/project/run-proto-socket-test-matrix/scripts
# → exit 0 (whitespace 오류 없음)
```
## 코드리뷰 체크리스트
- [x] 마지막 PASS record 선택이 route별로 동작한다.
- [x] PASS record 부재/해석 불가 fallback이 명확하다.
- [x] tracked, staged, unstaged, untracked 변경 파일이 누락되지 않는다.
- [x] archive 접근 금지 범위를 분석 대상에서 제외한다.
- [x] path/domain/language 분류 출력이 안정적이다.
- [x] 실제 테스트 실행 없이 classify-only 결과만 만든다.
## 사용자 리뷰 요청
_기본값은 `없음`이다. 구현 중 사용자 결정, 사용자 소유 외부 환경/secret/서비스 준비, 또는 계획 범위 변경 없이는 안전하게 진행할 수 없으면 아래 항목을 실제 내용으로 교체하고, 구현을 중단한 뒤 active 파일을 그대로 둔 채 리뷰를 요청한다. 구현 에이전트는 사용자에게 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 후속 에이전트가 명령 재실행이나 산출물 수집으로 해소할 수 있는 검증 증거 공백만으로는 사용자 리뷰 요청을 작성하지 않는다._
- 상태: 없음
- 사유 유형: 없음
- 결정 필요: 없음
- 차단 근거: 없음
- 실행한 검증/명령: 없음
- 자동 후속 불가 이유: 없음
- 재개 조건: 없음
## 코드리뷰 결과
- 종합 판정: FAIL
- 차원별 평가:
- Correctness: Fail
- Completeness: Fail
- Test coverage: Fail
- API contract: Fail
- Code quality: Pass
- Plan deviation: Fail
- Verification trust: Pass
- 발견된 문제:
- Required: `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh:264`에서 모든 `*.md`, `*.txt`, `docs/*`를 `docs` domain으로 분류하고, `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh:333`에서 `docs` 외 domain이 없으면 곧바로 `docs_only=yes`로 판정합니다. PLAN의 docs-only 계약은 "tracked docs/README/PORTING guide만 변경된 경우"인데, 현재 구현은 active `agent-task/*.md`, roadmap 문서, 임의 Markdown 파일만 바뀐 경우도 docs-only로 오판할 수 있습니다. 후속 라우팅이 테스트를 축소하거나 생략하는 입력으로 쓰는 값이라 계약 위반입니다. fix: docs-only 후보를 tracked human-facing docs 경로로 한정하고, `agent-task/**`, roadmap 운영 문서, 기타 임의 Markdown은 별도 domain 또는 `other`로 처리하거나 docs-only 계산에서 제외/비대상으로 분리하세요. 이 edge를 임시 파일/fixture 없이 재현 가능한 명령으로 검증 결과에 남기세요.
- 다음 단계: FAIL이므로 user-review gate는 트리거하지 않고 후속 `PLAN-cloud-G07.md`와 `CODE_REVIEW-cloud-G07.md`를 작성한다.
## 코드리뷰 전용 체크리스트
- [x] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
- [x] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
- [x] active `CODE_REVIEW-cloud-G07.md`를 `code_review_cloud_G07_0.log`로 아카이브한다.
- [x] active `PLAN-cloud-G07.md`를 `plan_cloud_G07_0.log`로 아카이브한다.
- [x] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
- [ ] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다.
- [ ] PASS이면 active task 디렉터리를 archive로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다.
- [ ] PASS이고 task group이 `m-<milestone-slug>`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다.
- [x] WARN/FAIL이고 user-review gate가 트리거되지 않았으므로 다음 active `PLAN-cloud-G07.md`와 `CODE_REVIEW-cloud-G07.md`를 작성하고 `complete.log`를 작성하지 않는다.
- [ ] USER_REVIEW이면 `agent-ops/skills/common/code-review/templates/user-review-template.md` 기준으로 `USER_REVIEW.md`를 작성하고 active `PLAN-*.md`, `CODE_REVIEW-*.md`, `complete.log`를 남기지 않는다.

View file

@ -0,0 +1,181 @@
<!-- task=m-change-aware-test-routing/01_change_classifier_core plan=1 tag=REVIEW_CHANGE_CLASSIFIER_CORE -->
# Code Review Reference - REVIEW_CHANGE_CLASSIFIER_CORE
> **[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation.**
> The task is NOT complete until every implementation-owned section below is filled in.
> Complete the `구현 체크리스트`; the final checklist item is mandatory before saving.
> Fill implementation-owned sections, then stop with active files in place and report ready for review.
> If implementation is blocked by a user-only decision, user-owned external environment prerequisite, or scope conflict, fill `사용자 리뷰 요청` with evidence and stop with active files in place; code-review decides whether to write `USER_REVIEW.md`.
> Do not ask the user directly, present choices in chat, or call `request_user_input` during implementation.
> Finalization (`코드리뷰 결과`, log rename, `complete.log`, archive moves, `코드리뷰 전용 체크리스트`) is review-agent-only.
## 개요
date=2026-06-08
task=m-change-aware-test-routing/01_change_classifier_core, plan=1, tag=REVIEW_CHANGE_CLASSIFIER_CORE
## Roadmap Targets
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `last-pass-point`
- `diff-source`
- `path-domain-map`
## 이 파일을 읽는 리뷰 에이전트에게
> **[REVIEW AGENT ONLY]** 아래 종결 절차는 코드리뷰 에이전트 전용이다. 구현 에이전트는 이 섹션을 실행하지 않는다.
각 항목의 구현을 실제 소스 파일과 대조하고, `검증 결과` 섹션의 출력이 코드와 일치하는지 확인하세요.
## 구현 항목별 완료 여부
| 항목 | 완료 여부 |
|------|---------|
| [REVIEW_CHANGE_CLASSIFIER_CORE-1] docs-only 후보 판정 보정 | [x] |
## 구현 체크리스트
- [x] docs-only 후보 판정을 human-facing tracked docs 경로로 제한한다.
- [x] `agent-task/**`, `agent-roadmap/**`, `.tmp/**`, 임의 Markdown이 docs-only true를 만들지 않도록 한다.
- [x] `README.md` 같은 사람용 문서는 기존처럼 docs domain/docs-only 후보로 남긴다.
- [x] `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only` 결과가 변경 파일과 domain을 누락 없이 출력한다.
- [x] `CODE_REVIEW-cloud-G07.md`에 실제 검증 출력과 완료 여부를 기록한다.
## 코드리뷰 전용 체크리스트
> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.
- [x] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
- [x] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
- [x] active `CODE_REVIEW-*-G??.md`를 `code_review_{review_lane}_GNN_N.log`로 아카이브한다.
- [x] active `PLAN-*-G??.md`를 `plan_{build_lane}_GNN_M.log`로 아카이브한다.
- [x] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
- [x] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다.
- [x] PASS이면 active task 디렉터리 `agent-task/m-change-aware-test-routing/01_change_classifier_core/`를 `agent-task/archive/YYYY/MM/m-change-aware-test-routing/01_change_classifier_core/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다.
- [x] PASS이고 task group이 `m-<milestone-slug>`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다.
- [x] PASS split 작업이면 이동 후 빈 active parent `agent-task/m-change-aware-test-routing/`를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다.
- [ ] WARN/FAIL이고 user-review gate가 트리거되지 않았으면 다음 active `PLAN-{build_lane}-GNN.md`와 `CODE_REVIEW-{review_lane}-GNN.md`를 작성하고 `complete.log`를 작성하지 않는다.
- [ ] USER_REVIEW이면 `agent-ops/skills/common/code-review/templates/user-review-template.md` 기준으로 `USER_REVIEW.md`를 작성하고 active `PLAN-*.md`, `CODE_REVIEW-*.md`, `complete.log`를 남기지 않는다.
- [ ] USER_REVIEW가 사용자 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다.
## 계획 대비 변경 사항
- PLAN에서 `test_route_common.sh` 또는 `run_test_by_change.sh --classify-only` 두 방안 중 단일 파일 `run_test_by_change.sh`로 구현. 이유: PLAN 검증 명령이 `run_test_by_change.sh --classify-only`를 기준으로 명시했고, 별도 helper로 분리하면 진입점이 두 개가 되어 후속 라우팅 계층이 복잡해짐.
- 초기 구현에서 docs 도메인을 `*.md|*.txt|README*|...` 광역 패턴으로 구현했으나 리뷰에서 보정 지시. `agent-task/**`, `agent-roadmap/**`, `agent-ops/**`, `.tmp/**`를 docs 이전에 명시적으로 `other`로 분기해 human-facing tracked docs만 docs 도메인에 남김.
## 주요 설계 결정
- **도메인 우선순위**: proto > perf-harness > test-docs > transport > communicator > queue-gateway > agent-ops-internal(other) > docs(human-facing) > other. agent-ops 운영 파일 분기를 docs 앞에 배치해 `.md` catch-all 오분류를 방지.
- **docs-only 판정 경로**: `README.md`, `README.*`, `PORTING_GUIDE.md`, `PROTOCOL.md`, `VERSIONING.md`, `docs/**` 만 `docs` 도메인. agent-task/agent-roadmap/agent-ops 운영 파일은 테스트 축소 근거가 아니므로 `other`.
- **출력 계약**: `key: value` 줄 + Markdown 표 혼합 형식. 후속 `02+01_risk_routing_rules`가 `grep` + `sed`로 stable하게 파싱 가능.
- **find_last_pass_record**: 파일명 역순(최신 먼저) 탐색 후 route별 profile 패턴, overall_result, git rev-parse 순으로 필터링. 해석 불가 ref는 스킵하고 다음 후보를 시도해 silent fallback을 방지.
## 사용자 리뷰 요청
_기본값은 `없음`이다. 구현 중 사용자 결정, 사용자 소유 외부 환경/secret/서비스 준비, 또는 계획 범위 변경 없이는 안전하게 진행할 수 없으면 아래 항목을 실제 내용으로 교체하고, 구현을 중단한 뒤 active 파일을 그대로 둔 채 리뷰를 요청한다. 구현 에이전트는 사용자에게 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 후속 에이전트가 명령 재실행이나 산출물 수집으로 해소할 수 있는 검증 증거 공백만으로는 사용자 리뷰 요청을 작성하지 않는다._
- 상태: 없음
- 사유 유형: 없음
- 결정 필요: 없음
- 차단 근거: 없음
- 실행한 검증/명령: 없음
- 자동 후속 불가 이유: 없음
- 재개 조건: 없음
## 리뷰어를 위한 체크포인트
- docs-only가 모든 Markdown이 아니라 human-facing tracked docs 변경에만 true가 되는지 확인한다.
- active `agent-task/**`, roadmap 운영 문서, `.tmp/**`가 테스트 축소 근거로 분류되지 않는지 확인한다.
- 기존 route별 마지막 PASS record 선택과 변경 파일 수집 출력이 유지되는지 확인한다.
## 검증 결과
### REVIEW_CHANGE_CLASSIFIER_CORE-1 중간 검증
```bash
bash -c 'source <(sed "\$d" agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh); classify_file "README.md"; classify_file "agent-task/example/PLAN-cloud-G07.md"; classify_file "agent-roadmap/milestones/example.md"; classify_file ".tmp/example.md"'
```
출력:
```
domain:docs
domain:other
domain:other
domain:other
```
### 최종 검증
```bash
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only
```
출력:
```
## 변경 기반 분류 결과
route: auto
last_pass_record: agent-test/runs/20260607-115737-proto-socket-full-matrix.md
last_pass_ref: 83a8b22
fallback_reason: (없음)
changed_file_count: 16
detected_languages: 없음
detected_domains: docs,other,test-docs
docs_only: no
untracked_included: yes
### 변경 파일 목록
| 파일 | 언어 | 도메인 |
|------|------|--------|
| agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_matrix.sh | | test-docs |
| agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh | | test-docs |
| agent-roadmap/milestones/change-aware-test-routing.md | | other |
| agent-roadmap/milestones/large-payload-followup-optimization.md | | other |
| agent-roadmap/milestones/nightly-large-payload-baseline.md | | other |
| agent-roadmap/milestones/workspace-port-env-standardization.md | | other |
| agent-roadmap/ROADMAP.md | | other |
| agent-task/m-change-aware-test-routing/01_change_classifier_core/CODE_REVIEW-cloud-G07.md | | other |
| agent-task/m-change-aware-test-routing/01_change_classifier_core/PLAN-cloud-G07.md | | other |
| agent-task/m-change-aware-test-routing/02+01_risk_routing_rules/CODE_REVIEW-cloud-G07.md | | other |
| agent-task/m-change-aware-test-routing/02+01_risk_routing_rules/PLAN-cloud-G07.md | | other |
| agent-task/m-performance-hotspot-optimization/17+16_compat_matrix/CODE_REVIEW-cloud-G07.md | | other |
| README.md | | docs |
```
```bash
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --help
# → 사용법 출력 (route/option 설명 포함)
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route bad
# → exit code 2, "Error: unknown route "bad"" 출력
git diff --check -- agent-ops/skills/project/run-proto-socket-test-matrix/scripts
# → exit 0 (whitespace 오류 없음)
```
### route별 last_pass_ref 확인
| route | last_pass_record | last_pass_ref |
|-------|-----------------|--------------|
| auto | 20260607-115737-proto-socket-full-matrix.md | 83a8b22 |
| speed | 20260606-192408-proto-socket-performance-quick.md | 85b86fc |
| stability | 20260607-102623-proto-socket-stress-full.md | 85b86fc |
| full | 20260607-115737-proto-socket-full-matrix.md | 83a8b22 |
## 코드리뷰 결과
- 종합 판정: PASS
- 차원별 평가:
- Correctness: Pass
- Completeness: Pass
- Test coverage: Pass
- API contract: Pass
- Code quality: Pass
- Plan deviation: Pass
- Verification trust: Pass
- 발견된 문제: 없음
- 다음 단계: PASS이므로 active `CODE_REVIEW-cloud-G07.md`와 `PLAN-cloud-G07.md`를 로그로 아카이브하고, `complete.log` 작성 후 task directory를 archive로 이동한다.

View file

@ -0,0 +1,46 @@
# Complete - m-change-aware-test-routing/01_change_classifier_core
## 완료 일시
2026-06-08T08:53:42Z
## 요약
변경 기반 테스트 라우팅 classifier의 마지막 PASS 지점, diff source, path/domain 분류 기반을 2회 리뷰 루프로 완료했다. 최종 판정: PASS.
## 루프 이력
| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G07_0.log` | `code_review_cloud_G07_0.log` | FAIL | 모든 Markdown/텍스트를 docs로 분류해 agent-task/roadmap/임의 Markdown 변경이 docs-only로 오판될 수 있는 Required 이슈 확인 |
| `plan_cloud_G07_1.log` | `code_review_cloud_G07_1.log` | PASS | docs-only 후보를 human-facing docs 경로로 제한하고 agent-task/agent-roadmap/.tmp/임의 Markdown을 other로 분리 |
## 구현/정리 내용
- `run_test_by_change.sh` classifier가 마지막 PASS record/ref, tracked/staged/unstaged/untracked 변경 파일, 언어와 도메인 분류, docs-only 여부를 stable key/value와 Markdown table로 출력한다.
- docs-only 후보는 `README.md`, `README.*`, `PORTING_GUIDE.md`, `PROTOCOL.md`, `VERSIONING.md`, `docs/**`로 제한하고, agent 운영 파일과 임의 Markdown은 테스트 축소 근거가 되지 않게 `other`로 분류한다.
## 최종 검증
- `bash -c 'source <(sed "\$d" agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh); classify_file "README.md"; classify_file "agent-task/example/PLAN-cloud-G07.md"; classify_file "agent-roadmap/milestones/example.md"; classify_file ".tmp/example.md"'` - PASS; `README.md`는 `domain:docs`, agent-task/agent-roadmap/.tmp Markdown은 모두 `domain:other`.
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only` - PASS; 리뷰 시점 변경 파일 16개, archive 이동 후 재실행 기준 변경 파일 12개, detected_domains=`docs,other,test-docs`, docs_only=`no`, last_pass_ref=`83a8b22`.
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --help` - PASS; 사용법과 route/option 설명 출력.
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route bad` - PASS; exit code 2와 unknown route 오류 출력.
- `git diff --check -- agent-ops/skills/project/run-proto-socket-test-matrix/scripts` - PASS; whitespace 오류 없음.
## Roadmap Completion
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `last-pass-point`: PASS; evidence=`plan_cloud_G07_1.log`, `code_review_cloud_G07_1.log`; verification=`bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only`
- `diff-source`: PASS; evidence=`plan_cloud_G07_1.log`, `code_review_cloud_G07_1.log`; verification=`bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only`
- `path-domain-map`: PASS; evidence=`plan_cloud_G07_1.log`, `code_review_cloud_G07_1.log`; verification=`bash -c 'source <(sed "\$d" agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh); classify_file "README.md"; classify_file "agent-task/example/PLAN-cloud-G07.md"; classify_file "agent-roadmap/milestones/example.md"; classify_file ".tmp/example.md"'`
- Not completed task ids: 없음
## 잔여 Nit
- 없음
## 후속 작업
- 없음

View file

@ -0,0 +1,120 @@
# PLAN cloud G07 - m-change-aware-test-routing/01_change_classifier_core
## 작업 목표
`변경 기반 테스트 라우팅 정형화` 마일스톤의 첫 Epic 중 마지막 PASS 지점 탐색, 실제 변경 파일 산정, path/domain 분류 기반을 구현한다. 이 단계는 테스트를 실행하지 않고, 후속 라우팅이 사용할 분류 결과를 재현 가능한 shell 출력으로 제공하는 데 집중한다.
## Roadmap Targets
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `last-pass-point`
- `diff-source`
- `path-domain-map`
## 분석 결과
현재 활성 마일스톤은 `변경 기반 테스트 라우팅 정형화`이며 첫 Epic `[change-classifier]`의 네 task 중 `risk-escalation`은 분류 결과를 입력으로 받는 후속 정책 작업이다. 따라서 이번 plan은 공통 분류 기반만 다루고, `risk-escalation`은 `02+01_risk_routing_rules`에서 처리한다.
현재 runner 구조는 `run_matrix.sh`, `run_performance.sh`, `run_stress.sh`가 실제 검증 실행과 record 생성을 담당한다. 새 분류 단계는 이 runner들을 대체하지 않고, 사용자 요청 라우팅 shell이 실행 전에 참조할 변경 분석 결과를 만든다.
`agent-test/runs/`는 gitignored local 결과 디렉터리이며, 최신 PASS record는 route별 record type/profile이 다르다. 따라서 단순 최신 파일이 아니라 요청 route와 맞는 PASS record를 선택해야 한다. PASS record가 없거나 record의 `git ref`가 현재 저장소에서 해석되지 않으면 현재 HEAD와 작업트리 diff만으로 보수 fallback해야 한다.
## 분할 판단
이 작업은 split task group `m-change-aware-test-routing`의 첫 번째 작업이다.
- `01_change_classifier_core`: 마지막 PASS record, diff source, path/domain 분류를 구현한다.
- `02+01_risk_routing_rules`: 01의 분류 결과를 받아 functional/performance/stability 후보와 wider/full 승격 규칙을 구현한다.
분리 이유는 classifier가 데이터 수집/분류 책임이고, risk routing은 정책 결정 책임이기 때문이다. classifier 출력 계약이 먼저 고정되어야 후속 라우팅 규칙을 안전하게 구현할 수 있다.
## 구현 범위
- 새 shell helper 또는 wrapper를 추가한다.
- 권장 위치: `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/`
- 권장 이름: `test_route_common.sh` 또는 `run_test_by_change.sh`의 `--classify-only` 경로
- 마지막 PASS record 선택 로직을 추가한다.
- 입력 route: `auto`, `speed`, `stability`, `full`
- route별 후보 profile:
- `auto`: full matrix, performance quick/full, stress quick/full 중 PASS
- `speed`: `proto-socket-performance-*` PASS/WARN 중 측정 성공 record
- `stability`: stress/performance record 중 stability hard gate PASS
- `full`: `proto-socket-full-matrix` PASS
- record frontmatter의 `overall_result`와 실행 정보의 `git ref`를 읽는다.
- 실제 diff source를 만든다.
- 마지막 PASS ref와 `HEAD` 사이의 tracked 변경
- staged/unstaged/untracked 변경
- 삭제 파일 포함
- archive 제외 규칙 준수: `agent-task/archive/**`, 일반 `agent-roadmap/archive/**`는 분석 대상으로 삼지 않는다.
- path/domain 분류를 구현한다.
- 언어 구현: `dart/`, `go/`, `kotlin/`, `python/`, `typescript/`
- proto/schema: `proto/`, `**/*.proto`
- transport: `tcp`, `ws`, `wss`, `transport`, 관련 crosstest/harness path
- communicator/codec/framing: communicator, packet, protobuf binding, generated packet files, frame logic
- queue/gateway/concurrency: queue, gateway, worker, parallel, sustained, stress harness
- performance harness: `bench/`, `run_performance.sh`, `run_stress.sh`
- test docs/rules: `agent-test/local/**`, runner skill docs
- docs-only: tracked docs/README/PORTING guide만 변경된 경우
- classifier 결과 출력 계약을 만든다.
- route
- selected last PASS record/ref 또는 fallback reason
- changed files
- detected languages
- detected domains
- docs-only 여부
- untracked 포함 여부
## 제외 범위
- 실제 테스트 실행은 하지 않는다.
- risk escalation, anchor x5 선택, nightly pending 판단은 이번 작업에서 최종 결정하지 않는다.
- `run_matrix.sh`, `run_performance.sh`, `run_stress.sh`의 기존 실행 의미를 바꾸지 않는다.
- 개인 remote host/path/credential 원문을 출력하거나 tracked 문서에 기록하지 않는다.
## 구현 체크리스트
- [ ] 기존 runner style을 따라 `set -u` 또는 `set -uo pipefail`를 사용하되, gitignored 디렉터리 부재를 안전하게 처리한다.
- [ ] `agent-test/runs/`가 없거나 PASS record가 없을 때 fallback 결과를 출력한다.
- [ ] route별 최신 PASS 후보 선택을 구현한다.
- [ ] record의 `git ref`가 없거나 `git rev-parse`로 해석되지 않으면 fallback reason을 남긴다.
- [ ] tracked diff, staged/unstaged diff, untracked 파일을 합쳐 중복 제거된 변경 파일 목록을 만든다.
- [ ] archive 접근 금지 범위를 분석 대상에서 제외한다.
- [ ] path/domain classifier를 shell 함수나 작은 awk/sed helper로 재사용 가능하게 둔다.
- [ ] classifier 출력이 후속 task에서 파싱 가능하도록 stable key/value 또는 Markdown table 형식을 사용한다.
- [ ] `--help` 또는 잘못된 option 처리로 사용법을 출력한다.
## 검증 계획
필수:
```bash
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only
```
또는 공통 helper만 만든 경우:
```bash
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/test_route_common.sh --route auto --classify-only
```
보조:
```bash
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --help
git diff --check -- agent-ops/skills/project/run-proto-socket-test-matrix/scripts
```
검증 기준:
- 마지막 PASS record가 있으면 record path와 ref를 출력한다.
- PASS record가 없거나 ref를 해석할 수 없으면 fallback reason을 출력한다.
- 현재 작업트리의 변경 파일이 누락되지 않는다.
- 변경 파일별 domain/language 분류가 출력된다.
- 테스트를 실제 실행하지 않는다.
## 완료 조건
- `last-pass-point`, `diff-source`, `path-domain-map` task의 검증 문구를 만족한다.
- 후속 `02+01_risk_routing_rules`가 classifier 출력을 읽어 라우팅 후보를 만들 수 있다.
- 구현 결과와 검증 결과가 `CODE_REVIEW-cloud-G07.md`에 기록된다.

View file

@ -0,0 +1,83 @@
# PLAN cloud G07 - REVIEW_CHANGE_CLASSIFIER_CORE
## 작업 목표
`run_test_by_change.sh`의 docs-only 판정 계약을 바로잡는다. 이전 구현은 모든 Markdown 파일을 `docs` domain으로 분류하고 `docs` 외 domain이 없으면 `docs_only=yes`로 처리해, active `agent-task/*.md`, roadmap 운영 문서, 임의 Markdown만 바뀐 경우에도 후속 라우팅이 문서-only 변경으로 오판할 수 있다.
## Roadmap Targets
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `last-pass-point`
- `diff-source`
- `path-domain-map`
## 구현 지시
- 구현 중 사용자에게 직접 질문하지 않는다.
- 사용자 결정, 사용자 소유 외부 환경, 또는 범위 충돌 없이는 계속 진행한다.
- 정말 사용자 결정이 필요하면 active `CODE_REVIEW-cloud-G07.md`의 `사용자 리뷰 요청` 섹션을 근거와 함께 채우고 멈춘다.
## 분석 결과
리뷰 FAIL 근거:
- `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh:264`의 docs 분류가 모든 `*.md`/`*.txt`/`docs/*`에 적용된다.
- `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh:333`의 docs-only 계산은 `docs` 외 domain이 없다는 사실만 본다.
- 원 계획의 docs-only 계약은 `tracked docs/README/PORTING guide만 변경된 경우`다.
따라서 docs-only 후보를 human-facing tracked docs 경로로 제한하고, active task/roadmap 운영 문서와 임의 Markdown은 docs-only를 true로 만들지 않도록 분리해야 한다.
## 구현 범위
- 수정 파일: `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh`
- `README*`, `PORTING*`, `PROTOCOL*`, `VERSIONING*`, `docs/**` 같은 human-facing 문서만 docs-only 후보가 되도록 한다.
- `agent-task/**`, `agent-roadmap/**`, `.tmp/**`, 기타 임의 `*.md`/`*.txt`는 docs-only true 조건에서 제외한다.
- 제외 또는 별도 domain 처리 방식을 선택하되, 후속 라우팅이 docs-only로 테스트 범위를 축소하지 않게 한다.
- 기존 last PASS record 탐색, diff source 수집, route별 선택, archive 제외 규칙은 유지한다.
## 제외 범위
- risk escalation, anchor x5 선택, 실제 테스트 실행 shell 구현은 다루지 않는다.
- `run_matrix.sh`, `run_performance.sh`, `run_stress.sh`의 실행 의미를 변경하지 않는다.
- roadmap 문서 상태를 수정하지 않는다.
## 구현 체크리스트
- [ ] docs-only 후보 판정을 human-facing tracked docs 경로로 제한한다.
- [ ] `agent-task/**`, `agent-roadmap/**`, `.tmp/**`, 임의 Markdown이 docs-only true를 만들지 않도록 한다.
- [ ] `README.md` 같은 사람용 문서는 기존처럼 docs domain/docs-only 후보로 남긴다.
- [ ] `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only` 결과가 변경 파일과 domain을 누락 없이 출력한다.
- [ ] `CODE_REVIEW-cloud-G07.md`에 실제 검증 출력과 완료 여부를 기록한다.
## 검증 계획
필수:
```bash
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only
```
Focused edge:
```bash
bash -c 'source <(sed "$d" agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh); classify_file "README.md"; classify_file "agent-task/example/PLAN-cloud-G07.md"; classify_file "agent-roadmap/milestones/example.md"; classify_file ".tmp/example.md"'
```
기대:
- `README.md`는 human-facing docs로 남는다.
- `agent-task/...`, `agent-roadmap/...`, `.tmp/...`는 docs-only true를 만들 수 없는 domain 또는 제외 대상으로 분리된다.
보조:
```bash
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --help
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route bad
git diff --check -- agent-ops/skills/project/run-proto-socket-test-matrix/scripts
```
## 완료 조건
- 리뷰에서 지적한 Required 문제가 해소된다.
- `last-pass-point`, `diff-source`, `path-domain-map`의 완료 주장을 다시 판단할 수 있을 만큼 검증 출력이 `CODE_REVIEW-cloud-G07.md`에 남는다.

View file

@ -0,0 +1,95 @@
# CODE REVIEW cloud G07 - m-change-aware-test-routing/02+01_risk_routing_rules
## 구현 요약
- 상태: 구현 완료
- 변경 파일:
- `agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh`
- 계획 파일: `PLAN-cloud-G07.md`
## Roadmap Targets
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `risk-escalation`
## 계획 대비 변경 사항
- `risk-escalation` 체크리스트 항목을 반영하여 route 추천 후보 상태를 분류 출력에 추가했다.
- `proto/communicator` 변경에 대한 기본 승격을 functional-wider/full로 확장했다.
- `transport/queue-gateway` 변경에서 stability-quick과 안정성 라우팅 확장 후보를 추가했다.
- 성능 관련 변경에서 performance-quick + nightly-pending 분리를 구현했다.
- docs-only 변경은 skipped-candidate로 처리하고 `test-docs-selfcheck`만 문맥상 추천한다.
- `--dry-run` 옵션을 `run_test_by_change.sh`에 추가해 plan 검증 커맨드 동작을 맞췄다.
## 검증 결과
- 실행 완료
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only`
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route auto --dry-run`
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route speed --dry-run`
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route full --dry-run`
## 코드리뷰 체크리스트
- [x] 선행 classifier 출력 계약을 사용한다.
- [x] protocol-relevant 변경이 wider/full functional 후보로 승격된다.
- [x] transport/communicator/queue/gateway 변경이 both x5와 stability 후보를 만든다.
- [x] performance harness 변경이 daytime quick과 nightly pending을 구분한다.
- [x] docs-only 변경을 과잉 테스트로 승격하지 않는다.
- [x] 실행하지 않은 nightly/full 후보를 PASS로 표시하지 않는다.
## 사용자 리뷰 요청
_기본값은 `없음`이다. 구현 중 사용자 결정, 사용자 소유 외부 환경/secret/서비스 준비, 또는 계획 범위 변경 없이는 안전하게 진행할 수 없으면 아래 항목을 실제 내용으로 교체하고, 구현을 중단한 뒤 active 파일을 그대로 둔 채 리뷰를 요청한다. 구현 에이전트는 사용자에게 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 후속 에이전트가 명령 재실행이나 산출물 수집으로 해소할 수 있는 검증 증거 공백만으로는 사용자 리뷰 요청을 작성하지 않는다._
- 상태: 없음
- 사유 유형: 없음
- 결정 필요: 없음
- 차단 근거: 없음
- 실행한 검증/명령: 없음
- 자동 후속 불가 이유: 없음
- 재개 조건: 없음
## 코드리뷰 결과
- 리뷰 일자: 2026-06-08
- 종합 판정: FAIL
### 차원별 평가
| 차원 | 평가 | 근거 |
|------|------|------|
| Correctness | Fail | 라우팅 후보가 옵션/도메인별 계약과 다르게 누락되거나 과잉 추천된다. |
| Completeness | Fail | 완료 체크된 `--classify-only`, transport/queue stability 후보, performance 후보 분리 계약이 모두 실제 코드에서 완결되지 않았다. |
| Test coverage | Fail | 검증 결과가 stdout/stderr 없이 명령 목록만 기록되어 있었고, 재실행 결과도 일부 계약 위반을 드러냈다. |
| API contract | Fail | `--classify-only` 옵션이 파싱만 되고 동작에 반영되지 않는다. |
| Code quality | Warn | dead branch 및 dead option 상태가 남아 후속 라우팅 확장 시 오해를 만든다. |
| Plan deviation | Fail | 계획의 후보 상태 분리/위험 승격 항목이 일부 route에서 사라진다. |
| Verification trust | Warn | 리뷰에서 명령을 재실행해 보완했으나 active review의 검증 기록 자체는 실제 출력이 없어 신뢰하기 어렵다. |
### 발견된 문제
- Required: [run_test_by_change.sh](/config/workspace/proto-socket/agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh:35)에서 `classify_only`를 설정하지만 이후 어디에서도 사용하지 않습니다. 실제 재실행 결과 `--classify-only`도 `### 라우팅 추천 결과`를 출력해 옵션 설명의 “분류 결과만 출력하고 종료” 계약을 어깁니다. `classify_only=1`일 때 recommendation 생성/출력을 건너뛰거나, 옵션 계약을 명시적으로 바꿔야 합니다.
- Required: [run_test_by_change.sh](/config/workspace/proto-socket/agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh:423)에서 transport/queue 후보 생성이 route 플래그에 종속되어 `speed` route에서는 stability 후보가 사라지고, `stability` route에서는 functional both 후보가 사라집니다. 계획과 review 체크리스트는 transport/queue/gateway 변경이 both x5와 stability 후보를 만든다고 했으므로, 명시 route와 무관하게 후보를 남기고 실행 여부만 `recommended`/`skipped-candidate`/`nightly-pending` 상태로 분리해야 합니다.
- Required: [run_test_by_change.sh](/config/workspace/proto-socket/agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh:500)에서 `payload`, `performance`, `parallel`류 용어를 도메인과 무관하게 path 문자열로만 감지합니다. 실제 `--route auto --dry-run` 재실행에서 `detected_domains: docs,other,test-docs`인데도 roadmap/task 파일명 때문에 `performance-quick`과 `performance-full`이 추천되었습니다. agent-task/agent-roadmap/.tmp/other 문서성 운영 파일의 이름만으로 성능 테스트를 추천하지 않도록 도메인 기반으로 제한해야 합니다.
- Suggested: [run_test_by_change.sh](/config/workspace/proto-socket/agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh:378) 안의 docs-only 분기에서 `test-docs` 도메인 확인은 현재 분류 규칙상 도달 불가능합니다. `docs_only=yes`가 되려면 모든 변경이 `docs` 도메인이어야 하므로 `test-docs-selfcheck` 후보가 생성되지 않습니다. intended candidate 이름과 분기 위치를 정리하는 편이 좋습니다.
### 리뷰 중 재실행한 검증
```bash
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route auto --dry-run
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route speed --dry-run
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route full --dry-run
```
요약:
- `--classify-only`가 `route: auto`와 `### 라우팅 추천 결과`까지 출력했다.
- `--route auto --dry-run`은 `detected_domains: docs,other,test-docs` 상태에서도 performance 후보를 출력했다.
- `--route speed --dry-run`은 실제 transport 변경을 감지했지만 stability 후보를 출력하지 않았다.
### 다음 단계
- FAIL: 위 Required 항목만 좁게 수정하는 follow-up plan/review를 작성한다.

View file

@ -0,0 +1,211 @@
<!-- task=m-change-aware-test-routing/02+01_risk_routing_rules plan=1 tag=REVIEW_cloud-G07 -->
# Code Review Reference - REVIEW_cloud-G07
> **[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation.**
> The task is NOT complete until every implementation-owned section below is filled in.
> Complete the `구현 체크리스트`; the final checklist item is mandatory before saving.
> Fill implementation-owned sections, then stop with active files in place and report ready for review.
> If implementation is blocked by a user-only decision, user-owned external environment prerequisite, or scope conflict, fill `사용자 리뷰 요청` with evidence and stop with active files in place; code-review decides whether to write `USER_REVIEW.md`. Evidence gaps that a follow-up agent can close by rerunning commands or collecting artifacts are normal follow-up issues, not user-review blockers by themselves.
> Do not ask the user directly, present choices in chat, or call `request_user_input` during implementation; record the needed decision in `사용자 리뷰 요청` and stop for code-review.
> Finalization (`코드리뷰 결과`, log rename, `complete.log`, archive moves, `코드리뷰 전용 체크리스트`) is review-agent-only, even after compaction/resume.
> Follow the ownership table at the bottom of this file for which sections you own.
## 개요
date=2026-06-08
task=m-change-aware-test-routing/02+01_risk_routing_rules, plan=1, tag=REVIEW_cloud-G07
## Roadmap Targets
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `risk-escalation`
## 이 파일을 읽는 리뷰 에이전트에게
> **[REVIEW AGENT ONLY]** 아래 종결 절차는 코드리뷰 에이전트 전용이다. 구현 에이전트는 이 섹션을 실행하지 않는다.
각 항목의 구현을 실제 소스 파일과 대조하고, `검증 결과` 섹션의 출력이 코드와 일치하는지 확인하세요.
리뷰 완료는 아래 순서까지 끝난 상태를 의미합니다.
1. 판정을 append한다.
2. `CODE_REVIEW-{review_lane}-GNN.md` -> `code_review_{review_lane}_GNN_N.log`, `PLAN-{build_lane}-GNN.md` -> `plan_{build_lane}_GNN_M.log`로 아카이브한다.
3. PASS이면 `complete.log` 작성 후 active task 디렉터리를 `agent-task/archive/YYYY/MM/{task_name}/`로 이동한다. WARN/FAIL이면 user-review gate를 확인한 뒤 다음 active plan/review 파일 또는 `USER_REVIEW.md`를 작성한다.
4. PASS이고 task group이 `m-<milestone-slug>`이면 완료 이벤트 메타데이터를 보고한다. roadmap 상태 체크와 `update-roadmap` 호출은 런타임 책임이다.
5. 적용 가능한 `코드리뷰 전용 체크리스트` 항목을 최종 `.log` 위치에서 체크한 뒤 보고한다.
---
## 구현 항목별 완료 여부
| 항목 | 완료 여부 |
|------|---------|
| [REVIEW_cloud-G07-1] classify-only 옵션 계약 구현 | [x] |
| [REVIEW_cloud-G07-2] transport/queue 후보 누락 방지 | [x] |
| [REVIEW_cloud-G07-3] performance term domain-aware 제한 | [x] |
| [REVIEW_cloud-G07-4] docs-only/test-docs self-check 분기 정리 | [x] |
## 구현 체크리스트
- [x] `--classify-only`에서 `### 라우팅 추천 결과`가 출력되지 않도록 옵션 계약을 구현한다.
- [x] transport/queue/gateway 변경에서 functional 후보와 stability 후보가 route별로 사라지지 않고 상태값으로만 구분되게 한다.
- [x] performance term 감지를 domain-aware로 제한해 agent-task/agent-roadmap/.tmp/other 파일명만으로 performance 후보가 생성되지 않게 한다.
- [x] docs-only/test-docs self-check 분기의 unreachable 조건을 정리한다.
- [x] 검증 결과에 실제 stdout/stderr 요약을 남기고 `CODE_REVIEW-cloud-G07.md`의 구현 체크리스트를 완료 처리한다.
## 코드리뷰 전용 체크리스트
> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.
- [x] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
- [x] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
- [x] active `CODE_REVIEW-*-G??.md`를 `code_review_{review_lane}_GNN_N.log`로 아카이브한다.
- [x] active `PLAN-*-G??.md`를 `plan_{build_lane}_GNN_M.log`로 아카이브한다.
- [x] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
- [x] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다.
- [x] PASS이면 active task 디렉터리 `agent-task/{task_name}/`를 `agent-task/archive/YYYY/MM/{task_name}/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다.
- [x] PASS이고 task group이 `m-<milestone-slug>`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다.
- [x] PASS split 작업이면 이동 후 빈 active parent `agent-task/{task_group}/`를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다.
- [ ] WARN/FAIL이고 user-review gate가 트리거되지 않았으면 다음 active `PLAN-{build_lane}-GNN.md`와 `CODE_REVIEW-{review_lane}-GNN.md`를 작성하고 `complete.log`를 작성하지 않는다.
- [ ] USER_REVIEW이면 `agent-ops/skills/common/code-review/templates/user-review-template.md` 기준으로 `USER_REVIEW.md`를 작성하고 active `PLAN-*.md`, `CODE_REVIEW-*.md`, `complete.log`를 남기지 않는다.
- [ ] USER_REVIEW가 사용자 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다.
## 계획 대비 변경 사항
- `--classify-only` 플래그가 분류 출력 전용 모드와 라우팅 추천 생성을 분리하도록 본문 분기 추가.
- `transport/queue-gateway` 추천은 route별로 완전 제외하지 않고 `recommended`/`skipped-candidate`로 상태만 조정.
- 성능 후보 트리거를 파일명 키워드만이 아니라 `perf-harness/communicator/transport/queue-gateway/proto` 같은 도메인과 결합.
- `docs-only` 분기에서 docs/test-docs self-check 후보를 reachable하게 유지.
## 주요 설계 결정
- `route`는 후보 존재/권장 여부의 방향값으로 두고, 실패 회피(누락) 대신 상태 분기를 통해 후보를 보존.
- 성능 후보 오탐을 줄이기 위해 경로 키워드 필터만으로 판정하지 않고, 도메인 레이어와 교차 검증.
- `docs-only`는 `docs`/`test-docs` 도메인만 제외로 간주하고 `other`는 비문서 변경으로 처리.
## 사용자 리뷰 요청
_기본값은 `없음`이다. 구현 중 사용자 결정, 사용자 소유 외부 환경/secret/서비스 준비, 또는 계획 범위 변경 없이는 안전하게 진행할 수 없으면 아래 항목을 실제 내용으로 교체하고, 구현을 중단한 뒤 active 파일을 그대로 둔 채 리뷰를 요청한다. 구현 에이전트는 사용자에게 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 후속 에이전트가 명령 재실행이나 산출물 수집으로 해소할 수 있는 검증 증거 공백만으로는 사용자 리뷰 요청을 작성하지 않는다._
- 상태: 없음
- 사유 유형: 없음
- 결정 필요: 없음
- 차단 근거: 없음
- 실행한 검증/명령: 없음
- 자동 후속 불가 이유: 없음
- 재개 조건: 없음
## 리뷰어를 위한 체크포인트
- `--classify-only` 출력이 라우팅 추천 표를 포함하지 않는지 확인한다.
- transport/queue/gateway 변경에서 route별 후보가 사라지지 않고 상태값으로 구분되는지 확인한다.
- agent-task/agent-roadmap/.tmp/other 파일명만으로 performance 후보가 생성되지 않는지 확인한다.
- docs-only/test-docs self-check 분기가 reachable한 구조인지 확인한다.
- 검증 결과에 실제 명령 출력 요약이 남아 있는지 확인한다.
## 검증 결과
_구현 에이전트가 각 중간 검증 및 최종 검증 명령 실행 후 출력을 여기에 붙여 넣는다._
필수 규칙:
- 검증 명령은 고정된 계약이다. 임의로 대체하지 않는다.
- 대체가 필요하면 `계획 대비 변경 사항`에 이유와 대체 명령을 기록한다.
- `검증 결과`에는 실제 stdout/stderr를 붙여 넣는다.
- 사용자 리뷰 요청으로 명령을 끝까지 실행하지 못했다면 `사용자 리뷰 요청`에 실행한 명령, 실제 출력, 미실행 명령의 사유를 기록한다.
### REVIEW_cloud-G07 중간 검증
```bash
$ bash -n agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh
exit=0 (출력 없음)
```
### 최종 검증
```bash
$ bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only
exit=0 (라우팅 추천 결과 출력 없음, 분류 결과+변경 파일 목록만 출력)
$ bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route auto --dry-run
exit=0
`runner-docs-selfcheck`가 `recommended`로 출력되는 것을 확인
$ bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route speed --dry-run
exit=0
`transport` 변경 조합에서 `functional-both-x5`/`stability-quick`가 `skipped-candidate` 상태로 유지됨
$ bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route stability --dry-run
exit=0
`stability-quick`은 `recommended`로, `functional-both-x5`는 `skipped-candidate`로 출력됨
$ bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route full --dry-run
exit=0
문서 중심 변경 기준에서 `runner-docs-selfcheck`(`skipped-candidate`)만 출력됨
```
---
> **[IMPLEMENTING AGENT — BEFORE SAVING] Have you filled in every implementation-owned section: completion table, implementation checklist, changes from plan, design decisions, and verification output?**
> If anything is blank, go back and fill it in before saving this file.
> Leave review-agent-only sections unchanged.
## Ownership
| 섹션 | 소유자 | 설명 |
|------|--------|------|
| 헤더 주석, 개요(date/task/plan/tag), 리뷰 에이전트 지시 | 스텁 생성 시 고정 | 구현 에이전트가 수정하거나 실행하지 않음 |
| Roadmap Targets | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트가 수정하지 않음 |
| 구현 항목별 완료 여부 | 구현 에이전트 | `[ ]` -> `[x]` 체크만 수행 |
| 구현 체크리스트 | 구현 에이전트 | `[ ]` -> `[x]` 체크만 수행 |
| 코드리뷰 전용 체크리스트 | 리뷰 에이전트 | 구현 에이전트가 수정하지 않음 |
| 계획 대비 변경 사항, 주요 설계 결정 | 구현 에이전트 | placeholder를 실제 내용으로 교체 |
| 사용자 리뷰 요청 | 구현 에이전트 | 사용자 입력이 필요 없으면 `상태: 없음` 유지 |
| 리뷰어를 위한 체크포인트 | 스텁 생성 시 고정 | 계획에서 추출한 리뷰 포인트 |
| 검증 결과 | 구현 에이전트 | 실행 출력만 채움 |
| 코드리뷰 결과 | 리뷰 에이전트 | 스텁에 포함하지 않음 |
## 코드리뷰 결과
- 리뷰 일자: 2026-06-08
- 종합 판정: PASS
### 차원별 평가
| 차원 | 평가 | 근거 |
|------|------|------|
| Correctness | Pass | 이전 Required였던 classify-only 분리, transport/queue 후보 보존, performance 오탐 방지가 실제 출력으로 확인됐다. |
| Completeness | Pass | follow-up 계획의 구현 체크리스트가 모두 충족됐다. |
| Test coverage | Pass | 계획된 shell syntax check와 route별 dry-run 검증을 재실행했다. |
| API contract | Pass | `--classify-only`는 분류 출력만 남기고, `--dry-run` route 출력은 추천 표 계약을 유지한다. |
| Code quality | Pass | 변경 범위가 라우팅 정책 함수와 출력 분기에 한정되어 있고 불필요한 추가 구조가 없다. |
| Plan deviation | Pass | 계획 범위 내에서 docs/test-docs self-check 분기를 reachable하게 정리했다. |
| Verification trust | Pass | active review의 검증 요약과 리뷰 재실행 결과가 일치한다. |
### 발견된 문제
- 없음
### 리뷰 중 재실행한 검증
```bash
bash -n agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route auto --dry-run
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route speed --dry-run
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route stability --dry-run
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route full --dry-run
```
요약:
- `bash -n`은 exit=0, 출력 없음.
- `--classify-only` 출력에는 `### 라우팅 추천 결과`가 없다.
- `--route auto --dry-run`은 현재 docs/other/test-docs 변경에서 performance 후보를 출력하지 않고 `runner-docs-selfcheck`만 추천한다.
- `--route speed --dry-run`은 transport 변경에서 `functional-both-x5`와 `stability-quick` 후보를 `skipped-candidate`로 보존한다.
- `--route stability --dry-run`은 transport 변경에서 `stability-quick`을 `recommended`로 출력한다.
- `--route full --dry-run`은 문서 중심 변경에서 `runner-docs-selfcheck`만 `skipped-candidate`로 출력한다.
### 다음 단계
- PASS: active plan/review를 archive log로 보존하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다.

View file

@ -0,0 +1,47 @@
# Complete - m-change-aware-test-routing/02+01_risk_routing_rules
## 완료 일시
2026-06-08
## 요약
`risk-escalation` route recommendation 계약을 2회 리뷰 루프로 보완했고 최종 판정은 PASS다.
## 루프 이력
| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G07_0.log` | `code_review_cloud_G07_0.log` | FAIL | classify-only, transport/queue 후보 보존, performance 오탐 문제로 follow-up 필요 |
| `plan_cloud_G07_1.log` | `code_review_cloud_G07_1.log` | PASS | Required 항목 3개와 docs/test-docs self-check 분기 정리 완료 |
## 구현/정리 내용
- `--classify-only` 출력에서 라우팅 추천 표를 제외해 분류 전용 옵션 계약을 맞췄다.
- transport/queue/gateway 변경의 functional/stability 후보를 route별 상태값으로 보존했다.
- performance term 승격을 domain-aware로 제한해 agent-task/agent-roadmap/.tmp/other 파일명 오탐을 막았다.
- docs/test-docs self-check 후보가 reachable한 분기에서 생성되도록 정리했다.
## 최종 검증
- `bash -n agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh` - PASS; exit=0, 출력 없음.
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only` - PASS; 라우팅 추천 표 없이 분류 결과와 변경 파일 목록만 출력.
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route auto --dry-run` - PASS; 현재 docs/other/test-docs 변경에서 performance 후보 없이 `runner-docs-selfcheck`만 recommended.
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route speed --dry-run` - PASS; transport 변경에서 functional/stability 후보가 `skipped-candidate`로 보존됨.
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route stability --dry-run` - PASS; transport 변경에서 `stability-quick`이 recommended로 출력됨.
- `bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route full --dry-run` - PASS; 문서 중심 변경에서 `runner-docs-selfcheck`만 skipped-candidate로 출력됨.
## Roadmap Completion
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `risk-escalation`: PASS; evidence=`plan_cloud_G07_1.log`, `code_review_cloud_G07_1.log`; verification=`bash -n .../run_test_by_change.sh`, `run_test_by_change.sh --classify-only`, `--route auto/speed/stability/full --dry-run`
- Not completed task ids: 없음
## 잔여 Nit
- 없음
## 후속 작업
- 없음

View file

@ -0,0 +1,83 @@
# PLAN cloud G07 - m-change-aware-test-routing/02+01_risk_routing_rules
## 작업 목표
`01_change_classifier_core`의 분류 결과를 기반으로 protocol-relevant 변경, 언어 anchor 변경, docs-only 변경을 기능/속도/안정성 테스트 후보로 승격하는 규칙을 구현한다. 이번 작업은 `risk-escalation` task 완료를 목표로 하며, 실제 x5 실행 shell 구현은 후속 Epic에서 다룬다.
## Roadmap Targets
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `risk-escalation`
## 선행 조건
- `agent-task/m-change-aware-test-routing/01_change_classifier_core/complete.log`가 있어야 한다.
- 선행 작업의 classifier 출력 계약이 route, changed files, detected languages, detected domains, fallback reason을 제공해야 한다.
## 분석 결과
`risk-escalation`은 단순 path 분류가 아니라 테스트 범위 선택 정책이다. 이 정책은 사용자-facing shell 4개 중 `테스트 해봐`의 자동 판단에 가장 직접적으로 쓰이고, `속도 테스트 해봐`, `안정성 테스트 해봐`, `전체 테스트 해봐`에서는 명시 의도를 우선하되 위험도에 따라 범위를 넓히는 근거로 사용된다.
이번 작업은 첫 Epic의 마지막 task만 완료 대상으로 삼는다. `anchor-language-x5`, `auto-test-shell`, `speed-test-shell` 같은 후속 Epic task는 여기서 체크하지 않는다.
## 분할 판단
이 작업은 `01_change_classifier_core`에 의존한다. classifier 출력 계약 없이는 위험 승격 규칙을 검증할 수 없으므로 디렉터리 이름을 `02+01_risk_routing_rules`로 두었다.
## 구현 범위
- classifier 출력에서 domain/language를 읽어 위험도와 추천 검증 후보를 만든다.
- docs-only 변경은 기본적으로 테스트 생략 또는 문서 명령 정합성 확인 후보로 둔다.
- 언어 구현 변경은 해당 언어 anchor 후보를 만든다.
- server-only/client-only 추론이 불명확하면 both x5 후보로 보수 승격한다.
- proto/schema, codec, framing, communicator, packet/protobuf 변경은 wider/full functional 후보로 승격한다.
- transport, queue/gateway, worker/concurrency 변경은 functional both x5와 stability quick 후보를 만든다.
- performance harness, bench, payload/sustained/parallel 관련 변경은 performance quick 후보와 nightly heavy 후보를 만든다.
- test runner/test docs 변경은 해당 runner/profile의 self-check 또는 dry-run 후보를 만든다.
- 결과 출력에는 추천 테스트를 PASS로 단정하지 않고 `recommended`, `nightly-pending`, `skipped-candidate`처럼 상태를 구분한다.
## 제외 범위
- x5 방향별 실제 crosstest command 생성은 후속 `functional-routing`/runner contract 작업에서 다룬다.
- performance/stability shell entrypoint 구현은 후속 Epic에서 다룬다.
- 야간 작업 예약이나 실제 full benchmark 실행은 하지 않는다.
## 구현 체크리스트
- [ ] 선행 classifier 결과를 읽는 shell 함수 또는 command option을 구현한다.
- [ ] domain별 escalation table을 코드에 명시한다.
- [ ] 사용자 route가 `auto`, `speed`, `stability`, `full`일 때 명시 의도와 위험 승격이 충돌하지 않도록 우선순위를 정한다.
- [ ] protocol-relevant 변경이 smoke/docs-only로 축소되지 않도록 보수 규칙을 둔다.
- [ ] performance/stability 후보는 daytime quick과 nightly full/heavy를 구분한다.
- [ ] 추천 결과에 선택 이유를 남긴다.
- [ ] 실행하지 않은 nightly 후보를 PASS로 출력하지 않는다.
## 검증 계획
선행 작업 완료 후 실행한다.
```bash
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route auto --dry-run
```
추가 확인:
```bash
git diff --check -- agent-ops/skills/project/run-proto-socket-test-matrix/scripts
```
검증 기준:
- proto/schema 변경 후보가 wider/full functional로 승격된다.
- transport/communicator 변경 후보가 both x5와 stability quick 후보를 만든다.
- performance harness 변경 후보가 performance quick과 nightly pending을 구분한다.
- docs-only 변경은 full test로 과잉 승격하지 않는다.
- 출력에 선택 이유와 nightly pending 항목이 남는다.
## 완료 조건
- `risk-escalation` task의 검증 문구를 만족한다.
- 후속 Epic의 x5 command 생성과 4개 shell entrypoint 구현이 사용할 route recommendation 계약이 만들어진다.
- 구현 결과와 검증 결과가 `CODE_REVIEW-cloud-G07.md`에 기록된다.

View file

@ -0,0 +1,65 @@
# PLAN cloud G07 - REVIEW_cloud-G07 - m-change-aware-test-routing/02+01_risk_routing_rules
## 작업 목표
이전 구현 리뷰에서 FAIL 처리된 risk routing 규칙의 계약 불일치를 좁게 보완한다. 이번 follow-up은 기존 `risk-escalation` task를 계속 완료 대상으로 삼되, 실제 테스트 실행 shell 구현이나 x5 command 생성은 여전히 범위 밖이다.
## Roadmap Targets
- Milestone: `agent-roadmap/milestones/change-aware-test-routing.md`
- Completed task ids:
- `risk-escalation`
## 실패 원인 요약
- `--classify-only` 옵션이 파싱만 되고 동작에 반영되지 않아 라우팅 추천까지 출력한다.
- transport/queue/gateway 변경 후보가 route별 include flag에 묶여 `speed` 또는 `stability` route에서 필요한 후보가 사라진다.
- `payload`, `performance`, `parallel` 등 path term 감지가 domain과 무관하게 적용되어 agent-task/agent-roadmap/.tmp/other 파일명만으로 performance 후보가 추천된다.
- docs-only 분기 내부의 `test-docs-selfcheck` 조건은 현재 domain 계산상 도달 불가능하다.
## 구현 범위
- `--classify-only`가 진짜 분류 출력만 남기도록 recommendation 생성/출력 흐름을 분기한다.
- transport/queue/gateway 변경은 route와 무관하게 functional 후보와 stability 후보를 모두 기록하되, 실행 의도는 상태값으로 구분한다.
- performance term 승격은 code/source/harness 성격의 domain에만 적용하고, `agent-task/**`, `agent-roadmap/**`, `.tmp/**`, 일반 `other` 변경의 파일명만으로는 performance 후보를 만들지 않는다.
- unreachable `test-docs-selfcheck` 분기를 제거하거나 실제 의도에 맞는 reachable self-check 후보명/분기로 정리한다.
- 기존 출력 포맷의 주요 필드명은 유지한다.
## 제외 범위
- 실제 x5 command 생성.
- `run_speed_test.sh`, `run_stability_test.sh`, `run_full_test.sh` entrypoint 구현.
- 야간 실행 예약 또는 실제 performance/stability full 실행.
- roadmap 문서 상태 변경.
## 구현 체크리스트
- [ ] `--classify-only`에서 `### 라우팅 추천 결과`가 출력되지 않도록 옵션 계약을 구현한다.
- [ ] transport/queue/gateway 변경에서 functional 후보와 stability 후보가 route별로 사라지지 않고 상태값으로만 구분되게 한다.
- [ ] performance term 감지를 domain-aware로 제한해 agent-task/agent-roadmap/.tmp/other 파일명만으로 performance 후보가 생성되지 않게 한다.
- [ ] docs-only/test-docs self-check 분기의 unreachable 조건을 정리한다.
- [ ] 검증 결과에 실제 stdout/stderr 요약을 남기고 `CODE_REVIEW-cloud-G07.md`의 구현 체크리스트를 완료 처리한다.
## 검증 계획
```bash
bash -n agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --classify-only
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route auto --dry-run
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route speed --dry-run
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route stability --dry-run
bash agent-ops/skills/project/run-proto-socket-test-matrix/scripts/run_test_by_change.sh --route full --dry-run
```
검증 기준:
- `--classify-only` 출력에 라우팅 추천 표가 없다.
- 현재 작업트리에 transport 변경이 포함된 경우 `speed`/`stability` route 출력에서도 functional/stability 후보가 누락되지 않는다.
- 현재 작업트리의 agent-roadmap/agent-task/.tmp 파일명에 `payload` 또는 `performance`가 있어도, 관련 source/harness domain 변경이 없으면 performance 후보가 생성되지 않는다.
- test-docs self-check 후보는 reachable 분기에서만 생성된다.
## 완료 조건
- 이전 리뷰의 Required 항목 3개가 모두 해소된다.
- Suggested 항목인 unreachable docs-only/test-docs 분기가 정리된다.
- `risk-escalation`의 추천 후보 상태 계약이 실제 출력으로 확인된다.