Skip to content

Commit dfca6a3

Browse files
committed
fix: log dir creation creates missing parents
1 parent 249797c commit dfca6a3

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 1.31.1
4+
- Fix `pearscarf/log.py:_ensure_dir` to create parent directories. The mkdir call lacked `parents=True`, so on a fresh checkout (or any environment where `data/` didn't already exist) the first log write raised `FileNotFoundError`. Surfaced as 7 test failures in CI on the 1.31.0 commit; passes locally because dev environments always had `data/` pre-existing. Coverage stays at 45% (43% in CI's stricter run).
5+
36
## 1.31.0
47
- Unit-test buildout — coverage 7% → 45%, with a CI-enforced floor of 40% (`--cov-fail-under=40`). 237 new tests across data-transformation layers (storage/store, storage/graph, storage/db, storage/vectorstore, storage/neo4j_client), graph access/query tools, consumer code paths (extraction, triage, session_consumer), LLM client invoke methods, MCP server handlers, CLI commands (`mcp`, `triage`, `extraction`, `assistant`, `erase-all`, `memory`), eval scoring helpers, and small utilities (log, status, tracing, tracked_call, query/context_query, expert_context, experts/ingest, expert_bot). Tests mirror source layout under `tests/unit/` and share boundary mocks (`mock_postgres_cursor`, `mock_neo4j_session`, `mock_qdrant_client`, `mock_anthropic_client`, `mock_openai_client`) from `tests/unit/conftest.py`. Existing tests (records, knowledge, llm_client) reorganized into the new layout.
58

pearscarf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.31.0"
1+
__version__ = "1.31.1"
22

33
# Make installed expert packages importable from the experts/ folder.
44
# Temporary — replaced by the registry-driven discovery in a follow-up.

pearscarf/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def _ensure_dir() -> None:
1414
global _initialized
1515
if not _initialized:
16-
_LOGS_DIR.mkdir(exist_ok=True)
16+
_LOGS_DIR.mkdir(parents=True, exist_ok=True)
1717
_initialized = True
1818

1919

0 commit comments

Comments
 (0)