Repository navigation
feat(executor): enable each executor service by its own flag - #2859
Merged
Merged
Conversation
`mecatl-executor serve` now registers only the services named by `-files` and `-commands`, both off by default, and refuses to start when neither is set. With `-commands` unset the server skips `EnableCommandExecution`, the command supervisor, and the orphan reaper, so a file-only executor has no code path that starts a process and a `CommandService` call returns `Unimplemented`. Server construction moves into `newExecutorServer` so the file-only shape is tested over bufconn on every OS.
blkt
enabled auto-merge (squash)
November 18, 2026 11:19
rdimitrov
approved these changes
Nov 18, 2026
rdimitrov
left a comment
Member
There was a problem hiding this comment.
LGTM. With -commands off, EnableCommandExecution, the supervisor and the orphan reaper are all skipped, so a files-only executor really has no path that starts a process. Defaulting both flags to off and refusing to start with neither enabled is the right fail-closed choice, and nothing in the repo runs serve yet. The Unimplemented test pins the important property.
4 of 13 tasks
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mecatl-executor serveregisters only the services enabled by-filesand-commands, both off by default, and refuses to start when neither is set. Without-commandsthe server skipsEnableCommandExecution, the command supervisor, and the orphan reaper, so a file-only executor has no code path that starts a process, as the executor protocol design requires.Issue relationship
Closes #2696
Type of change
Test plan
Baseline checks
task lint)task test), covered bytask test:racetask test:race)go run ./cmd/mecademo): tool call, permission ask and approval, resulttask docs), no Markdown changedtask site:build), not applicabletask api:check), nothing underengine/changedtask api:update+engine/CHANGELOG.md, not applicabletask check:pralso passes. The new tests pass on darwin with-raceand on Linux (golang:1.27.3, uid 1000).TestServeRejectsNoEnabledService:serve -listen Xwith no service flag is a startup error. The check runs before the Linux check, so it runs on every OS.TestServeWithoutCommandsLeavesCommandServiceUnimplemented: a files-onlynewExecutorServerover bufconn servesStatFileand answersRunCommandwithUnimplemented. Forcing the Commands branch on makes it fail on both darwin and Linux.Changes
cmd/mecatl-executor/serve.go-filesand-commandsflags, no-service error,newExecutorServerregisters only enabled services, Commands setup moved intonewCommandServercmd/mecatl-executor/serve_test.go-max-file-bytestest now passes-filescmd/mecatl-executor/main.goUser-facing change
None. Nothing in the repo runs
mecatl-executor serveyet; the Pod-exec mode the controller uses is unchanged.Special notes for reviewers
serveinto the Pod spec (Switch file and command operations to the executor server #2718) must pass the admitted services explicitly.-max-file-bytesis still validated when Files is disabled.