iop/agent-spec/runtime/edge-node-execution.md
toki 7b90b7e5af refactor(chronos): IOP 경계를 분리한다
Chronos 이전 완료 증거를 보존하면서 IOP에는 provider 실행 책임만 남기기 위해 검토된 마일스톤 변경을 하나의 승격 커밋으로 고정한다.
2026-08-02 19:29:30 +09:00

49 lines
2.3 KiB
Markdown

---
spec_doc_type: spec
spec_id: runtime/edge-node-execution
status: 구현됨
source_evidence:
- type: contract
path: agent-contract/inner/execution-runtime.md
notes: Host-neutral provider execution primitives
- type: contract
path: agent-contract/inner/edge-node-runtime-wire.md
notes: Edge-Node registration, execution, tunnel, cancellation, command, and refresh wire
- type: code
path: packages/go/execution/types.go
notes: Provider execution and event types
- type: code
path: apps/node/internal/node/runtime_bridge.go
notes: Protobuf-to-execution translation
- type: test
path: apps/node/internal/node/command_test.go
notes: Closed provider commands, correlation, and cancellation regressions
---
# Edge-Node Provider Execution
## Current implementation
Edge owns provider selection, queue admission, leases, and connection-generation fencing. Node owns local provider adapters and executes normalized runs or provider HTTP tunnels after a ready handshake.
The shared `packages/go/execution` package contains provider lifecycle, registry, execution events, failures, cancellation, usage, and optional tunnel/command primitives. It does not manage host programs or durable conversation state.
## Runtime rules
- A registered Node is not dispatchable until its current connection completes readiness.
- `adapter + target` selects provider execution.
- `session_id` is copied through events and command results as opaque correlation only.
- Every run is independent, including repeated correlation values.
- Cancellation requires `run_id` and affects that run only.
- Node commands are limited to capabilities, transport status, and the Ollama API tunnel.
- Run and tunnel streams preserve ordering and exactly one terminal outcome.
- Provider usage, capacity, queue pressure, lifecycle, reconnect, and tool calling remain supported.
## Removed ownership
IOP no longer provides persistent shell sessions, terminal emulation, process resume, local working-directory execution context, arbitrary host commands, or local quota/status probing.
## Verification
- `go test -count=1 ./packages/go/execution ./apps/node/... ./apps/edge/internal/service`
- `go test -race -count=1 ./packages/go/execution ./apps/node/internal/node ./apps/edge/internal/service`