# Complete - m-openai-compatible-tool-call-boundary-hardening/02+01_contract_dev_smoke

## 완료 일시

2026-07-04

## 요약

OpenAI-compatible raw text tool-call boundary 계약 문서와 dev smoke 기준/evidence 정리를 1회 리뷰 루프에서 PASS로 종결했다.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G07_0.log` | `code_review_cloud_G07_0.log` | PASS | 계약/dev 문서가 provider raw text tool-call 정규화/차단 정책을 반영했고, dev-runtime credentialed smoke evidence와 local Go 검증이 확인됨. |

## 구현/정리 내용

- `agent-contract/outer/openai-compatible-api.md`가 `tools[]` 요청의 provider/CLI raw text tool-call 정규화, unknown/malformed 차단, sentinel sanitize 정책을 설명하도록 갱신됐다.
- `docs/edge-local-dev-guide.md`와 `agent-test/dev/edge-smoke.md`에 Pi/Cline형 `tools[]` boundary smoke 기준, evidence 위치, secret 마스킹 원칙이 추가됐다.
- dev-runtime Edge를 01 완료 source로 동기화하고 Edge binary rebuild/restart 후 known tool 정규화, known stream delta, unknown raw block 차단 evidence를 남겼다.
- 리뷰 중 Nit로 PLAN stray prefix와 dev guide secret placeholder/weak unknown fixture를 직접 정리했다.

## 최종 검증

- `go test ./apps/edge/internal/openai -count=1` - PASS; `ok  	iop/apps/edge/internal/openai	1.568s`
- `go test ./apps/edge/internal/openai -run 'TestChatCompletions.*(Unknown|Malformed|TextToolCall|Synthes)|TestValidateToolCallResponse|TestChatCompletionsProviderStreamBlocksMalformedTextToolCall' -count=1 -v` - PASS; targeted 22 tests passed, `ok  	iop/apps/edge/internal/openai	0.010s`
- `rg --sort path -n "tool_validation_error|raw text tool|mask_end|Pi/Cline" agent-contract/outer/openai-compatible-api.md docs/edge-local-dev-guide.md agent-test/dev/edge-smoke.md` - PASS; 계약/dev guide/dev test-rule 모두 매칭
- `ssh -o BatchMode=yes -o ConnectTimeout=5 toki@toki-labs.com` non-secret remote preflight/evidence shell assertions - PASS; HEAD `59e55d4`, remote checkout clean on `main` tracking `origin/main`, Edge binary/refresh help OK, Control Plane status HTTP 200, evidence dir `build/dev-runtime/logs/boundary-smoke-20260704_184616/` 존재, `auth_marker_files=0`, `tool_validation_error`와 `tool_calls` marker 확인
- `ssh -o BatchMode=yes -o ConnectTimeout=5 toki@toki-labs.com` non-secret response leak marker file assertions - PASS; `<tool_call>` marker는 `req_unknown_forced.json` 요청 fixture에만 존재하고 response/evidence output에는 `<|mask_end|>`, `Authorization`, `Bearer` marker 없음

## Roadmap Completion

- Milestone: `agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/openai-compatible-tool-call-boundary-hardening.md`
- Completed task ids:
  - `client-smoke`: PASS; evidence=`agent-task/archive/2026/07/m-openai-compatible-tool-call-boundary-hardening/02+01_contract_dev_smoke/plan_cloud_G07_0.log`, `agent-task/archive/2026/07/m-openai-compatible-tool-call-boundary-hardening/02+01_contract_dev_smoke/code_review_cloud_G07_0.log`; verification=`remote dev-runtime evidence dir build/dev-runtime/logs/boundary-smoke-20260704_184616/`, `ssh non-secret remote preflight/evidence shell assertions`
  - `contract-docs`: PASS; evidence=`agent-task/archive/2026/07/m-openai-compatible-tool-call-boundary-hardening/02+01_contract_dev_smoke/plan_cloud_G07_0.log`, `agent-task/archive/2026/07/m-openai-compatible-tool-call-boundary-hardening/02+01_contract_dev_smoke/code_review_cloud_G07_0.log`; verification=`rg --sort path -n "tool_validation_error|raw text tool|mask_end|Pi/Cline" agent-contract/outer/openai-compatible-api.md docs/edge-local-dev-guide.md agent-test/dev/edge-smoke.md`
- Not completed task ids: 없음

## 잔여 Nit

- 없음

## 후속 작업

- 없음
