Skip to content

Commit ff71ed3

Browse files
refactor: update setup report status mode and force direct runtime transport in test suite
1 parent fef33de commit ff71ed3

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/fls_pilot/control_center.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ def client_snippets(state: ControlCenterState) -> dict[str, Any]:
13071307

13081308

13091309
def setup_report(state: ControlCenterState) -> str:
1310-
status = collect_status(state, refresh=False)
1310+
status = collect_status(state, refresh=True, status_mode="diagnose")
13111311
lines = [
13121312
"# fls-pilot setup report",
13131313
"",

tests/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,22 @@
1616

1717

1818
@pytest.fixture(autouse=True)
19-
def _isolate_daemon_runtime(tmp_path):
19+
def _isolate_daemon_runtime(tmp_path, monkeypatch):
2020
"""Replace daemon._runtime and runtime_access._LOCAL_RUNTIME with a
2121
tmp_path-backed RuntimeCore.
2222
2323
This fixture is autouse so it runs for every test, ensuring that:
2424
- daemon._handle_request() / _get_runtime() uses an isolated SQLite store.
2525
- local_runtime() / get_report_store() uses the same isolated store instead
2626
of creating its own RuntimeCore() against the default ~/.fls-pilot path.
27+
- offline tests default to direct Runtime access even when the surrounding
28+
environment has FLS_PILOT_TRANSPORT=tcp for live/manual workflows.
2729
2830
The runtime_server fixture in test_runtime_rpc.py saves and restores
2931
daemon._runtime directly; the conftest try/finally restores the module
3032
globals cleanly after each test.
3133
"""
34+
monkeypatch.setenv("FLS_PILOT_TRANSPORT", "direct")
3235
prev_daemon = daemon._runtime
3336
prev_local = runtime_access._LOCAL_RUNTIME
3437
isolated = RuntimeCore(

0 commit comments

Comments
 (0)