personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Continue get_journal() normalization across remaining modules

Complete the migration from os.getenv("JOURNAL_PATH") to get_journal():
- apps/chat/tools.py, convey/cli.py, muse/claude.py, muse/cortex_client.py
- observe/linux/screencast.py, observe/remote.py
- think/callosum.py, think/dream.py, think/events.py, think/runner.py
- think/supervisor.py, think/indexer/cli.py, think/indexer/journal.py
- think/journal_stats.py, think/models.py

Remove redundant JOURNAL_PATH validation in observer entry points since
get_journal() now handles path creation. Update tests to use monkeypatch
for JOURNAL_PATH instead of relying on load_dotenv.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+92 -172
+2 -8
apps/chat/tools.py
··· 8 8 from pathlib import Path 9 9 from typing import Any 10 10 11 - from dotenv import load_dotenv 12 11 from fastmcp import Context 13 12 14 13 from muse.mcp import HINTS, register_tool 15 14 from think.facets import _get_actor_info 15 + from think.utils import get_journal 16 16 17 17 # Declare pack membership - add send_message to journal pack 18 18 TOOL_PACKS = { ··· 53 53 - send_message("Reminder: Review the pending PRs", facet="opensource") 54 54 """ 55 55 try: 56 - load_dotenv() 57 - journal_path = os.getenv("JOURNAL_PATH") 58 - if not journal_path: 59 - return { 60 - "error": "JOURNAL_PATH not set", 61 - "suggestion": "ensure JOURNAL_PATH environment variable is configured", 62 - } 56 + journal_path = get_journal() 63 57 64 58 # Create a synthetic agent (just the agent JSONL file) 65 59 from muse.cortex_client import create_synthetic_agent
+2 -4
convey/cli.py
··· 63 63 64 64 def main() -> None: 65 65 """Main CLI entry point for convey command.""" 66 - from think.utils import setup_cli 66 + from think.utils import get_journal, setup_cli 67 67 68 68 from . import create_app 69 69 70 70 parser = argparse.ArgumentParser(description="Convey web interface") 71 71 parser.add_argument("--port", type=int, default=8000, help="Port to serve on") 72 72 args = setup_cli(parser) 73 - journal = os.getenv("JOURNAL_PATH") 74 - if not journal: 75 - raise SystemExit("JOURNAL_PATH not set") 73 + journal = get_journal() 76 74 77 75 app = create_app(journal) 78 76 password = _resolve_config_password()
+2 -8
muse/claude.py
··· 34 34 from dotenv import load_dotenv 35 35 36 36 from think.models import CLAUDE_SONNET_4 37 + from think.utils import get_journal 37 38 38 39 from .agents import JSONEventCallback, ThinkingEvent 39 40 ··· 99 100 100 101 try: 101 102 # Get journal path for file permissions 102 - load_dotenv() 103 - journal_path = os.getenv("JOURNAL_PATH") 104 - if not journal_path: 105 - raise RuntimeError("JOURNAL_PATH not set") 106 - 107 - # Ensure journal path exists 108 - if not os.path.isdir(journal_path): 109 - raise ValueError(f"Journal directory does not exist: {journal_path}") 103 + journal_path = get_journal() 110 104 111 105 # Extract instruction from config 112 106 system_instruction = config.get("instruction", "")
+7 -23
muse/cortex_client.py
··· 11 11 from typing import Any, Callable, Dict, Optional 12 12 13 13 from think.callosum import callosum_send 14 + from think.utils import get_journal 14 15 15 16 logger = logging.getLogger(__name__) 16 17 ··· 39 40 Returns: 40 41 Agent ID (timestamp-based string) 41 42 """ 42 - # Get journal path from environment (for agent_id uniqueness check) 43 - journal_path = os.environ.get("JOURNAL_PATH") 44 - if not journal_path: 45 - raise ValueError("JOURNAL_PATH environment variable not set") 43 + # Get journal path (for agent_id uniqueness check) 44 + journal_path = get_journal() 46 45 47 46 # Create agents directory if it doesn't exist 48 47 agents_dir = Path(journal_path) / "agents" ··· 106 105 Returns: 107 106 Agent ID (timestamp-based string) 108 107 """ 109 - journal_path = os.environ.get("JOURNAL_PATH") 110 - if not journal_path: 111 - raise ValueError("JOURNAL_PATH environment variable not set") 108 + journal_path = get_journal() 112 109 113 110 # Create agents directory if it doesn't exist 114 111 agents_dir = Path(journal_path) / "agents" ··· 147 144 "running" - Agent still active (*_active.jsonl exists) 148 145 "not_found" - No agent file exists 149 146 """ 150 - journal_path = os.environ.get("JOURNAL_PATH") 151 - if not journal_path: 152 - raise ValueError("JOURNAL_PATH environment variable not set") 153 - 154 - agents_dir = Path(journal_path) / "agents" 147 + agents_dir = Path(get_journal()) / "agents" 155 148 156 149 if (agents_dir / f"{agent_id}.jsonl").exists(): 157 150 return "completed" ··· 205 198 Raises: 206 199 FileNotFoundError: If agent log doesn't exist 207 200 """ 208 - journal_path = os.environ.get("JOURNAL_PATH") 209 - if not journal_path: 210 - raise ValueError("JOURNAL_PATH environment variable not set") 211 - 212 - agents_dir = Path(journal_path) / "agents" 201 + agents_dir = Path(get_journal()) / "agents" 213 202 214 203 # Check for completed agent first, then active if not found 215 204 agent_file = agents_dir / f"{agent_id}.jsonl" ··· 317 306 Returns: 318 307 Dictionary with agents list and pagination info 319 308 """ 320 - # Get journal path from environment 321 - journal_path = os.environ.get("JOURNAL_PATH") 322 - if not journal_path: 323 - raise ValueError("JOURNAL_PATH environment variable not set") 324 - 325 309 # Validate parameters 326 310 limit = max(1, min(limit, 100)) 327 311 offset = max(0, offset) 328 312 329 - agents_dir = Path(journal_path) / "agents" 313 + agents_dir = Path(get_journal()) / "agents" 330 314 if not agents_dir.exists(): 331 315 return { 332 316 "agents": [],
-7
observe/linux/observer.py
··· 738 738 ) 739 739 args = setup_cli(parser) 740 740 741 - # Verify journal path exists (only required for local mode) 742 - journal = os.getenv("JOURNAL_PATH") 743 - if not args.remote and (not journal or not os.path.exists(journal)): 744 - logger.error(f"JOURNAL_PATH not set or does not exist: {journal}") 745 - logger.error("Set JOURNAL_PATH or use --remote for remote mode") 746 - sys.exit(1) 747 - 748 741 # Log remote mode if enabled 749 742 if args.remote: 750 743 logger.info(f"Remote mode enabled: {args.remote[:50]}...")
+3 -9
observe/linux/screencast.py
··· 28 28 from dbus_next.constants import BusType 29 29 30 30 from observe.gnome.activity import get_monitor_geometries 31 + from think.utils import get_journal 31 32 32 33 # Workaround for dbus-next issue #122: portal has properties with hyphens 33 34 # (e.g., "power-saver-enabled") which violate strict D-Bus naming validation. ··· 63 64 64 65 65 66 def _get_restore_token_path() -> Path: 66 - """Get path for restore token storage.""" 67 - journal = os.getenv("JOURNAL_PATH") 68 - if journal: 69 - return Path(journal) / "health" / "screencast_restore_token" 70 - # Fallback to XDG state 71 - state_home = os.environ.get("XDG_STATE_HOME") 72 - if not state_home: 73 - state_home = os.path.join(os.path.expanduser("~"), ".local", "state") 74 - return Path(state_home) / "solstone" / "screencast_restore_token" 67 + """Get path for restore token storage within the journal health directory.""" 68 + return Path(get_journal()) / "health" / "screencast_restore_token" 75 69 76 70 77 71 def _load_restore_token() -> str | None:
-7
observe/macos/observer.py
··· 608 608 ) 609 609 args = setup_cli(parser) 610 610 611 - # Verify journal path exists (only required for local mode) 612 - journal = os.getenv("JOURNAL_PATH") 613 - if not args.remote and (not journal or not os.path.exists(journal)): 614 - logger.error(f"JOURNAL_PATH not set or does not exist: {journal}") 615 - logger.error("Set JOURNAL_PATH or use --remote for remote mode") 616 - sys.exit(1) 617 - 618 611 # Log remote mode if enabled 619 612 if args.remote: 620 613 logger.info(f"Remote mode enabled: {args.remote[:50]}...")
+3 -21
observe/remote.py
··· 24 24 import requests 25 25 26 26 from think.callosum import CallosumConnection 27 + from think.utils import get_journal 27 28 28 29 logger = logging.getLogger(__name__) 29 30 ··· 265 266 def staging_path(self) -> Path: 266 267 """Get the staging path for segment files. 267 268 268 - In local mode: uses JOURNAL_PATH (must be set). 269 - In remote mode: uses JOURNAL_PATH if set, otherwise creates temp directory. 270 - 271 - The temp directory persists after crashes for diagnostics. 269 + Uses get_journal() which auto-creates a platform-default path if needed. 272 270 """ 273 271 if self._staging_path is not None: 274 272 return self._staging_path 275 273 276 - journal = os.getenv("JOURNAL_PATH") 277 - 278 - if journal and os.path.exists(journal): 279 - self._staging_path = Path(journal) 280 - elif self.is_remote: 281 - # Remote mode without JOURNAL_PATH - create temp staging directory 282 - # Use fixed subdirectory name so it persists and is findable 283 - staging = Path(tempfile.gettempdir()) / "solstone-observer" 284 - staging.mkdir(parents=True, exist_ok=True) 285 - self._staging_path = staging 286 - logger.info(f"Using temp staging directory: {staging}") 287 - else: 288 - raise RuntimeError( 289 - "JOURNAL_PATH not set (required for local mode). " 290 - "Set JOURNAL_PATH or use --remote for remote mode." 291 - ) 292 - 274 + self._staging_path = Path(get_journal()) 293 275 return self._staging_path 294 276 295 277 def start(self) -> None:
+6 -3
tests/test_callosum.py
··· 253 253 assert client.socket_path == custom_path 254 254 255 255 256 - def test_callosum_send_without_journal_path(): 257 - """Test that callosum_send() returns False when JOURNAL_PATH not set.""" 256 + def test_callosum_send_uses_default_path_when_journal_path_unset(): 257 + """Test that callosum_send() uses default path when JOURNAL_PATH unset.""" 258 258 from think.callosum import callosum_send 259 259 260 260 # Temporarily remove JOURNAL_PATH ··· 263 263 del os.environ["JOURNAL_PATH"] 264 264 265 265 try: 266 + # callosum_send will use the platform default path via get_journal() 267 + # Result depends on whether a server is listening at that path 266 268 result = callosum_send("test", "event", data="value") 267 - assert result is False 269 + # Just verify it returns a boolean (doesn't raise due to missing path) 270 + assert isinstance(result, bool) 268 271 finally: 269 272 # Restore JOURNAL_PATH 270 273 if old_path:
+8 -5
tests/test_config.py
··· 119 119 assert config["identity"]["bio"] == "" 120 120 121 121 122 - def test_get_config_no_journal_path(monkeypatch, tmp_path): 123 - """Test get_config raises error when JOURNAL_PATH not set.""" 124 - # Set to empty string, which should be treated as not set 122 + def test_get_config_uses_default_when_journal_path_empty(monkeypatch, tmp_path): 123 + """Test get_config uses platform default when JOURNAL_PATH is empty.""" 124 + # Set to empty string - should fall back to platform default 125 125 monkeypatch.setenv("JOURNAL_PATH", "") 126 126 127 - with pytest.raises(RuntimeError, match="JOURNAL_PATH not set"): 128 - get_config() 127 + # get_config should work (will use platform default journal path) 128 + config = get_config() 129 + # Returns default structure with empty identity 130 + assert "identity" in config 131 + assert config["identity"]["name"] == "" 129 132 130 133 131 134 def test_get_config_handles_invalid_json(tmp_path, monkeypatch):
+15 -12
tests/test_cortex_client.py
··· 152 152 assert len(set(agent_ids)) == 3 153 153 154 154 155 - def test_cortex_request_no_journal_path(callosum_server): 156 - """Test cortex_request fails without JOURNAL_PATH.""" 155 + def test_cortex_request_uses_default_path_when_journal_path_unset(callosum_server): 156 + """Test cortex_request uses platform default when JOURNAL_PATH unset.""" 157 157 _ = callosum_server # Needed for side effects only 158 158 old_path = os.environ.pop("JOURNAL_PATH", None) 159 159 try: 160 - with pytest.raises( 161 - ValueError, match="JOURNAL_PATH environment variable not set" 162 - ): 163 - cortex_request("test", "default", "openai") 160 + # Should work (uses platform default) but no listener will respond 161 + agent_id = cortex_request("test", "default", "openai") 162 + # Returns an agent_id since the request is queued 163 + assert agent_id is not None 164 + assert len(agent_id) > 0 164 165 finally: 165 166 if old_path: 166 167 os.environ["JOURNAL_PATH"] = old_path ··· 291 292 assert result["pagination"]["has_more"] is True 292 293 293 294 294 - def test_cortex_agents_no_journal_path(): 295 - """Test cortex_agents fails without JOURNAL_PATH.""" 295 + def test_cortex_agents_uses_default_path_when_journal_path_unset(): 296 + """Test cortex_agents uses platform default when JOURNAL_PATH unset.""" 296 297 old_path = os.environ.pop("JOURNAL_PATH", None) 297 298 try: 298 - with pytest.raises( 299 - ValueError, match="JOURNAL_PATH environment variable not set" 300 - ): 301 - cortex_agents() 299 + # Should work (uses platform default) - doesn't raise due to missing path 300 + result = cortex_agents() 301 + # Just verify it returns the expected structure 302 + assert "agents" in result 303 + assert "pagination" in result 304 + assert isinstance(result["agents"], list) 302 305 finally: 303 306 if old_path: 304 307 os.environ["JOURNAL_PATH"] = old_path
+15 -12
tests/test_facets.py
··· 74 74 facet_summary("nonexistent") 75 75 76 76 77 - def test_facet_summary_no_journal_path(monkeypatch): 78 - """Test facet_summary without JOURNAL_PATH set.""" 79 - # Set to empty string to override any .env file 77 + def test_facet_summary_uses_default_path_when_journal_path_empty(monkeypatch): 78 + """Test facet_summary uses platform default when JOURNAL_PATH is empty.""" 79 + # Set to empty string - uses platform default (facet won't exist there) 80 80 monkeypatch.setenv("JOURNAL_PATH", "") 81 81 82 - with pytest.raises(RuntimeError, match="JOURNAL_PATH not set"): 82 + # Should raise FileNotFoundError because facet doesn't exist in default path 83 + with pytest.raises(FileNotFoundError, match="not found"): 83 84 facet_summary("any-facet") 84 85 85 86 ··· 192 193 assert summary == "No facets found." 193 194 194 195 195 - def test_facet_summaries_no_journal_path(monkeypatch): 196 - """Test facet_summaries() without JOURNAL_PATH set.""" 196 + def test_facet_summaries_uses_default_path_when_journal_path_empty(monkeypatch): 197 + """Test facet_summaries() uses platform default when JOURNAL_PATH is empty.""" 197 198 monkeypatch.setenv("JOURNAL_PATH", "") 198 199 199 - with pytest.raises(RuntimeError, match="JOURNAL_PATH not set"): 200 - facet_summaries() 200 + # Should return "No facets found" since default path has no facets 201 + summary = facet_summaries() 202 + assert summary == "No facets found." 201 203 202 204 203 205 def test_facet_summaries_mixed_entities(monkeypatch): ··· 291 293 assert active == set() 292 294 293 295 294 - def test_get_active_facets_no_journal_path(monkeypatch): 295 - """Test get_active_facets() without JOURNAL_PATH set.""" 296 + def test_get_active_facets_uses_default_path_when_journal_path_empty(monkeypatch): 297 + """Test get_active_facets() uses platform default when JOURNAL_PATH is empty.""" 296 298 monkeypatch.setenv("JOURNAL_PATH", "") 297 299 298 - with pytest.raises(RuntimeError, match="JOURNAL_PATH not set"): 299 - get_active_facets("20240115") 300 + # Should return empty set since default path has no facets with events 301 + active = get_active_facets("20240115") 302 + assert active == set() 300 303 301 304 302 305 def test_get_active_facets_default_occurred(monkeypatch, tmp_path):
+7 -4
tests/test_think_utils.py
··· 164 164 assert result == "Test User" 165 165 166 166 167 - def test_load_entity_names_missing_env_var(monkeypatch): 168 - """Test that missing JOURNAL_PATH returns None.""" 169 - # Ensure JOURNAL_PATH is not set, even after load_dotenv 167 + def test_load_entity_names_uses_default_path_when_env_var_unset(monkeypatch): 168 + """Test that missing JOURNAL_PATH falls back to platform default.""" 169 + # Ensure JOURNAL_PATH is not set 170 170 monkeypatch.delenv("JOURNAL_PATH", raising=False) 171 171 # Mock load_dotenv to prevent it from loading a .env file 172 172 monkeypatch.setattr("think.entities.load_dotenv", lambda: None) 173 173 174 + # With get_journal() fallback, this will use the platform default path 175 + # The result depends on whether entities exist there 174 176 result = load_entity_names() 175 - assert result is None 177 + # Result should be either None (no entities) or a string (entities exist) 178 + assert result is None or isinstance(result, str) 176 179 177 180 178 181 def test_load_entity_names_spoken_mode(monkeypatch):
+5 -13
think/callosum.py
··· 17 17 from pathlib import Path 18 18 from typing import Any, Callable, Dict, List, Optional 19 19 20 + from think.utils import get_journal 21 + 20 22 logger = logging.getLogger(__name__) 21 23 22 24 ··· 25 27 26 28 def __init__(self, socket_path: Optional[Path] = None): 27 29 if socket_path is None: 28 - journal = os.getenv("JOURNAL_PATH") 29 - if not journal: 30 - raise ValueError("JOURNAL_PATH not set") 31 - socket_path = Path(journal) / "health" / "callosum.sock" 30 + socket_path = Path(get_journal()) / "health" / "callosum.sock" 32 31 33 32 self.socket_path = Path(socket_path) 34 33 self.clients: List[socket.socket] = [] ··· 170 169 socket_path: Path to Unix socket (defaults to $JOURNAL_PATH/health/callosum.sock) 171 170 """ 172 171 if socket_path is None: 173 - journal = os.getenv("JOURNAL_PATH") 174 - if not journal: 175 - raise ValueError("JOURNAL_PATH not set") 176 - socket_path = Path(journal) / "health" / "callosum.sock" 172 + socket_path = Path(get_journal()) / "health" / "callosum.sock" 177 173 178 174 self.socket_path = Path(socket_path) 179 175 self.send_queue: queue.Queue = queue.Queue(maxsize=1000) ··· 353 349 True if sent successfully, False if connection/send failed 354 350 """ 355 351 if socket_path is None: 356 - journal = os.getenv("JOURNAL_PATH") 357 - if not journal: 358 - logger.warning("JOURNAL_PATH not set, cannot send message") 359 - return False 360 - socket_path = Path(journal) / "health" / "callosum.sock" 352 + socket_path = Path(get_journal()) / "health" / "callosum.sock" 361 353 362 354 try: 363 355 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-3
think/dream.py
··· 116 116 def main() -> None: 117 117 parser = parse_args() 118 118 args = setup_cli(parser) 119 - journal = os.getenv("JOURNAL_PATH") 120 - if not journal: 121 - parser.error("JOURNAL_PATH not set") 122 119 123 120 day = args.day 124 121 if day is None:
+3 -6
think/events.py
··· 18 18 19 19 from dotenv import load_dotenv 20 20 21 + from think.utils import get_journal 22 + 21 23 22 24 def format_events( 23 25 entries: list[dict], ··· 188 190 Dict mapping day (YYYYMMDD) to facet counts dict. 189 191 Example: {"20250115": {"work": 3, "personal": 1}, ...} 190 192 """ 191 - load_dotenv() 192 - journal = os.getenv("JOURNAL_PATH") 193 - if not journal: 194 - return {} 195 - 196 - facets_dir = Path(journal) / "facets" 193 + facets_dir = Path(get_journal()) / "facets" 197 194 if not facets_dir.is_dir(): 198 195 return {} 199 196
+2 -5
think/indexer/cli.py
··· 6 6 import argparse 7 7 from typing import Any 8 8 9 - from think.utils import journal_log, setup_cli 9 + from think.utils import get_journal, journal_log, setup_cli 10 10 11 11 from .journal import ( 12 12 reset_journal_index, ··· 144 144 ) 145 145 146 146 args = setup_cli(parser) 147 - 148 - import os 149 - 150 - journal = os.getenv("JOURNAL_PATH") 147 + journal = get_journal() 151 148 152 149 if ( 153 150 not args.rescan
+3 -8
think/indexer/journal.py
··· 28 28 format_file, 29 29 load_jsonl, 30 30 ) 31 + from think.utils import get_journal 31 32 32 33 logger = logging.getLogger(__name__) 33 34 ··· 69 70 Returns: 70 71 Tuple of (connection, db_path) 71 72 """ 72 - journal = journal or os.getenv("JOURNAL_PATH") 73 - if not journal: 74 - raise RuntimeError("JOURNAL_PATH not set") 73 + journal = journal or get_journal() 75 74 76 75 db_dir = os.path.join(journal, INDEX_DIR) 77 76 os.makedirs(db_dir, exist_ok=True) ··· 448 447 Returns: 449 448 List of event dicts with full structured data 450 449 """ 451 - journal = os.getenv("JOURNAL_PATH") 452 - if not journal: 453 - raise RuntimeError("JOURNAL_PATH not set") 454 - 455 450 events = [] 456 - facets_dir = Path(journal) / "facets" 451 + facets_dir = Path(get_journal()) / "facets" 457 452 458 453 if not facets_dir.is_dir(): 459 454 return events
+2 -2
think/journal_stats.py
··· 13 13 from observe.sense import scan_day as sense_scan_day 14 14 from observe.utils import VIDEO_EXTENSIONS, load_analysis_frames 15 15 from think.insight import scan_day as insight_scan_day 16 - from think.utils import day_dirs, setup_cli 16 + from think.utils import day_dirs, get_journal, setup_cli 17 17 18 18 logger = logging.getLogger(__name__) 19 19 ··· 489 489 help="Disable per-day caching (force re-scan all days)", 490 490 ) 491 491 args = setup_cli(parser) 492 - journal = os.getenv("JOURNAL_PATH") 492 + journal = get_journal() 493 493 494 494 js = JournalStats() 495 495 js.scan(journal, verbose=args.verbose, use_cache=not args.no_cache)
+3 -3
think/models.py
··· 12 12 from google import genai 13 13 from google.genai import types 14 14 15 + from think.utils import get_journal 16 + 15 17 GEMINI_FLASH = "gemini-3-flash-preview" 16 18 GEMINI_PRO = "gemini-3-pro-preview" 17 19 GEMINI_LITE = "gemini-2.5-flash-lite" ··· 175 177 If None, auto-detects from call stack. 176 178 """ 177 179 try: 178 - journal = os.getenv("JOURNAL_PATH") 179 - if not journal: 180 - return 180 + journal = get_journal() 181 181 182 182 # Extract from Gemini response object if needed 183 183 if hasattr(usage, "usage_metadata"):
+2 -4
think/runner.py
··· 28 28 from pathlib import Path 29 29 30 30 from think.callosum import CallosumConnection 31 + from think.utils import get_journal 31 32 32 33 logger = logging.getLogger(__name__) 33 34 34 35 35 36 def _get_journal_path() -> Path: 36 37 """Get JOURNAL_PATH from environment.""" 37 - journal = os.getenv("JOURNAL_PATH") 38 - if not journal: 39 - raise RuntimeError("JOURNAL_PATH not set") 40 - return Path(journal) 38 + return Path(get_journal()) 41 39 42 40 43 41 def _current_day() -> str:
+2 -5
think/supervisor.py
··· 22 22 from think.callosum import CallosumConnection, CallosumServer 23 23 from think.facets import get_active_facets, get_facets 24 24 from think.runner import ManagedProcess as RunnerManagedProcess 25 - from think.utils import day_input_summary, get_agents, setup_cli 25 + from think.utils import day_input_summary, get_agents, get_journal, setup_cli 26 26 27 27 DEFAULT_THRESHOLD = 60 28 28 CHECK_INTERVAL = 30 ··· 124 124 125 125 126 126 def _get_journal_path() -> Path: 127 - journal = os.getenv("JOURNAL_PATH") 128 - if not journal: 129 - raise RuntimeError("JOURNAL_PATH not set") 130 - return Path(journal) 127 + return Path(get_journal()) 131 128 132 129 133 130 class RestartPolicy: