[상류] 기존 #4734 pprof listener 종료 누락 수정 #215
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
원 요구·승인
소유자 직접 지시(2026-10-29): 닫힌 #4393·#4396 리뷰 9건을 대체 PR·현재 코드와 대조해 누락된 수정은 검증 후 기존 PR에 반영, 기존 기능·이력 보존, 중복 PR 0. 이 task는 그중 #4396 review 4236867413(pprof listener 종료 누락)의 단일 source writer다. 8e 확인: Native task·p320에 #4734의 활성 writer 없음. P27 wrapper 145ee9fe는 이력 대조용 포인터일 뿐이며, 그 wrapper의 Plan을 고치거나 금지된 행동을 대신하지 않는다.
입력 (운영root 확인)
kdlbs/kandev#4734 'feat(agentctl): add optional loopback profiling listener' OPEN, 공개 head 95e1786c3fd1f4f87a9a167cea7fc235b4bfcc16, fork branch codex/upstream-agentctl-profiling-20261023. 그 commit의 cmd/agentctl/pprof_listener.go에서 startPprofListenerIfEnabled가 http.Server를 local 변수로만 만들고 goroutine ListenAndServe를 시작하며, Shutdown/Close나 owner 반환이 없다(운영 사본 f742도 같다). 현재 upstream main에는 이 파일이 없다. 그러니 '#4734에 기능이 있다'만으로 옛 review가 해결됐다고 보지 않는다.
할 일
경계
기존 95e 이력 보존, force/reset/amend/branch 삭제 0. 실행 중인 다른 프로세스·운영 pprof 설정·운영 사본 변경 0. 운영/DB/설치/프로필/재시작 0.
8e receiving acceptance: ACCEPT the #4734 pprof listener shutdown fix for closed #4396 review 4236867413 (task 35316114-72a2-40fe-ae97-c539943aca3a, single writer). 8e read-only checks: worktree kandev-upstream-4734_g8psfxqy HEAD 2ab1a10f09f9645601cb4a51494f3fca1471e0fb, descendant of the public #4734 head 95e1786c3fd1 (non-force FF possible), 3 files: cmd/agentctl main.go, pprof_listener.go, and the existing main_test.go (no new test file). Behaviour per source and root read: startPprofListenerIfEnabled now returns a stop function that the run path defers; it closes only its own server (sync.Once, srv.Close) and waits for the serve goroutine; default off, loopback-only, warning-only bind failure and auth unchanged. Formal RV FORMAL-rv-run-delta-2ab1a10f09f.md-1793275946865752700-10856-mid-1 (CALL-20261029-4da2b7da2786) completed APPROVE findings 0 (8e read the record). Source-reported: profiling and existing liveness cases pass including port rebind, repeated stop, noop and bind failure; gofmt/vet/lint 0; normal hooks; full-PR docs coverage covered. Two Windows CLI shim failures in the full package also fail on public 95e and are not claimed green. No push/comment. Publication: 93->5d non-force FF of the same #4734 to 2ab1a10f09f9, then answer and resolve the old #4396 thread only after public readback.
8e publication acceptance: the pprof listener shutdown fix is published on the existing kdlbs/kandev#4734 by sole publisher 5d as a non-force fast-forward. 8e gh readback: OPEN, MERGEABLE, head 2ab1a10f09f9645601cb4a51494f3fca1471e0fb = reviewed head accepted in artifact-note:20261029T122016052546Z. 93 readback: base main, 7 files +313/-0; closed #4396 thread PRRT_kwDOQ2-eWs6rCG4- resolved with reply 4412246665, which states the fix is in the pending #4734 and not yet merged; exact-head check-runs 12 (5 queued, 7 completed/skipped, 0 failed), new-head docs coverage not yet reported, so no PASS claim. Not a whole-CI-green or merge claim. Maintainer review and merge remain external.
RV 승인(APPROVE, 필수 지적 0) 완료. 검토 단계 전환 신호가 이미 계획 칸에 기록되어 있어, 턴 종료 시 deferred move가 적용되면 검토 칸에서 완료 신호를 보내겠습니다. 공개 갱신은 93→5d 담당이며 이 소스는 push/PR/댓글 0입니다.