refactor(pass)!: return errors from run options - #662
Merged
Merged
Conversation
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
BREAKING CHANGE: RunCommand now returns (*cobra.Command, error), and RunOption returns error. Invalid socket paths and timeouts fail during construction.
Benehiko
force-pushed
the
codex/run-option-errors
branch
from
September 24, 2026 07:42
d51411c to
800dd9f
Compare
joe0BAB
reviewed
Sep 24, 2026
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
This review covers only the commits pushed since 6eae107.
Assessment: 🟢 APPROVE
The incremental diff contains only documentation comment changes to plugins/pass/commands/run.go:
- Removal of the now-redundant godoc line
// RunOption configures a run command and reports invalid option values.above theRunOptiontype (the type signature itself is self-documenting after the earlier refactor). - Simplification of the
RunCommandgodoc from two lines to one:// RunCommand uses [api.DesktopSocketPath] by default.
No logic, behaviour, exported API, or test code was changed in this incremental push. No bugs introduced.
joe0BAB
reviewed
Sep 24, 2026
joe0BAB
reviewed
Sep 24, 2026
joe0BAB
reviewed
Sep 24, 2026
joe0BAB
approved these changes
Sep 24, 2026
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.
RunCommandcurrently accepts invalid options during construction: an empty socket path silently selects the Desktop default, and negative timeout errors surface only when the command executes.Make
RunOptionreturn an error and haveRunCommandreturn the first option error before creating a command. Reject empty socket paths and negative request/response timeouts. Zero timeouts remain valid, and omittingWithSocketPathuses the Desktop default.BREAKING CHANGE:
RunCommandnow returns(*cobra.Command, error), andRunOptionnow has signaturefunc(*runOpts) error. Callers must handle the constructor error before using the command. ReplaceWithSocketPath("")with omission of the option when the default is intended.Validation:
go test -race ./plugins/pass/commands./plugins/pass/...git diff --check