Skip to content

fix(toolexec): repair build after approvalMu removal#3576

Merged
dgageot merged 1 commit into
mainfrom
fix/toolexec-approvalmu-build
Jul 10, 2026
Merged

fix(toolexec): repair build after approvalMu removal#3576
dgageot merged 1 commit into
mainfrom
fix/toolexec-approvalmu-build

Conversation

@dgageot

@dgageot dgageot commented Jul 10, 2026

Copy link
Copy Markdown
Member

Main currently fails to compile due to a semantic merge conflict. PR #3490 removed Dispatcher.approvalMu and moved permission locking into the session package's own mutex, but an earlier commit (0a2dafd) that fixed the preempt-yolo "always allow" path had already added sessionPermissionsAllow() in pkg/runtime/toolexec/dispatcher.go — a function that references c.d.approvalMu. Both changes merged cleanly at the text level, but the combined result references a field that no longer exists.

The fix rewrites sessionPermissionsAllow to use sess.ClonePermissions(), the thread-safe accessor that the new locking model exposes, eliminating the direct mutex reference on the dispatcher entirely. The behavior is identical: permissions are read under the session's own lock rather than a separate dispatcher-level one.

No API or behavior changes; this is a pure build fix.

Semantic merge conflict: PR #3490 removed Dispatcher.approvalMu and moved
permission locking into the session package, but sessionPermissionsAllow still
referenced c.d.approvalMu. Rewrites it to use sess.ClonePermissions() instead.

Assisted-By: Claude
@dgageot dgageot requested a review from a team as a code owner July 10, 2026 11:41
@dgageot dgageot merged commit 0989a68 into main Jul 10, 2026
12 checks passed
@dgageot dgageot deleted the fix/toolexec-approvalmu-build branch July 10, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants