feat: add G07 plan/review, rename G08/G09 artifacts to .log, update rules
This commit is contained in:
parent
8d782e8fc3
commit
492a79199e
6 changed files with 286 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
domain: testing
|
||||
last_rule_review_commit: 7ca329ac9e03bf7cfebfac4517559fc1e2f0bca8
|
||||
last_rule_updated_at: 2026-07-14
|
||||
last_rule_review_commit: 8d782e8fc3c3d0b93134fdd6567c7216e840e459
|
||||
last_rule_updated_at: 2026-07-26
|
||||
---
|
||||
|
||||
# testing
|
||||
|
|
@ -25,6 +25,8 @@ last_rule_updated_at: 2026-07-14
|
|||
- `scripts/e2e-control-plane-edge-wire.sh` — Control Plane-Edge wire hello/disconnect 보조 smoke 검증이다.
|
||||
- `scripts/fixtures/` — E2E smoke 입력 fixture 위치이다.
|
||||
- `docker-compose.yml` — local dev용 Control Plane, datastore, Flutter Web client stack 조립 표면이다.
|
||||
- `agent-ops/skills/project/orchestrate-agent-task-loop/scripts/dispatch.py` — task plan을 실제 CLI invocation으로 연결하는 dispatcher 경계이다.
|
||||
- `agent-ops/skills/project/orchestrate-agent-task-loop/tests/` — dispatcher/selector의 unit·integration simulation이며 provider process를 실행하지 않는 격리 검증 표면이다.
|
||||
|
||||
## 제외 경로
|
||||
|
||||
|
|
@ -52,6 +54,7 @@ last_rule_updated_at: 2026-07-14
|
|||
- full-cycle 실제 구동 — 비효율적이어도 관련 사용자 명령과 실행 cycle을 한 번씩 실제 entrypoint로 통과시키는 검증이다.
|
||||
- 실제 외부 CLI 검증 — `claude`, `antigravity`, `codex`, `opencode`처럼 외부 CLI 설치와 계정/환경이 필요한 기준 profile을 실제 호출하는 검증이다.
|
||||
- one-line bootstrap/install UX — Node, specialized agent, domain agent, Control Plane enrollment처럼 사용자가 대상 host에서 복사해 실행하는 연결/설치 명령의 사용자 경험 기준이다.
|
||||
- dispatcher provider 격리 guard — dispatcher unit/integration simulation에서 `invoke`, `run_escalating`, `run_worker` 또는 동등한 runner seam을 fake로 바꾸고 실제 provider command 생성·subprocess 실행을 차단하는 test-owned guard이다.
|
||||
|
||||
## 유지할 패턴
|
||||
|
||||
|
|
@ -64,6 +67,11 @@ last_rule_updated_at: 2026-07-14
|
|||
- command 검증 기준은 edge console에서 `/nodes`와 변경 범위에 닿는 command를 직접 입력하고, node에서 온 결과가 edge 화면에 `[node-*-<command>]` 또는 명확한 성공/unsupported/error 출력으로 표시되는 것이다. CLI 경로 변경 시 최소 `/capabilities`, `/transport`, `/sessions`, persistent profile이면 `/terminate-session`을 확인한다.
|
||||
- 보조 E2E smoke는 mock adapter와 임시 설정/포트를 사용해 외부 CLI 의존성 없이 수행한다.
|
||||
- 보조 E2E smoke에서는 최소한 node 등록, `/nodes` 확인, console 메시지 전송, delta/message 출력, complete event를 확인한다.
|
||||
- dispatcher/selector의 unit 또는 integration simulation은 실제 `pi`, `agy`, `claude`, `codex` provider process, provider session, 네트워크 호출을 실행하지 않는다. 실행 outcome이 필요한 경우 가장 높은 runner seam(`invoke`, `run_escalating`, `run_worker`)을 deterministic fake로 대체하고, guard가 실제 `build_command`/subprocess까지 도달하지 않았음을 assertion으로 남긴다.
|
||||
- `dispatch_with_store(..., dry_run=False)`를 호출하는 상태 전이 테스트는 scenario에 execution이 필요 없으면 `scan_tasks`를 빈 결과로 고정해 state transition만 검증한다. execution을 검증해야 하면 fake runner의 입력·반환 locator·호출 횟수를 명시하고, provider command가 호출되지 않았음을 함께 검증한다.
|
||||
- header만 가진 PLAN/CODE_REVIEW fixture 또는 action item이 없는 fixture는 provider prompt가 될 수 없다. 그런 fixture는 dry-run, empty task scan, 또는 fake runner 아래에서만 사용한다.
|
||||
- 새 dispatcher test class는 기본 provider-deny guard를 설치하고, 실제 invocation 결과를 의도적으로 검증하는 test만 해당 guard 위에 명시 fake runner를 덮어쓴다. 새 test가 guard 없이 runner 경로를 열면 실패해야 한다.
|
||||
- 실제 외부 CLI 검증은 사용자가 요구한 full-cycle/profile 검증으로 명시적으로 분리할 때만 수행한다. Python unit/integration suite 또는 agent-task plan fixture를 그 검증의 실행 경로로 사용하지 않는다.
|
||||
- full-cycle 실제 구동에서는 startup/register, foreground run, session 변경, background run, terminate-session, status, 관련 routing/cancel/timeout/persistent session cycle을 실제 entrypoint로 한 번씩 통과시킨다.
|
||||
- one-line bootstrap/install command는 Jenkins agent 연결처럼 간결해야 한다. 사용자에게 전달하는 명령은 artifact/bootstrap URL이 완성된 한 줄이어야 하며, 사용자가 직접 바꾸는 값은 token 같은 단일 positional 값만 둔다.
|
||||
- one-line bootstrap/install command의 Edge 주소, artifact 주소, target, platform, config path 같은 값은 작업자/Edge/Control Plane이 미리 굽거나 완성해서 제공한다. 사용자 기본 경로에서 `IOP_*=` 같은 named environment parameter나 여러 주소 조합을 직접 입력하게 하지 않는다.
|
||||
|
|
@ -139,6 +147,10 @@ terminated session default node=test-node
|
|||
- 사용자 실행 파이프라인에 닿는 변경을 하고 유닛/패키지 테스트만으로 완료 처리하지 않는다.
|
||||
- `make test-e2e`, `scripts/e2e-smoke.sh`, `scripts/e2e-openai-ollama.sh`, `scripts/e2e-control-plane-edge-wire.sh`, 또는 smoke 통과 출력만으로 완료 처리하지 않는다.
|
||||
- 관련 작업 후 full-cycle 실제 구동을 비용이 크다는 이유만으로 생략하지 않는다.
|
||||
- dispatcher unit/integration test에서 실제 provider CLI 또는 provider session을 시작하지 않는다.
|
||||
- action item이 없는 plan fixture를 `dispatch_with_store(..., dry_run=False)`의 실제 worker/review 입력으로 사용하지 않는다.
|
||||
- state-only test가 실제 runner 호출을 필요로 한다고 가정하지 않는다. fake runner 또는 empty scan으로 state transition을 격리하지 못하면 test plan을 먼저 보완한다.
|
||||
- provider 실행을 mock하지 않은 채 실제 provider가 우연히 종료·응답했다는 결과를 unit/integration test evidence로 기록하지 않는다.
|
||||
- 보조 E2E smoke를 외부 CLI 설치, 로그인, 네트워크 계정 상태에 의존하게 만들지 않는다.
|
||||
- live-dependency smoke(`e2e-openai-vllm`, `e2e-openai-lemonade`, `e2e-long-context-admission-smoke`)가 필요한 작업에서 endpoint/account/token 문제를 성공으로 간주하지 않는다. 실행 불가는 명확한 blocker 또는 남은 위험으로 보고한다.
|
||||
- 검증을 위해 기본 `configs/*.yaml`을 임시값으로 오염시키지 않는다. 임시 설정 파일이나 환경 변수 override를 사용한다.
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@
|
|||
| `scripts/fixtures/**` | testing | `agent-ops/rules/project/domain/testing/rules.md` |
|
||||
| `Makefile` | testing | `agent-ops/rules/project/domain/testing/rules.md` |
|
||||
| `docker-compose.yml` | testing | `agent-ops/rules/project/domain/testing/rules.md` |
|
||||
| `agent-ops/skills/project/orchestrate-agent-task-loop/scripts/**` | testing | `agent-ops/rules/project/domain/testing/rules.md` |
|
||||
| `agent-ops/skills/project/orchestrate-agent-task-loop/tests/**` | testing | `agent-ops/rules/project/domain/testing/rules.md` |
|
||||
|
||||
## 도메인 후보
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,135 @@
|
|||
<!-- task=m-agent-task-runtime-target-selector/07+06_context_review_recovery plan=1 tag=TEST -->
|
||||
|
||||
# Code Review Reference - TEST
|
||||
|
||||
> **[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, record the exact blocker, attempted commands/output, and resume condition only in implementation-owned evidence fields.
|
||||
> Do not ask the user directly, present choices, call user-input tools, create control-plane stop files, or classify the next state.
|
||||
> Finalization (`코드리뷰 결과`, log rename, `complete.log`, archive moves, `코드리뷰 전용 체크리스트`) is review-agent-only.
|
||||
|
||||
## 개요
|
||||
|
||||
date=2026-07-26
|
||||
task=m-agent-task-runtime-target-selector/07+06_context_review_recovery, plan=1, tag=TEST
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/automation-runtime-bridge/milestones/agent-task-runtime-target-selector.md`
|
||||
- Task ids: `context-failover`, `failure-budget`, `dispatch-integration`, `audit-tests`
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- `plan_local_G08_0.log`와 `code_review_cloud_G09_0.log`는 retry-blocked test의 actual provider 실행 결함 기록이다. 공식 verdict가 없고 PASS 출력은 새 완료 evidence가 아니다.
|
||||
|
||||
## 이 파일을 읽는 리뷰 에이전트에게
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 아래 종결 절차는 코드리뷰 에이전트 전용이다. 구현 에이전트는 이 섹션을 실행하지 않는다.
|
||||
|
||||
1. 실제 source와 검증 출력을 대조해 판정을 append한다.
|
||||
2. `CODE_REVIEW-cloud-G07.md` → `code_review_cloud_G07_1.log`, `PLAN-local-G07.md` → `plan_local_G07_1.log`로 아카이브한다.
|
||||
3. PASS이면 `complete.log`을 작성하고 active task directory를 archive한다. WARN/FAIL이면 code-review skill의 다음 상태만 작성한다.
|
||||
|
||||
---
|
||||
|
||||
## 구현 항목별 완료 여부
|
||||
|
||||
| 항목 | 완료 여부 |
|
||||
|------|---------|
|
||||
| TEST-1 Dispatcher simulation provider-deny guard | [ ] |
|
||||
| TEST-2 계획 단계 provider 격리 규칙 | [ ] |
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] provider-deny guard와 retry-blocked state-only fake를 추가해 provider command/session/process 0건을 검증한다.
|
||||
- [ ] `testing` domain rule과 project domain map에 dispatcher simulation planning gate를 기록한다.
|
||||
- [ ] focused/full unittest, py_compile, diff check의 실제 출력과 provider 0건 evidence를 review에 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다.
|
||||
|
||||
## 코드리뷰 전용 체크리스트
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
|
||||
|
||||
- [ ] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
|
||||
- [ ] 판정과 Required/Suggested/Nit 분류가 일치한다.
|
||||
- [ ] active `CODE_REVIEW-cloud-G07.md`를 `code_review_cloud_G07_1.log`로 아카이브한다.
|
||||
- [ ] active `PLAN-local-G07.md`를 `plan_local_G07_1.log`로 아카이브한다.
|
||||
- [ ] `.gitignore` Agent-Ops block을 확인한다.
|
||||
- [ ] PASS이면 `complete.log`를 작성하고 active `.md`를 남기지 않는다.
|
||||
- [ ] PASS이면 active task directory를 `agent-task/archive/YYYY/MM/m-agent-task-runtime-target-selector/07+06_context_review_recovery/`로 이동한다.
|
||||
- [ ] PASS이면 runtime completion metadata만 보고하고 roadmap을 직접 수정하지 않는다.
|
||||
- [ ] WARN/FAIL이면 `complete.log`를 작성하지 않는다.
|
||||
|
||||
## 계획 대비 변경 사항
|
||||
|
||||
_구현 에이전트가 계획과 다르게 구현한 부분을 이유와 함께 기록한다._
|
||||
|
||||
## 주요 설계 결정
|
||||
|
||||
_구현 에이전트가 provider-deny guard와 fake runner 경계를 기록한다._
|
||||
|
||||
## 리뷰어를 위한 체크포인트
|
||||
|
||||
- default guard가 `invoke`와 provider command construction을 fail-fast로 막는가.
|
||||
- retry-blocked case가 empty scan/state-only fake 아래에서 blocker/budget만 검증하는가.
|
||||
- focused/full suite evidence가 실제 provider process/session 0건을 보이는가.
|
||||
- domain rule과 project path map이 다음 plan에서 dispatcher files에 적용되는가.
|
||||
|
||||
## 검증 결과
|
||||
|
||||
### focused retry-blocked isolation
|
||||
|
||||
명령: `python3 agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py SelectorDispatcherIntegrationTest.test_context_budget_and_retry_blocked_lifecycle -v`
|
||||
|
||||
```text
|
||||
구현 에이전트가 실제 stdout/stderr와 provider invocation 0건 evidence를 기록한다.
|
||||
```
|
||||
|
||||
### Selector dispatcher simulations
|
||||
|
||||
명령: `python3 agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py SelectorDispatcherIntegrationTest -v`
|
||||
|
||||
```text
|
||||
구현 에이전트가 실제 stdout/stderr를 기록한다.
|
||||
```
|
||||
|
||||
### full Python suite
|
||||
|
||||
명령: `python3 -m unittest discover -s agent-ops/skills/project/orchestrate-agent-task-loop/tests -p 'test_*.py'`
|
||||
|
||||
```text
|
||||
구현 에이전트가 실제 stdout/stderr와 external provider 미실행 evidence를 기록한다.
|
||||
```
|
||||
|
||||
### py_compile
|
||||
|
||||
명령: `python3 -m py_compile agent-ops/skills/project/orchestrate-agent-task-loop/scripts/dispatch.py agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py`
|
||||
|
||||
```text
|
||||
구현 에이전트가 실제 stdout/stderr를 기록한다.
|
||||
```
|
||||
|
||||
### diff check
|
||||
|
||||
명령: `git diff --check`
|
||||
|
||||
```text
|
||||
구현 에이전트가 실제 stdout/stderr를 기록한다.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> **[IMPLEMENTING AGENT — BEFORE SAVING]** Fill every implementation-owned section, then leave review-only sections unchanged.
|
||||
|
||||
## 섹션 소유권
|
||||
|
||||
| Section | Owner | Note |
|
||||
|---------|-------|------|
|
||||
| Header, 개요, Roadmap Targets, Archive Evidence Snapshot | Fixed at stub creation | Implementing agent must not modify. |
|
||||
| 구현 항목별 완료 여부, 구현 체크리스트 | Implementing agent | Check only after actual implementation/evidence. |
|
||||
| 코드리뷰 전용 체크리스트 | Review agent only | Implementing agent must not modify. |
|
||||
| 계획 대비 변경 사항, 주요 설계 결정, 검증 결과 | Implementing agent | Record actual output only. |
|
||||
| 코드리뷰 결과 | Review agent appends | Not present in stub. |
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
<!-- task=m-agent-task-runtime-target-selector/07+06_context_review_recovery plan=1 tag=TEST -->
|
||||
|
||||
# Plan - Dispatcher provider 격리 회귀 차단
|
||||
|
||||
## 배경
|
||||
|
||||
`plan=0`의 retry-blocked 상태 전이 검증은 header-only fixture로 `dispatch_with_store(..., dry_run=False)`를 호출하면서 runner seam을 mock하지 않았다. 이 때문에 실제 Pi worker가 시작됐고, fixture에는 수행할 작업이 없어 모델이 저장소를 임의로 탐색했다. 사용자 요청으로 중단된 실행의 PASS 출력은 신뢰하지 않는다.
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/automation-runtime-bridge/milestones/agent-task-runtime-target-selector.md`
|
||||
- Task ids: `context-failover`, `failure-budget`, `dispatch-integration`, `audit-tests`
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- `plan_local_G08_0.log`: 기존 구현 범위와 검증 계약. retry-blocked test의 real-provider escape 때문에 PASS 출력은 완료 근거로 사용하지 않는다.
|
||||
- `code_review_cloud_G09_0.log`: 구현 evidence. 중단된 provider 실행과 공식 verdict 부재 때문에 새 완료 evidence로 재사용하지 않는다.
|
||||
- context `feb6a8e1-1e52-4f76-8cb4-08a90e3e8869` 및 중단된 Pi test context들은 진단 근거일 뿐 resume 대상이 아니다.
|
||||
|
||||
## 분석 결과
|
||||
|
||||
### 읽은 파일
|
||||
|
||||
- `agent-ops/skills/project/orchestrate-agent-task-loop/scripts/dispatch.py`
|
||||
- `agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py`
|
||||
- `agent-ops/skills/project/orchestrate-agent-task-loop/SKILL.md`
|
||||
- `agent-ops/rules/project/rules.md`
|
||||
- `agent-ops/rules/project/domain/testing/rules.md`
|
||||
- `agent-test/local/rules.md`
|
||||
- `agent-roadmap/current.md`
|
||||
- `agent-roadmap/phase/automation-runtime-bridge/PHASE.md`
|
||||
- `agent-roadmap/phase/automation-runtime-bridge/milestones/agent-task-runtime-target-selector.md`
|
||||
- `agent-roadmap/sdd/automation-runtime-bridge/agent-task-runtime-target-selector/SDD.md`
|
||||
- `agent-ops/skills/common/finalize-task-routing/SKILL.md`
|
||||
|
||||
### SDD 기준
|
||||
|
||||
승인·잠금 해제된 SDD의 S06/S07/S09/S12와 `context-failover`/`failure-budget`/`dispatch-integration`/`audit-tests`를 대상으로 한다. TEST-1은 persisted decision·stage budget·retry-blocked 상태만 fake runner 아래에서 검증하게 하며 provider 실행을 evidence에서 배제한다.
|
||||
|
||||
### 테스트 환경 규칙
|
||||
|
||||
`test_env=local`이고 `agent-test/local/rules.md`를 읽었다. 이 변경은 user-flow가 아닌 Python dispatcher simulation이므로 smoke profile을 적용하지 않는다. 검증은 focused/full unittest와 `py_compile`이며, provider CLI·session·network preflight는 의도적으로 실행하지 않는다.
|
||||
|
||||
### 테스트 커버리지 공백
|
||||
|
||||
- retry-blocked blocker/budget 초기화는 기존 test가 다루지만 runner 격리가 빠졌다.
|
||||
- 새 dispatcher simulation에는 mock 누락을 즉시 실패시키는 class-level provider-deny guard가 없다.
|
||||
- 실제 provider 동작은 범위 밖이며, 명시 사용자 승인 full-cycle 검증에서만 다룬다.
|
||||
|
||||
### 심볼 참조
|
||||
|
||||
이름 변경/삭제 없음. `dispatch_with_store`, `run_worker`, `run_escalating`, `invoke`, `build_command`의 test call path를 확인한다.
|
||||
|
||||
### 분할 판단
|
||||
|
||||
기존 `07+06_context_review_recovery`의 plan=1 후속이다. fixture guard와 plan rule은 같은 real-provider escape를 닫는 단일 test ownership boundary이므로 분리하지 않는다. `06+05_runtime_quota_failover` 완료 의존성은 유지한다.
|
||||
|
||||
### 범위 결정 근거
|
||||
|
||||
production `dispatch.py` route/selector policy, 실제 provider health, `WORK_LOG.md`, 과거 archive는 수정하지 않는다. test isolation과 project-local planning rule만 변경한다.
|
||||
|
||||
### 최종 라우팅
|
||||
|
||||
- `evaluation_mode=isolated-reassessment`, `finalizer=finalize-task-policy.sh`, `finalizer_mode=pair`.
|
||||
- build/review closure는 scope/context/verification/evidence/ownership/decision 모두 `true`: scope가 test+project rule로 닫히고 deterministic unittest가 provider 없이 판정한다.
|
||||
- build: `route_basis=local-fit`, `capability_gap=none`, scores=`1/2/1/2/1`, loop-risk audit=`temporal_state,boundary_contract`, `local-G07`, `PLAN-local-G07.md`.
|
||||
- review: `route_basis=official-review`, `capability_gap=none`, scores=`1/2/1/2/1`, `cloud-G07`, `CODE_REVIEW-cloud-G07.md`, `codex/gpt-5.6-sol xhigh`.
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] provider-deny guard와 retry-blocked state-only fake를 추가해 provider command/session/process 0건을 검증한다.
|
||||
- [ ] `testing` domain rule과 project domain map에 dispatcher simulation planning gate를 기록한다.
|
||||
- [ ] focused/full unittest, py_compile, diff check의 실제 출력과 provider 0건 evidence를 review에 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다.
|
||||
|
||||
## 구현 항목
|
||||
|
||||
### [TEST-1] Dispatcher simulation provider-deny guard
|
||||
|
||||
- 문제: `test_context_budget_and_retry_blocked_lifecycle`가 `dispatch_with_store(..., dry_run=False)`를 호출하면서 `dispatch.py:4448` 이후의 실제 `invoke`까지 열어 Pi CLI를 시작했다.
|
||||
- 해결 방법:
|
||||
|
||||
```python
|
||||
# Before: test_dispatch.py:6698
|
||||
with mock.patch.object(dispatch, "datetime") as datetime_mock:
|
||||
await dispatch.dispatch_with_store(args, workspace, store)
|
||||
```
|
||||
|
||||
```python
|
||||
# After
|
||||
# asyncSetUp installs an invoke/build-command deny guard.
|
||||
with mock.patch.object(dispatch, "scan_tasks", return_value=[]):
|
||||
await dispatch.dispatch_with_store(args, workspace, store)
|
||||
```
|
||||
|
||||
`SelectorDispatcherIntegrationTest`에 `invoke`와 provider command construction을 fail-fast로 막는 기본 guard를 설치한다. invocation semantics가 필요한 test만 deterministic fake locator를 반환하는 mock을 명시한다. retry-blocked는 state-only이므로 empty scan과 runner non-call assertion으로 blocker/budget 초기화 및 provider 0건을 함께 확인한다.
|
||||
- 수정 파일 및 체크리스트:
|
||||
- [ ] `agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py`: class guard, retry-blocked fixture, runner/command non-call assertion.
|
||||
- 테스트 작성: retry-blocked regression과 guard 없는 future runner path의 immediate failure를 검증한다.
|
||||
- 중간 검증: `python3 agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py SelectorDispatcherIntegrationTest.test_context_budget_and_retry_blocked_lifecycle -v` — provider command/process 없이 PASS.
|
||||
|
||||
### [TEST-2] 계획 단계 provider 격리 규칙
|
||||
|
||||
- 문제: 기존 plan의 “fake runner input”은 서술뿐이어서 header-only fixture와 non-dry-run dispatcher를 실제 provider prompt에서 분리하지 못했다.
|
||||
- 해결 방법: testing rule에 runner seam mock, empty scan state-only test, header-only fixture 금지, explicit full-cycle 외 provider 실행 금지를 추가하고 dispatcher scripts/tests를 domain map에 연결한다.
|
||||
- 수정 파일 및 체크리스트:
|
||||
- [ ] `agent-ops/rules/project/domain/testing/rules.md`: dispatcher test isolation pattern/forbidden rule과 기준 commit 갱신.
|
||||
- [ ] `agent-ops/rules/project/rules.md`: dispatcher scripts/tests → testing mapping.
|
||||
- 테스트 작성: 문서 rule 자체의 executable test는 생략한다. TEST-1 fail-fast guard가 runtime regression proof다.
|
||||
- 중간 검증: `rg --sort path -n "provider-deny|header-only fixture|dispatch_with_store" agent-ops/rules/project agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py` — rule/guard 경로 출력.
|
||||
|
||||
## 의존 관계 및 구현 순서
|
||||
|
||||
1. TEST-1로 current suite의 real-provider escape를 먼저 차단한다.
|
||||
2. TEST-2로 이후 계획에서 같은 dispatcher 경로가 testing rule을 읽게 한다.
|
||||
3. focused와 전체 suite가 provider process 없이 PASS할 때만 review로 넘긴다.
|
||||
|
||||
## 수정 파일 요약
|
||||
|
||||
| 파일 | 항목 |
|
||||
|---|---|
|
||||
| `agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py` | TEST-1 |
|
||||
| `agent-ops/rules/project/domain/testing/rules.md` | TEST-2 |
|
||||
| `agent-ops/rules/project/rules.md` | TEST-2 |
|
||||
|
||||
## 최종 검증
|
||||
|
||||
- `python3 agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py SelectorDispatcherIntegrationTest.test_context_budget_and_retry_blocked_lifecycle -v` — fresh focused PASS, provider-deny guard invocation/command 0.
|
||||
- `python3 agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py SelectorDispatcherIntegrationTest -v` — class simulation PASS, provider process/session 없음.
|
||||
- `python3 -m unittest discover -s agent-ops/skills/project/orchestrate-agent-task-loop/tests -p 'test_*.py'` — fresh full suite PASS, external provider 미실행.
|
||||
- `python3 -m py_compile agent-ops/skills/project/orchestrate-agent-task-loop/scripts/dispatch.py agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py` — exit 0.
|
||||
- `git diff --check` — 출력 없음.
|
||||
|
||||
모든 코드 변경 완료 후 반드시 `CODE_REVIEW-*-G??.md`의 구현 에이전트 소유 섹션을 채운다.
|
||||
Loading…
Reference in a new issue