[수정] 권한 조회의 잠금 대기·취소 전파 #73

Closed
opened 2026-10-11 17:55:01 +09:00 by dreampiler · 1 comment
Owner

Owner goal: Operations c0e7f56206:49Z +4d7d17c107:05Z requests the remaining backend repair separately after W092/#222 delivery.
Observable result: cancel escalation in one session cannot indefinitely block another session's pending-permission lookup/automatic response; lock acquisition and the full pre-HTTP path return within context deadline and preserve actual agent continuation.
Scope: ListPendingAgentPermissions session read -> ExecutionStore.GetBySessionID(global s.mu RLock) -> AgentExecution.AcquireAgentCtlClient(agentctlLifecycleMu RLock) -> already30s HTTP ListPendingPermissions/ResolvePermission. Reported no deadlines before HTTP; cancellation Remove holds global lock while clearRuntimeEnvironment takes runtimeEnvMu. Review manager_execution.go:1493, manager_interaction.go:1460/1550/1573, manager_idle_parking.go:236 and lifecycle/manager_interaction.go:3084-3097 in current worktree, verify lines rather than blindly quote. Operations timeline says four stored permissions returned permission_not_found only after5h45m/restart; agentctl dump lacked the lookup handler. Shared global lock cause is hypothesis pending backend dump/reproduction.
Minimum repair must cover the context deadline including acquisition and avoid escalation holding global ownership while waiting. No abandoned goroutine that later mutates state after caller timeout. One finite isolated mock-agent reproduction: cancelling/escalating one session while another permission is resolved. Reuse #222 bounded agentctl response/writer changes and don't duplicate them; preserve agent permission decisions and continuation. Isolated merged full backend >=15min/samePID/health200/panic0 plus real entry outcome. Ops owns runtime/pprof/dumps; existing AIWS W-1010-35 owns capture, no new capture task. Different from delivery retention and starting-route cleanup, no dependency solely for file overlap.
Execution contract: standing parent8e3eb6b7; Worktree executor08eb0bba-37dc-459c-b34c-14322417bde7/new_workspace/repository068d4436-d120-42af-b178-8e1a45eb2279/forkmain. Use only the platform-assigned worktree; record its path. No shared checkout writes, second worktree, native subagents/manual models, credential/settings change, operating DB/process mutation or AIWS source work. Fork PRs name --repo dreampiler/kandev. Upstream GitHub writes belong solely W091 fixedOpus, not this task. Preserve profile order, session ceiling, existing working behavior. Design basis: design-card invariants3/4/5 (lines28-32) and design index at D:/260720_Ai_Workspace/projects/260926_Kandev/repo/_Prj_Knowledge/p200_index/. Read only relevant canonical sections in assigned worktree (scoped AGENTS, docs/specs/README.md, architecture Orchestrator/Agent Manager). First return the repository-required requirements/system-design/plan/work-order package for this request and report the checkpoint before production/permanent-test edits; do not invent another approval question or substitute a generic implementation prompt for that checkpoint. Existing normal later implementation/review/merge workflow applies after explicit package implementation instruction. Changed-logic source-adjacent unit tests are the Kandev exception; temporary reproductions stay in own untracked location outside automatic collection. No full suite, new permanent integration/e2e/CI, monitor/heartbeat/framework/ledger/hash/audit. Report facts vs hypotheses, exact source/head/validation/remaining inputs. Prior completed evidence is reused when relevant inputs match. Operations alone installs/restarts/cleans operating data under its existing approval. Queue/jobsheet route is the existing permitted gate exception.

Owner goal: Operations c0e7f56206:49Z +4d7d17c107:05Z requests the remaining backend repair separately after W092/#222 delivery. Observable result: cancel escalation in one session cannot indefinitely block another session's pending-permission lookup/automatic response; lock acquisition and the full pre-HTTP path return within context deadline and preserve actual agent continuation. Scope: ListPendingAgentPermissions session read -> ExecutionStore.GetBySessionID(global s.mu RLock) -> AgentExecution.AcquireAgentCtlClient(agentctlLifecycleMu RLock) -> already30s HTTP ListPendingPermissions/ResolvePermission. Reported no deadlines before HTTP; cancellation Remove holds global lock while clearRuntimeEnvironment takes runtimeEnvMu. Review manager_execution.go:1493, manager_interaction.go:1460/1550/1573, manager_idle_parking.go:236 and lifecycle/manager_interaction.go:3084-3097 in current worktree, verify lines rather than blindly quote. Operations timeline says four stored permissions returned permission_not_found only after5h45m/restart; agentctl dump lacked the lookup handler. Shared global lock cause is hypothesis pending backend dump/reproduction. Minimum repair must cover the context deadline including acquisition and avoid escalation holding global ownership while waiting. No abandoned goroutine that later mutates state after caller timeout. One finite isolated mock-agent reproduction: cancelling/escalating one session while another permission is resolved. Reuse #222 bounded agentctl response/writer changes and don't duplicate them; preserve agent permission decisions and continuation. Isolated merged full backend >=15min/samePID/health200/panic0 plus real entry outcome. Ops owns runtime/pprof/dumps; existing AIWS W-1010-35 owns capture, no new capture task. Different from delivery retention and starting-route cleanup, no dependency solely for file overlap. Execution contract: standing parent8e3eb6b7; Worktree executor08eb0bba-37dc-459c-b34c-14322417bde7/new_workspace/repository068d4436-d120-42af-b178-8e1a45eb2279/forkmain. Use only the platform-assigned worktree; record its path. No shared checkout writes, second worktree, native subagents/manual models, credential/settings change, operating DB/process mutation or AIWS source work. Fork PRs name --repo dreampiler/kandev. Upstream GitHub writes belong solely W091 fixedOpus, not this task. Preserve profile order, session ceiling, existing working behavior. Design basis: design-card invariants3/4/5 (lines28-32) and design index at D:/260720_Ai_Workspace/projects/260926_Kandev/repo/_Prj_Knowledge/p200_index/. Read only relevant canonical sections in assigned worktree (scoped AGENTS, docs/specs/README.md, architecture Orchestrator/Agent Manager). First return the repository-required requirements/system-design/plan/work-order package for this request and report the checkpoint before production/permanent-test edits; do not invent another approval question or substitute a generic implementation prompt for that checkpoint. Existing normal later implementation/review/merge workflow applies after explicit package implementation instruction. Changed-logic source-adjacent unit tests are the Kandev exception; temporary reproductions stay in own untracked location outside automatic collection. No full suite, new permanent integration/e2e/CI, monitor/heartbeat/framework/ledger/hash/audit. Report facts vs hypotheses, exact source/head/validation/remaining inputs. Prior completed evidence is reused when relevant inputs match. Operations alone installs/restarts/cleans operating data under its existing approval. Queue/jobsheet route is the existing permitted gate exception.
Author
Owner

[수정] 권한 조회의 잠금 대기·취소 전파: PR #228 fork main 병합 완료(병합 커밋 fcf6188f, MERGED 2026-10-11T11:18:07Z, squash, PR 브랜치 원격 삭제됨). 한 일: list/resolve/cancel 단일 30s requestCtx 배선 + waitForLease 무고루틴 리스 + Remove 락 축소, 검토 PASS(차단 지적 없음). 근거: gh pr view 228 state MERGED, origin/main == fcf6188f, 공용 체크아웃 main FF 완료·clean. 남은 것: mock-agent 격리 재현과 Operations 소유 >=15min soak(동일 PID/health200/panic0 + 실제 진입 결과)은 미수행 상태로 유지. 후속 제안: 없음(이 작업에 blocked_by/blocker/child 없음, 토글 추가 없음).

[수정] 권한 조회의 잠금 대기·취소 전파: PR #228 fork main 병합 완료(병합 커밋 fcf6188f, MERGED 2026-10-11T11:18:07Z, squash, PR 브랜치 원격 삭제됨). 한 일: list/resolve/cancel 단일 30s requestCtx 배선 + waitForLease 무고루틴 리스 + Remove 락 축소, 검토 PASS(차단 지적 없음). 근거: gh pr view 228 state MERGED, origin/main == fcf6188f, 공용 체크아웃 main FF 완료·clean. 남은 것: mock-agent 격리 재현과 Operations 소유 >=15min soak(동일 PID/health200/panic0 + 실제 진입 결과)은 미수행 상태로 유지. 후속 제안: 없음(이 작업에 blocked_by/blocker/child 없음, 토글 추가 없음).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dreampiler/kandev#73