Repository navigation
feat(contracts): define the executor Files and Commands services - #2764
Merged
Merged
Conversation
blkt
force-pushed
the
feat/executor-services-2689
branch
2 times, most recently
from
November 11, 2026 15:58
92e1a87 to
a0587fe
Compare
blkt
marked this pull request as ready for review
November 11, 2026 16:03
Contributor
Author
|
Please note that 3554 lines in this PR are generated, and the real change amounts to 333. |
rdimitrov
approved these changes
Nov 12, 2026
rdimitrov
left a comment
Member
There was a problem hiding this comment.
LGTM. The protos line up with the Workspace/WorkspaceNamespace ports: absent vs empty FileVersion, create-only CreateFile, rename/copy refusing an existing destination. RequestContext is wire-identical to execution/v1, and the RunCommand lifecycle is clear. The scoped buf breaking guard is safe on main and in shallow clones.
The last CI run was cancelled, so it needs a re-run before merge.
Worth settling before the dependent PRs build on this (non-blocking here):
- Unary whole-file transfer.
ReadFile/CreateFile/ReplaceFilecan carry up to 5 MiB, above gRPC's 4 MiB default. Either document the raised limit as a requirement for both ends, or move to chunked streaming now, before #2691/#2694/#2695/#2701/#2710 depend on the unary shape. - No
terminal_receiptequivalent. The provider store usesCommandStatusResponse.terminal_receiptto treat a durable command as finished. A receivedresultevent can stand in for it, but #2718 should do that deliberately. A line in the protocol draft would help.
Add the mecatl.executor.v1 package, generated into contracts/gen/go/mecatl/executor/v1 with only protobuf and gRPC imports so it can become a standalone module by a move plus a go.mod. FileService has one RPC per Workspace and WorkspaceNamespace operation, plus ResolveAuthorityPath. Versions travel as a FileVersion message so an absent version, which never matches, is distinct from a valid empty token. CommandService.RunCommand is a bidirectional stream: start and an optional in-band cancel go in; started, stdout, stderr, and one terminal result come out. The result can be succeeded, failed, cancelled, timed out, or outcome unknown. Every request carries a RequestContext, a wire-identical copy of the execution/v1 message so the package stays standalone; executors ignore it. Failures carry an ErrorDetail reason beside the canonical status code. Add task lint:proto (buf lint, and buf breaking once the base ref has the package) and run it in CI. Closes #2689
blkt
force-pushed
the
feat/executor-services-2689
branch
from
November 12, 2026 11:26
a0587fe to
1b71c82
Compare
A result whose outcome is known replaces Pod exec's terminal_receipt, so the trusted service treats it as the end of the command.
rdimitrov
approved these changes
Nov 12, 2026
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.
Adds the
mecatl.executor.v1package withFileServiceandCommandService, the shared contract that the in-memory implementation (#2691), the executor servers (#2694, #2695), the provider proxy (#2701) and the mecak8s client (#2710) build against.What changes
contracts/proto/mecatl/executor/v1/{files,commands,errors,context}.proto, generated intocontracts/gen/go/mecatl/executor/v1(executorv1) bytask generate. The generated code imports only protobuf and gRPC, so Move the contract and adapters into standalone modules #2716 is a move plus ago.mod.FileServicehas one RPC perWorkspaceandWorkspaceNamespaceoperation, plusResolveAuthorityPathforAuthorityResourceResolver.ReadFilecovers bothReadandReadVersion.FileVersionmessage, so an absent version, which never matches, is distinct from a valid empty token.CreateFileis create-only; rename and copy refuse an existing destination.CommandService.RunCommandis a bidirectional stream: the caller sends start and an optional in-band cancel; the server sends started, ordered stdout and stderr chunks, and one terminal result (succeeded, failed, cancelled, timed out, or outcome unknown). Cancelling in-band rather than closing the call lets the caller still receive the result needed for fencing. A failure beforestartedran nothing; a failure after it without a result has an unknown outcome.ErrorDetailreason beside the canonical status code, since one code can mean two things (for exampleFAILED_PRECONDITIONfor directory-not-empty and version mismatch).RequestContext, a wire-identical copy of theexecution/v1message, so the package imports no other mecatl package. The trusted service authorizes each call with it; executors ignore it.task lint:protorunsbuf lintand, once the base ref has the package,buf breakingoncontracts/proto/mecatl/executoronly; CI runs it in thesdk-integrationjob. The rest of the tree has existing STANDARD lint violations, so the gate is scoped. Because it does not coverexecution/v1, Switch file and command operations to the executor server #2718's removal of the old RPCs needs no exemption.ExecutionProviderService, its messages andengine/are unchanged.StartCommandkeeps working until Switch file and command operations to the executor server #2718 switches mecak8s toCommandService.API compatibility
mecatl.executor.v1, is added; no existing RPC, message, field, or server or engine behaviour changes. The public Harness API (mecatl.v1), the driver protocol andmecatl.execution.v1are untouched, and nothing registers or calls the new services until Switch file and command operations to the executor server #2718.server.APIMajoris unchanged and no feature identifier is added. An unregistered service answersUNIMPLEMENTED; the gRPC health service is the discovery path, as Wire API compatibility assessment #2692 describes for the Switch file and command operations to the executor server #2718 preflight.ExecutionProviderServiceis assessed in Wire API compatibility assessment #2692 and lands in Switch file and command operations to the executor server #2718.Closes #2689