Skip to content

fix(hermes): stop second Chroma client racing the filing worker - #2215

Merged
igorls merged 1 commit into
developfrom
fix/wave2-ci-hermes-chroma-race
Aug 11, 2026
Merged

fix(hermes): stop second Chroma client racing the filing worker#2215
igorls merged 1 commit into
developfrom
fix/wave2-ci-hermes-chroma-race

Conversation

@igorls

@igorls igorls commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

CI on develop went red after Wave 2 landed #1915. Two failure classes:

  1. Hermes + Chroma raceMemoryStack/Layer1 opened a second PersistentClient on the same palace while the provider already held one for live filing. Concurrent local SQLite access produced disk I/O error / Failed to get segments.
  2. Jargon guardtests/test_backend_conformance.py used §4.4, which the internal-coordination guard forbids outside allowlisted packages.

Fix

  • Build wake-up L1 from the long-lived collection under _collection_lock (no second client)
  • Hold the collection lock across the full _file_turn upsert
  • Signal _wake_up_done so tests can wait for warm-up before reading
  • Rewrite the conformance docstring to "section 4.4"

Test plan

  • uv run pytest tests/test_hermes_integration.py tests/test_corpus_origin_integration.py::test_no_internal_coordination_jargon_in_source_or_tests — 59 passed
  • ruff clean on touched files

MemoryStack/Layer1 opened a second PersistentClient on the same palace
while the Hermes provider already held one for live filing. Concurrent
access corrupted local Chroma SQLite (disk I/O / Failed to get segments)
and failed CI on develop after #1915.

Wake-up L1 now scans the long-lived collection under the collection lock,
and filing holds that lock for the full upsert. Also rewrite the RFC 001
section-4.4 docstring to avoid the internal §N jargon guard.
@igorls
igorls requested a review from milla-jovovich as a code owner August 11, 2026 11:13
Copilot AI lite review requested due to automatic review settings August 11, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@igorls
igorls merged commit eb8090e into develop Aug 11, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants