From 81243284cb89206911ec45e99f80701b591c88ae Mon Sep 17 00:00:00 2001 From: toki Date: Sun, 2 Aug 2026 21:12:36 +0900 Subject: [PATCH] refactor(execution): correct residual agent ownership wording Post-promotion boundary correction: replace the standalone-agent and terminal-session wording in doc.go/types.go/main.go with provider-only, run-scoped descriptions and add a Node CLI regression that rejects Agent wording. Promotion and recovery evidence is preserved untouched. --- apps/node/cmd/node/main.go | 2 +- apps/node/cmd/node/main_test.go | 11 +++++++++++ packages/go/execution/doc.go | 6 +++--- packages/go/execution/types.go | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/apps/node/cmd/node/main.go b/apps/node/cmd/node/main.go index 9e01db80..6b85a9ad 100644 --- a/apps/node/cmd/node/main.go +++ b/apps/node/cmd/node/main.go @@ -26,7 +26,7 @@ func main() { func rootCmd() *cobra.Command { root := &cobra.Command{ Use: "node", - Short: "IOP Node Agent — runs adapter executions on this device", + Short: "IOP Node — runs provider executions on this device", } root.PersistentFlags().StringVarP(&cfgFile, "config", "c", "configs/node.yaml", "config file path") diff --git a/apps/node/cmd/node/main_test.go b/apps/node/cmd/node/main_test.go index 09979fd7..a7d215cc 100644 --- a/apps/node/cmd/node/main_test.go +++ b/apps/node/cmd/node/main_test.go @@ -45,6 +45,17 @@ func TestRootCmdIncludesOperationalCommands(t *testing.T) { } } +func TestRootCmdUsesProviderOnlyDescription(t *testing.T) { + short := rootCmd().Short + lower := strings.ToLower(short) + if !strings.Contains(lower, "provider") { + t.Errorf("root command Short must describe provider execution; got %q", short) + } + if strings.Contains(lower, "agent") { + t.Errorf("root command Short must not claim Agent ownership; got %q", short) + } +} + func TestVersionCmdPrintsVersion(t *testing.T) { root := rootCmd() var out bytes.Buffer diff --git a/packages/go/execution/doc.go b/packages/go/execution/doc.go index b3384caf..de353588 100644 --- a/packages/go/execution/doc.go +++ b/packages/go/execution/doc.go @@ -1,5 +1,5 @@ -// Package execution contains the host-neutral execution contract shared by -// IOP Node and standalone agent hosts. It owns provider lifecycle, streaming -// events, typed failures, registry lifecycle, and terminal session primitives; +// Package execution contains provider-only, host-neutral execution contracts +// shared by Node and Edge-facing provider transports. It owns provider +// lifecycle, streaming events, typed failures, and registry lifecycle; // host wire translation remains outside this package. package execution diff --git a/packages/go/execution/types.go b/packages/go/execution/types.go index 3357e090..9e834bb8 100644 --- a/packages/go/execution/types.go +++ b/packages/go/execution/types.go @@ -12,7 +12,7 @@ import ( // Providers must not use it to identify, resume, or retain a process. const DefaultSessionID = "default" -// ErrRunCancelled is returned by adapters when a run is cancelled without terminating the session. +// ErrRunCancelled is returned by providers when a single run is cancelled. var ErrRunCancelled = errors.New("run cancelled") // ExecutionSpec is the resolved, policy-applied specification for a single run.