fix: inherit the service starter CLI in managed runs - #309
Merged
Conversation
Propagate the normalized service-start executable through managed services and render agent tracker commands with that executable. Reject update and service stop inside managed runs to prevent agents from terminating their owning orchestrator.\n\nTests: go test ./...
Copy the service starter into TQ_HOME before launching background services so go-run entrypoints remain usable by later agent runs. Require the managed-run marker before rendering TQ_EXECUTABLE and align the prompt design documentation.\n\nTests: go test ./...
Create the managed CLI snapshot only after the start lock, running-service checks, and migration preflight succeed. Add a regression test proving a rejected service start cannot replace the active snapshot and synchronize the recorded prompt body.\n\nTests: go test ./internal/cli/tq ./internal/orchestrator/runner
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.
managed serviceで起動元Tasq CLIを継承する
Summary
tqdev service startで起動したorchestrator配下のagentが、PATH上の別バージョンのtqを実行し、tq updateによって親サービスを停止する問題を防ぎます。サービス起動元CLIを実行契約として継承し、agentのTasq操作とservice lifecycleの安全性を揃えました。主な変更点:
TQ_EXECUTABLEとしてmanaged serviceへ伝播"$TQ_EXECUTABLE"を使用し、旧構成ではtqへfallbacktq updateとtq service stopを状態変更前に拒否やったこと
TQ_EXECUTABLEとTQ_MANAGED_RUNの環境契約を追加{{ tq.command }}を導入動作確認
go test ./...git diff --checkupdateとservice stopが処理開始前に失敗することをテストレビュー & 動作確認 チェックリスト
tqdev service start由来のpromptが"$TQ_EXECUTABLE"を使用することtqへfallbackすること推奨テスト計画:
PATH上に別のtqがある状態でtqdev service startを実行するTQ_EXECUTABLE経由になることを確認するtq updateまたはtq service stopを試し、拒否されることを確認するその他気になることや相談ごと
TQ_MANAGED_RUNはagentの誤操作を防ぐ安全柵であり、悪意ある子プロセスに対するsecurity boundaryではありません。