Skip to content

Commit f7539e7

Browse files
chore: v0.3.5 — benchmarks, pytest 9.0.3, cortex stopword
- Fix benchmark suite: 9 sites passing create_entity tuple as entity_id (b1/b4/b5 had been broken since v0.2.2 when create_entity started returning tuple[str, bool]) - Bump pytest>=9.0.3 (closes GHSA-6w46-j5rx-g56g, dev-time tmpdir) - Add 'cortex' to ENTITY_STOPWORDS so the classifier stops extracting the system's own name as a technology entity in self-referential captures - Hold litellm>=1.60 deliberately (inline comment in pyproject.toml): bumping breaks 24 CLI tests via typer/click downgrades, and the flagged litellm CVEs only affect litellm's proxy endpoints which Cortex never starts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 719307a commit f7539e7

8 files changed

Lines changed: 37 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.5] — 2026-05-03
11+
12+
### Fixed
13+
14+
- **Benchmark suite restored**`b1_hybrid_retrieval`, `b4_graph_intelligence`, `b5_pattern_detection` failed with `ValueError: Invalid IRI code point ' '` because they passed `store.create_entity(...)` (which returns `tuple[str, bool]`) directly as an entity ID. Updated 9 sites in `benchmarks/corpus/generator.py`, `benchmarks/b4_graph_intelligence/test_bench.py`, and `benchmarks/b5_pattern_detection/test_bench.py` to unpack the tuple.
15+
16+
### Changed
17+
18+
- **`pytest>=9.0.3`** (was `>=8.3`) — pytest 9 includes a compat shim for the `config.inicfg` private-attribute change; addresses dependency advisory GHSA-6w46-j5rx-g56g (dev-time tmpdir handling).
19+
- **Entity classifier stopword list** — added `cortex` to `ENTITY_STOPWORDS` so the LLM no longer extracts the system's own name as a `technology` entity when users capture self-referential knowledge.
20+
- **`litellm` constraint deliberately held at `>=1.60`** — see inline comment in `pyproject.toml`. The flagged litellm CVEs are in litellm's proxy server endpoints, which Cortex never starts (Cortex calls `litellm.completion()` as a library only). Bumping forces typer/click downgrades that break ~24 CLI tests, with no security benefit given Cortex's local-only deployment model.
21+
1022
## [0.3.4] — 2026-05-01
1123

1224
### Changed

benchmarks/b4_graph_intelligence/test_bench.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_entity_neighborhood(store: Store) -> None:
147147
gq = GraphQueries(store)
148148

149149
# Create entity
150-
redis_eid = store.create_entity(name="Redis", entity_type="technology")
150+
redis_eid, _ = store.create_entity(name="Redis", entity_type="technology")
151151

152152
# Create 5 fix objects that mention Redis
153153
fix_ids = []
@@ -226,7 +226,7 @@ def test_project_overview(store: Store) -> None:
226226
entity_names = [("Postgres", "technology"), ("Auth", "concept"), ("K8s", "technology")]
227227
entity_ids = []
228228
for name, etype in entity_names:
229-
eid = store.create_entity(name=name, entity_type=etype)
229+
eid, _ = store.create_entity(name=name, entity_type=etype)
230230
entity_ids.append(eid)
231231

232232
# Link entities to objects

benchmarks/b5_pattern_detection/test_bench.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_systemic_issue_detection(store: Store) -> None:
4040
# ── True positives ────────────────────────────────────────
4141

4242
# Flaky-Service: 4 recent fixes mentioning the same entity
43-
flaky_eid = store.create_entity(name="Flaky-Service", entity_type="technology")
43+
flaky_eid, _ = store.create_entity(name="Flaky-Service", entity_type="technology")
4444
for i in range(4):
4545
fix_id = store.create(
4646
obj_type="fix",
@@ -50,7 +50,7 @@ def test_systemic_issue_detection(store: Store) -> None:
5050
store.add_mention(obj_id=fix_id, entity_id=flaky_eid)
5151

5252
# Unstable-DB: 3 recent fixes (exactly at threshold)
53-
unstable_eid = store.create_entity(name="Unstable-DB", entity_type="technology")
53+
unstable_eid, _ = store.create_entity(name="Unstable-DB", entity_type="technology")
5454
for i in range(3):
5555
fix_id = store.create(
5656
obj_type="fix",
@@ -62,7 +62,7 @@ def test_systemic_issue_detection(store: Store) -> None:
6262
# ── True negatives ────────────────────────────────────────
6363

6464
# Stable-API: only 2 fixes (below threshold of 3)
65-
stable_eid = store.create_entity(name="Stable-API", entity_type="technology")
65+
stable_eid, _ = store.create_entity(name="Stable-API", entity_type="technology")
6666
for i in range(2):
6767
fix_id = store.create(
6868
obj_type="fix",
@@ -72,7 +72,7 @@ def test_systemic_issue_detection(store: Store) -> None:
7272
store.add_mention(obj_id=fix_id, entity_id=stable_eid)
7373

7474
# Old-Bug: 3 fixes but all created 30 days ago (outside 14-day window)
75-
old_eid = store.create_entity(name="Old-Bug", entity_type="technology")
75+
old_eid, _ = store.create_entity(name="Old-Bug", entity_type="technology")
7676
old_ts = _old_timestamp(30)
7777
for i in range(3):
7878
fix_id = store.create(
@@ -86,7 +86,7 @@ def test_systemic_issue_detection(store: Store) -> None:
8686
# Scattered-Fix: 3 fixes that each mention a *different* entity
8787
scattered_eids = []
8888
for i in range(3):
89-
eid = store.create_entity(
89+
eid, _ = store.create_entity(
9090
name=f"Scattered-Target-{i + 1}", entity_type="technology"
9191
)
9292
scattered_eids.append(eid)
@@ -160,7 +160,7 @@ def test_gap_analysis(store: Store) -> None:
160160
)
161161

162162
# Entity "Buggy-Lib" has fixes but no lessons
163-
buggy_eid = store.create_entity(name="Buggy-Lib", entity_type="technology")
163+
buggy_eid, _ = store.create_entity(name="Buggy-Lib", entity_type="technology")
164164
for i in range(2):
165165
fix_id = store.create(
166166
obj_type="fix",
@@ -188,7 +188,7 @@ def test_gap_analysis(store: Store) -> None:
188188
)
189189

190190
# Entity "Learned-Lib" has fixes AND a lesson
191-
learned_eid = store.create_entity(name="Learned-Lib", entity_type="technology")
191+
learned_eid, _ = store.create_entity(name="Learned-Lib", entity_type="technology")
192192
for i in range(2):
193193
fix_id = store.create(
194194
obj_type="fix",

benchmarks/corpus/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def generate(self) -> dict[str, str]:
166166
def _create_entities(self) -> None:
167167
"""Create all entity nodes."""
168168
for tmpl in ENTITY_TEMPLATES:
169-
eid = self.store.create_entity(
169+
eid, _ = self.store.create_entity(
170170
name=tmpl["name"], entity_type=tmpl["type"]
171171
)
172172
self.entity_ids[tmpl["name"]] = eid

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "abbacus-cortex"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
description = "Cognitive knowledge system with formal ontology, reasoning, and intelligence serving"
55
readme = "README.md"
66
authors = [
@@ -42,6 +42,12 @@ dependencies = [
4242
# HTTP client
4343
"httpx>=0.28",
4444
# LLM (provider-agnostic: Anthropic, OpenAI, Ollama, etc.)
45+
# Pinned at >=1.60: bumping to >=1.83.7 (the patched version for current
46+
# GHSA alerts) downgrades typer 0.24 -> 0.23 and click 8.3 -> 8.1 via the
47+
# python-dotenv constraint chain, which breaks ~24 CLI tests that rely on
48+
# click 8.3's CliRunner.Result.stderr behavior. The flagged litellm CVEs
49+
# are all in litellm's proxy server endpoints, which Cortex never runs.
50+
# Cortex is local-only and only calls litellm.completion() as a library.
4551
"litellm>=1.60",
4652
]
4753

@@ -60,7 +66,7 @@ cortex = "cortex.cli.main:app"
6066

6167
[dependency-groups]
6268
dev = [
63-
"pytest>=8.3",
69+
"pytest>=9.0.3",
6470
"pytest-asyncio>=0.25",
6571
# Bundle 9 / F.1 + F.2: xdist for parallel runs (the CI workflow uses
6672
# ``pytest -n auto``); forked for the test-isolation suite that needs

src/cortex/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Cortex — Cognitive knowledge system."""
22

3-
__version__ = "0.3.4"
3+
__version__ = "0.3.5"

src/cortex/services/llm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"branch",
7979
"commit",
8080
"merge",
81+
"cortex",
8182
}
8283
)
8384

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)