<!-- task=m-node-provider-execution-liveness-recovery/01_activity_contract plan=6 tag=REVIEW_REVIEW_REVIEW_REVIEW_API milestone-task=activity-contract -->

# Complete - m-node-provider-execution-liveness-recovery/01_activity_contract

## Completion Time

2026-08-04

## Summary

Completed the provider response-stall activity/config/wire contract after five official review loops; final verdict PASS.

## Loop History

| Plan | Review | Verdict | Notes |
|------|--------|---------|-------|
| `plan_local_G06_2.log` | `code_review_cloud_G06_2.log` | FAIL | Runtime retention, activity classification, deterministic boundary coverage, and contract/spec synchronization were incomplete. |
| `plan_cloud_G08_3.log` | `code_review_cloud_G08_3.log` | FAIL | Exact duration bounds, correlated tunnel rejection, direct wire-zero ownership, and queued provider identity evidence required repair. |
| `plan_cloud_G08_4.log` | `code_review_cloud_G08_4.log` | FAIL | The deterministic immediate/queued normalized/tunnel provider-pool matrix and final verification were missing. |
| `plan_cloud_G06_5.log` | `code_review_cloud_G06_5.log` | FAIL | Queued refresh ordering, tunnel correlation, and literal verification evidence remained incomplete. |
| `plan_cloud_G06_6.log` | `code_review_cloud_G06_6.log` | PASS | Causal refresh ordering, tunnel correlation, queue settlement, and fresh reviewer verification all passed. |

## Implemented and Reconciled Work

- Added the provider response-stall timeout default, validation, activity classification, config, selected-provider propagation, Edge-Node wire, and Node runtime retention contract.
- Preserved direct/non-pool zero-on-wire ownership, exact safe duration bounds, correlated tunnel validation errors, and immutable selected-provider identity across normalized and tunnel paths.
- Added deterministic immediate and queued shared-adapter provider identity coverage with refresh-before-release causality, post-refresh pending evidence, tunnel correlation, duplicate-wire guards, and final lease/queue settlement.
- Reconciled contracts, living specs, generated protobuf bindings, and literal verification evidence without changing roadmap state.

## Final Verification

- `go test -v -count=1 ./apps/edge/internal/service -run 'ResponseStallTimeout|ProviderStallTimeout'` - PASS; all four provider-pool matrix variants passed.
- `go test -count=10 ./apps/edge/internal/service -run 'ResponseStallTimeout|ProviderStallTimeout'` - PASS.
- `go test -count=1 ./packages/go/streamgate ./apps/edge/internal/openai ./apps/edge/internal/service ./apps/edge/internal/controlplane` - PASS.
- `go test -count=1 ./...` - PASS.
- `./scripts/e2e-smoke.sh` - PASS.
- `IOP_DEV_RECONNECT_BIND_TIMEOUT=45 ./scripts/dev/edge-node-reconnect-diagnostic.sh` - PASS; three runs, terminal ordering, commands, and reconnect were verified.
- `make readability-audit` - EXPECTED BASELINE FAIL; `jq` confirmed `apps/edge/internal/service/provider_stall_timeout_test.go` has no violations.
- `gofmt -l packages/go/execution packages/go/config apps/edge/internal/service apps/node/internal/node` - PASS; empty output.
- `git diff --check` - PASS.

## Remaining Nits

- None.

## Follow-up Work

- None.
