# Complete - m-runtime-reconnect-config-refresh/06+05_node_drain_runtime_config

## 완료 일시

2026-06-23

## 요약

Edge/Node runtime reconnect config refresh의 node drain/runtime config subtask를 2개 리뷰 루프로 완료했다. 최종 판정은 PASS다.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G08_0.log` | `code_review_cloud_G08_0.log` | FAIL | adapter start 실패 refresh에서 `runtime.concurrency`가 먼저 적용되어 previous-state preservation을 깨는 Required 1건 확인 |
| `plan_local_G06_1.log` | `code_review_local_G06_1.log` | PASS | concurrency commit을 adapter start/swap 성공 이후로 지연하고 실패 경로 regression test로 확인 |

## 구현/정리 내용

- `OnConfigRefresh`의 runtime concurrency mutation을 adapter registry start/swap 성공 이후로 지연해 failed refresh가 이전 global admission state를 유지하게 했다.
- `TestConfigRefreshFailedAdapterStartDoesNotApplyRuntimeConcurrency`로 concurrency=1 active run 중 concurrency=2와 failing CLI persistent profile이 함께 온 refresh가 `FAILED` 후에도 두 번째 run을 계속 reject하는지 검증했다.
- 기존 drain/deferred stop, runtime concurrency live apply, workspace restart_required, Edge classifier/runtime refresh 회귀를 유지했다.
- 리뷰 중 `gofmt` 포맷 drift를 정리하고 동일 검증을 재실행했다.

## 최종 검증

- `gofmt -l apps/node/internal/node/node.go apps/node/internal/node/node_test.go apps/node/internal/node/run_manager.go apps/node/internal/adapters/config_set.go apps/edge/internal/configrefresh/classify.go apps/edge/internal/configrefresh/classify_test.go apps/edge/internal/bootstrap/runtime_test.go` - PASS; no output
- `go test -count=1 -run 'TestConfigRefresh(FailedAdapterStartDoesNotApplyRuntimeConcurrency|UpdatesGlobalConcurrencyForFutureRuns|ConcurrencyDecreaseDoesNotCancelInFlight|WorkspaceRootReportsRestartRequired)' ./apps/node/internal/node` - PASS; `ok iop/apps/node/internal/node 0.008s`
- `go test -count=1 ./apps/node/internal/node ./apps/node/internal/adapters ./apps/edge/internal/configrefresh ./apps/edge/internal/bootstrap` - PASS; `node 0.292s`, `adapters 0.009s`, `configrefresh 0.013s`, `bootstrap 0.266s`
- `git diff --check` - PASS; no output

## Roadmap Completion

- Milestone: `agent-roadmap/phase/update-plane-self-update-foundation/milestones/runtime-reconnect-config-refresh.md`
- Completed task ids:
  - `drain`: PASS; evidence=`agent-task/archive/2026/06/m-runtime-reconnect-config-refresh/06+05_node_drain_runtime_config/plan_cloud_G08_0.log`, `agent-task/archive/2026/06/m-runtime-reconnect-config-refresh/06+05_node_drain_runtime_config/code_review_cloud_G08_0.log`, `agent-task/archive/2026/06/m-runtime-reconnect-config-refresh/06+05_node_drain_runtime_config/plan_local_G06_1.log`, `agent-task/archive/2026/06/m-runtime-reconnect-config-refresh/06+05_node_drain_runtime_config/code_review_local_G06_1.log`; verification=`go test -count=1 ./apps/node/internal/node ./apps/node/internal/adapters ./apps/edge/internal/configrefresh ./apps/edge/internal/bootstrap`
  - `runtime-config`: PASS; evidence=`agent-task/archive/2026/06/m-runtime-reconnect-config-refresh/06+05_node_drain_runtime_config/plan_cloud_G08_0.log`, `agent-task/archive/2026/06/m-runtime-reconnect-config-refresh/06+05_node_drain_runtime_config/code_review_cloud_G08_0.log`, `agent-task/archive/2026/06/m-runtime-reconnect-config-refresh/06+05_node_drain_runtime_config/plan_local_G06_1.log`, `agent-task/archive/2026/06/m-runtime-reconnect-config-refresh/06+05_node_drain_runtime_config/code_review_local_G06_1.log`; verification=`go test -count=1 -run 'TestConfigRefresh(FailedAdapterStartDoesNotApplyRuntimeConcurrency|UpdatesGlobalConcurrencyForFutureRuns|ConcurrencyDecreaseDoesNotCancelInFlight|WorkspaceRootReportsRestartRequired)' ./apps/node/internal/node`
- Not completed task ids: 없음

## 잔여 Nit

- 없음

## 후속 작업

- 없음
