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.
This commit is contained in:
toki 2026-08-02 21:12:36 +09:00
parent c8e98d4e10
commit 81243284cb
4 changed files with 16 additions and 5 deletions

View file

@ -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")

View file

@ -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

View file

@ -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

View file

@ -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.