From b2e1810bd6bef3efd75cab1d2a5688a4ad2288fa Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sat, 24 Oct 2026 11:24:49 +1100 Subject: [PATCH] fix(archieui): reach the sandbox and setup terminal on the daemon's listener --- cmd/archie-ui/main.go | 1 - config.example.toml | 6 ++---- internal/app/archieui/config.go | 3 --- internal/app/archieui/options.go | 4 ---- internal/app/archieui/run.go | 10 +++------- internal/config/servicespec.go | 7 +------ 6 files changed, 6 insertions(+), 25 deletions(-) diff --git a/cmd/archie-ui/main.go b/cmd/archie-ui/main.go index ac037c5c2..7386ae55f 100644 --- a/cmd/archie-ui/main.go +++ b/cmd/archie-ui/main.go @@ -34,7 +34,6 @@ func run() int { flag.StringVar(&options.OidcRedirectURL, "oidc-redirect-url", "", "callback URL registered at the provider (path must be /oauth2/callback)") flag.StringVar(&options.Gateway.Target, "gateway-target", "", "archie-gateway gRPC address (defaults to [services.gateway].target)") flag.StringVar(&options.State.Target, "state-target", "", "archie-state-store gRPC address (defaults to [services.state].target)") - flag.StringVar(&options.Harness.Target, "harness-target", "", "archied harness session gRPC address (defaults to [services.harness].target); empty leaves the setup terminal unwired") flag.DurationVar(&options.DependencyTimeout, "dependency-timeout", 0, "per-dependency readiness probe timeout (default 5s)") flag.DurationVar(&options.EventPollInterval, "event-poll-interval", 0, "how often the activity feed polls the State Store for new events (default 1s)") // BoolFunc rather than BoolVar so an unset flag stays distinguishable diff --git a/config.example.toml b/config.example.toml index 7575836a8..fc8e8837b 100644 --- a/config.example.toml +++ b/config.example.toml @@ -293,10 +293,8 @@ target = "127.0.0.1:9090" # REQUIRED. The State Store gRPC address arch # target = "127.0.0.1:8587" # listen = "127.0.0.1:8587" -# Optional setup terminal into a Kit container, served on the daemon listener. -# Terminal sessions also require [tls] and a container launcher. -# [services.harness] -# target = "127.0.0.1:8587" +# The daemon listener also serves the setup terminal and the Sandbox tab, which +# require [tls] and a container launcher. # NATS is the sole autonomous workflow handoff. mode changes only where the # broker runs; every workflow still runs in a managed task container: diff --git a/internal/app/archieui/config.go b/internal/app/archieui/config.go index 9c3cfb308..878d2bb81 100644 --- a/internal/app/archieui/config.go +++ b/internal/app/archieui/config.go @@ -66,7 +66,6 @@ type projection struct { gateway ServiceTarget state ServiceTarget messaging ServiceTarget - harness ServiceTarget daemon ServiceTarget tls config.TLS capture CaptureOptions @@ -80,7 +79,6 @@ func project(cfg config.Config) projection { gateway: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameGateway).Target}, messaging: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameMessaging).Target}, state: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameState).Target}, - harness: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameHarness).Target}, daemon: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameDaemon).Target}, tls: cfg.TLS, instance: cfg.Instance, @@ -106,7 +104,6 @@ func merge(o Options, p projection) Options { o.Gateway = mergeTarget(o.Gateway, p.gateway) o.Messaging = mergeTarget(o.Messaging, p.messaging) o.State = mergeTarget(o.State, p.state) - o.Harness = mergeTarget(o.Harness, p.harness) o.Daemon = mergeTarget(o.Daemon, p.daemon) if o.Capture.Retention <= 0 { o.Capture.Retention = p.capture.Retention diff --git a/internal/app/archieui/options.go b/internal/app/archieui/options.go index 73e0c87a5..582b169bb 100644 --- a/internal/app/archieui/options.go +++ b/internal/app/archieui/options.go @@ -62,10 +62,6 @@ type Options struct { State ServiceTarget Messaging ServiceTarget Daemon ServiceTarget - // Harness is the daemon's session contract. Optional: empty leaves the - // setup terminal unwired, and /api/harness reports terminal:false rather - // than offering a control that would fail. - Harness ServiceTarget // DependencyTimeout bounds each readiness probe's call to a dependency. DependencyTimeout time.Duration diff --git a/internal/app/archieui/run.go b/internal/app/archieui/run.go index 693d62bea..2bc5cbb5b 100644 --- a/internal/app/archieui/run.go +++ b/internal/app/archieui/run.go @@ -142,14 +142,10 @@ func wireDaemon(opts Options, srv *webui.Server, cleanups *[]func()) error { return wireHarness(opts, srv, cleanups) } -// wireHarness attaches the setup terminal and the run-scoped sandbox view to the daemon's session contract -// when the operator configured one, and registers its cleanup. +// wireHarness attaches the setup terminal and the run-scoped sandbox view to +// the session contract the daemon serves on its listener. func wireHarness(opts Options, srv *webui.Server, cleanups *[]func()) error { - if opts.Harness.Target == "" { - return nil - } - - harness, closeHarness, err := harnessrpc.Dial(opts.Harness.Target, opts.identity) + harness, closeHarness, err := harnessrpc.Dial(opts.Daemon.Target, opts.identity) if err != nil { return err } diff --git a/internal/config/servicespec.go b/internal/config/servicespec.go index 9a428593e..159ea9c6c 100644 --- a/internal/config/servicespec.go +++ b/internal/config/servicespec.go @@ -43,7 +43,6 @@ const ( ServiceNameGateway = "gateway" ServiceNameState = "state" ServiceNameMessaging = "messaging" - ServiceNameHarness = "harness" ServiceNameDaemon = "daemon" ) @@ -112,10 +111,6 @@ func init() { RegisterService(ServiceBoth, ServiceNameGateway, "127.0.0.1:8585", "127.0.0.1:8585") RegisterService(ServiceClient, ServiceNameState, "", "127.0.0.1:9090") RegisterService(ServiceBoth, ServiceNameMessaging, "127.0.0.1:8586", "127.0.0.1:8586") - // The daemon hosts the harness session contract in this repository; the - // dashboard dials it, and its target is the operator's to supply, so a - // deployment with no [services.harness].target leaves the setup terminal - // unwired rather than dialling a default nothing owns. + // The daemon listener also serves the harness session contract. RegisterService(ServiceBoth, ServiceNameDaemon, "127.0.0.1:8587", "127.0.0.1:8587") - RegisterService(ServiceClient, ServiceNameHarness, "", "") }