From 7c5b212f430705302f5219ea3585d8a330fcb047 Mon Sep 17 00:00:00 2001 From: stroblme Date: Tue, 25 Aug 2026 08:21:27 +0200 Subject: [PATCH] Let `fluksio status` read a local installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `runs --local` already exists for the reason status needs it: the flows and the history are in this directory, and looking at them should not need a server. Watching still does — an in-process engine is the command itself, so nothing could change under it — and says so rather than sitting on a still frame. Found setting up a sandbox that drives the SDK entirely through --local. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_019V5bsYGNxcgPs4xXmTPx69 --- backend/fluksio/sdk/cli.py | 8 +++++++- docs/code/cli.md | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/fluksio/sdk/cli.py b/backend/fluksio/sdk/cli.py index cb2a249..5863b3f 100644 --- a/backend/fluksio/sdk/cli.py +++ b/backend/fluksio/sdk/cli.py @@ -612,6 +612,10 @@ def cmd_status(args: argparse.Namespace) -> int: return 0 if not sys.stdout.isatty(): return _fail("--watch needs a terminal; without one, drop it") + if getattr(args, "local", False): + # An in-process engine is this command and nothing else, so + # nothing can change under it while it watches. + return _fail("--watch wants an engine that outlives it; drop --local") with Live(_status_screen(client), console=console) as live: while True: time.sleep(WATCH_INTERVAL_S) @@ -788,7 +792,9 @@ def add_parsers(subparsers: Any) -> None: action="store_true", help="keep it on screen, refreshed until Ctrl-C", ) - with_engine(parser) + # `--local` for the same reason `runs` has it: the flows and the history are + # in this directory, and reading them should not need a server. + with_engine(parser, local=True) parser.set_defaults(func=cmd_status) parser = subparsers.add_parser("runs", help="the runs an engine has recorded") diff --git a/docs/code/cli.md b/docs/code/cli.md index 012ef8f..226596a 100644 --- a/docs/code/cli.md +++ b/docs/code/cli.md @@ -241,6 +241,10 @@ whether it has unpublished changes, and the last few failures under them. the cadence the dashboard polls at, since nothing here moves faster. It needs a terminal; without one, run it without `--watch` and the output pipes cleanly. +`--local` reads the flows and history out of this directory with no engine +served, the same way `runs --local` does. It cannot be watched: an in-process +engine is the command itself, so nothing changes under it. + ### `fluksio runs` ```sh