- Update orchestrate-agent-task-loop skill and dispatch scripts - Add 8 new milestone directories (07+06 through 12+08,11) - Archive completed tasks for 05+04 and 06+05 - Update test configs, docs, and edge-smoke/node-smoke - Add WORK_LOG.md for runtime target selector
8.3 KiB
Plan - Quota unknown 격리와 throughput closure
이 파일을 읽는 구현 에이전트에게
선행 10+09_target_cap_removal의 complete.log가 확인된 뒤 구현한다. 구현과 검증을 끝낸 뒤 CODE_REVIEW-cloud-G07.md의 구현 에이전트 소유 섹션을 실제 내용과 원문 출력으로 채운다. active 파일은 그대로 두고 review 준비 완료만 보고한다. 종결은 code-review skill 전용이다. 차단되면 정확한 원인, 시도한 명령/출력, 재개 조건만 구현 에이전트 소유 evidence에 기록한다. 사용자에게 질문하거나 user-input 도구를 호출하지 않고, control-plane stop file 생성, 다음 상태 분류, archive/log 이동, complete.log 또는 roadmap 수정은 하지 않는다.
배경
immutable admission batch envelope에서 probe failure와 runtime provider-quota evidence를 work unit별로 격리해 route pin과 다른 task의 quota 상태를 오염시키지 않도록 throughput 정책을 닫는다.
Roadmap Targets
- Milestone:
agent-roadmap/phase/automation-runtime-bridge/milestones/agent-task-runtime-target-selector.md - Milestone link: Milestone 문서
- Task ids:
throughput-policy: target별 정적 cap 없이 ready task dispatch와 batch quota snapshot 재사용
- Completion mode: check-on-pass
분석 결과
읽은 파일
agent-ops/skills/project/orchestrate-agent-task-loop/scripts/dispatch.pyagent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.pyagent-test/local/rules.mdagent-roadmap/sdd/automation-runtime-bridge/agent-task-runtime-target-selector/SDD.md
SDD 기준
- 대상 Acceptance Scenario는 S11이다. 이 closure child가 batch-local unknown, task-local derived exhausted, persisted route pin 보존을 검증하고 원본 Roadmap Target을 소유한다.
테스트 환경 규칙
test_env=local;agent-test/local/rules.md가 존재하며 끝까지 읽었다.- agent-ops Python dispatcher에 매칭되는
agent-test/local/*.mdprofile은 없다. 현재 checkout의 Python test manifest를 fallback 근거로 삼아 fresh-processunittest,py_compile,git diff --check를 사용하며 test-rule 유지보수는 필요하지 않다. - quota probe와 runner는 fake로 주입해 호출 횟수, batch identity, 실제 동시 시작을 결정적으로 측정한다.
- 계획 시점 전체 Python suite 기준선은 169 tests PASS다.
테스트 커버리지 공백
- probe exception/parse failure 또는 runtime quota failure가 shared envelope을 in-place 변경하면 독립 work unit의 quota evidence와 route pin을 오염시킬 수 있다.
- same work unit resume, new generation, explicit retry의 snapshot 수명 차이가 검증되지 않는다.
심볼 참조
dispatch.py:4228admission의 probe error normalization과 work-unit derived evidence 경계를 immutable batch envelope 위에 구현한다.
분할 판단
- 원본 throughput plan의 마지막 closure child다.
10+09_target_cap_removal까지 완료된 admission 경로에서 unknown과 derived exhausted 격리를 검증하고 최종 audit의 producer가 된다.
범위 결정 근거
- shared envelope을 변경하지 않는 batch-key unknown과 work-unit derived exhausted만 구현한다. 새 global cache, route 재선택 정책, provider adapter는 추가하지 않는다.
최종 라우팅
- evaluation_mode:
isolated-reassessment - finalizer=
finalize-task-policy.sh, finalizer_mode=pair; build/review status=routed. - build closures:
scope_closed=true(승인 SDD와 이 subtask 경계가 고정됨),context_closed=true(명시된 source/test 범위를 한 local 작업에서 유지 가능),verification_closed=true,evidence_trusted=true,ownership_closed=true,decision_closed=true. - review closures:
scope_closed=true,context_closed=true(동일 source/test 및 구현 evidence로 판정 가능),verification_closed=true,evidence_trusted=true,ownership_closed=true,decision_closed=true. - build route_basis=
local-fit; capability_gap=none. - build loop-risk audit: matched signatures=
boundary_contract,concurrent_consistency; 이 기록은 lane/G를 바꾸지 않는다. - build scores(scope_coupling/state_concurrency/blast_irreversibility/evidence_diagnosis/verification_complexity)=
1/2/1/1/2, final=local-G07, filename=PLAN-local-G07.md. - review route_basis=
official-review; official execution=codex/gpt-5.6-sol xhigh; capability_gap=none. - review scores(scope_coupling/state_concurrency/blast_irreversibility/evidence_diagnosis/verification_complexity)=
1/2/1/1/2, final=cloud-G07, filename=CODE_REVIEW-cloud-G07.md.
구현 체크리스트
- quota probe 실패는 해당 batch/key의 unknown으로 격리되고 persisted work unit은 재선택하지 않으며 새 generation·명시적 failover/retry만 새 snapshot을 관측한다.
- CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다.
구현 항목
[REFACTOR-3] Unknown 격리와 회귀
- 문제:
dispatch.py:4228admission에서 probe exception/parse failure 또는 runtime quota failure를 shared envelope에 in-place 반영하면 독립 work unit의 quota evidence와 route pin을 오염시킬 수 있다. - 해결 방법:
# Before: agent-ops/skills/project/orchestrate-agent-task-loop/scripts/dispatch.py:4228
candidates, deferred, phase_wait_reason = select_dispatch_candidates(ready)
# After
derived = derive_work_unit_quota_evidence(
decision,
status="exhausted",
reason="confirmed_runtime_provider_quota",
)
probe failure는 해당 batch/key의 unknown entry로 정규화하고 work unit별 1회 admission은 selector에 맡긴다. batch envelope은 immutable로 폐기하며 같은 persisted work unit은 다음 pass에서 재probe/재선택하지 않는다. confirmed runtime provider-quota는 shared envelope을 바꾸지 않고 해당 work unit decision에서 같은 observation identity를 계승한 derived exhausted evidence로만 교체한다. 새 plan/tag generation, 아직 사용하지 않은 failover eligibility, 명시적 retry-blocked만 새 snapshot을 얻는다.
- 수정 파일 및 체크리스트:
agent-ops/skills/project/orchestrate-agent-task-loop/scripts/dispatch.py: batch-local error normalization과 disposal.agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py: failure/recovery batch 회귀.
- 테스트 작성:
ThroughputQuotaBatchTest에서 첫 batch key 하나만 unknown, 같은 work unit resume은 probe 0회/pin 유지, 새 generation의 다음 batch available 회복, confirmed provider-quota의 task-local derived exhausted, generic stderr의 unknown 유지를 검증한다. - 중간 검증:
python3 agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py ThroughputQuotaBatchTest -v— isolation/pin/recovery case가 PASS해야 한다.
의존 관계 및 구현 순서
10+09_target_cap_removal의complete.log가 PASS여야 한다.- 이 task PASS 후
12+08,11_audit_closure가 selfcheck와 throughput 결과를 함께 감사한다.
수정 파일 요약
| 파일 | 항목 |
|---|---|
agent-ops/skills/project/orchestrate-agent-task-loop/scripts/dispatch.py |
REFACTOR-3 |
agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py |
REFACTOR-3 |
최종 검증
python3 agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py ThroughputQuotaBatchTest -v— isolation/pin/recovery 회귀 PASS.python3 agent-ops/skills/project/orchestrate-agent-task-loop/tests/test_dispatch.py BlockerDrainTest -v— 독립 branch drain 회귀 PASS.python3 -m unittest discover -s agent-ops/skills/project/orchestrate-agent-task-loop/tests -p 'test_*.py'— fresh process 전체 suite PASS.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의 구현 에이전트 소유 섹션을 채운다.