enforce effect boundaries for exec command callsites#424
Merged
Conversation
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
git.Runner,github.Client, anddaemon.ProcessManagerinterfaces, and refactor daemon/proto + GitHub/PR paths to use them instead of directexec.Commandcallsites.internal/tmuxpackage, add semgrep guardrails for legacy import + daemon git raw-exec usage, and migrate CLI command paths (stop,continue,exec,log) toward attach-style dependency injection while removingtestAPIOverrideglobal usage.go generate-driven mock tooling (moq) and sharedinternal/testutilpackage with generated mocks forOrchAPI,Store,Multiplexer,git.Runner, andgithub.Client.Acceptance Criteria Evidence
git.Runnerinterface exists; daemon uses it instead of raw execinternal/git/runner.gointernal/daemon/proto_handler.go,internal/daemon/socket.gogithub.Clientinterface exists; github/pr packages use itinternal/github/client.gointernal/github/backend.gointernal/pr/cache.godaemon.ProcessManagerinterface exists for opencode server lifecycleinternal/daemon/process_manager.gointernal/daemon/socket.gointernal/tmux/package removed; all callers usemultiplexer.Multiplexerinternal/tmux/tmux.go,internal/tmux/tmux_test.gotestAPIOverrideremovedinternal/cli/stop.go,internal/cli/continue.go,internal/cli/exec.go,internal/cli/log.go,internal/cli/root.gogo generatefor interfaces with 5+ methodsinternal/testutil/generate.goand generated mocks ininternal/testutil/moqdependency ingo.mod/go.suminternal/testutil/package with common test helpersinternal/testutil/fake_executor.go+ generated mock files.semgrep/architecture.yamlwithno-legacy-tmux-importanddaemon-no-raw-exec-gitmake lintpasses with new rulesmake lintgo test ./...passesgo test ./...internal/cli TestApplyConfigDefaultsFallbacksinvalid config schema .../.orch/config.yaml: EOFvar execCommandhacks introducedVerification Commands Run
go generate ./internal/testutilgo test ./internal/daemon ./internal/git ./internal/github ./internal/pr ./internal/cli ./internal/testutilgo test ./...(fails on pre-existinginternal/clitest above)make lintRefs: orch-443