Skip to content

fix(audit): Hermes audit batch 2 — 6 issues fixed - #138

Merged
jaylfc merged 1 commit into
masterfrom
fix/hermes-audit-batch2
Jun 7, 2026
Merged

fix(audit): Hermes audit batch 2 — 6 issues fixed#138
jaylfc merged 1 commit into
masterfrom
fix/hermes-audit-batch2

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses 6 of the 7 remaining open Hermes Agent Audit issues. Issue #102 (transactional consistency) received a design-options analysis comment instead of code changes, as directed.

Test plan

  • python3 -m pytest tests/ -q — 455 passed (434 baseline + 21 new)
  • 21 new tests in tests/test_hermes_audit_batch2.py covering each fixed issue
  • Default retrieve() behavior unchanged (no llm_reranker set by default)
  • Old archives without checksums still load and verify as valid

…ntradiction vocab, opt-in LLM rerank, archive checksums

Closes #94
Closes #93
Closes #103
Closes #105
Closes #108
Closes #111

#94: temporal_rerank now writes the boost to rrf_score (not similarity) when
hybrid fusion results are present, and re-sorts by the same field. Previous
behaviour silently boosted a field the ranker didn't read.

#93: _adapt_kg incoming edges now use object_id as source_id (the queried
anchor), not subject_id (the far node). The incoming branch previously
produced identical output to the outgoing branch — direction information was
lost.

#103: VectorMemory now maintains a per-mode BM25 index cache. The index is
built once per corpus state and reused on subsequent queries; _bm25_dirty
is set on every add() / supersede() call so the next query rebuilds when
the active corpus has changed. Avoids a full re-index on every query.

#105: SINGULAR_PREDICATES moved from a hardcoded set inside
TemporalKnowledgeGraph to predicate_vocab.SINGULAR_PREDICATES, extending
coverage to include works_at, moved_to, and birth_place which were missing
from the old list. TemporalKnowledgeGraph.SINGULAR_PREDICATES is now an
alias for the canonical vocab set.

#108: retrieve() gains an opt-in llm_reranker dict parameter (default None).
When supplied with client/ollama_url/model keys, llm_listwise_rerank() is
called as a second-pass stage after the cross-encoder in thorough and
custom strategies. Default behaviour is completely unchanged. Full-scale
LoCoMo-1540 validation still pending before enabling by default.

#111: ArchiveStore.record() now writes a per-entry sha256 field (SHA-256
over the serialised event line, without the checksum key itself). New
verify_entry() static method and verify_day() async method allow callers
to audit archive integrity. Existing archives without checksums are treated
as valid (backwards-compatible, legacy entries pass through).
@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jaylfc, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 minute and 32 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8cae64b4-366b-4057-abc2-548b68da1821

📥 Commits

Reviewing files that changed from the base of the PR and between 6d5b8ec and 3376fc0.

📒 Files selected for processing (7)
  • taosmd/archive.py
  • taosmd/knowledge_graph.py
  • taosmd/predicate_vocab.py
  • taosmd/retrieval.py
  • taosmd/temporal_boost.py
  • taosmd/vector_memory.py
  • tests/test_hermes_audit_batch2.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hermes-audit-batch2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jaylfc
jaylfc merged commit 7a7ba25 into master Jun 7, 2026
1 of 2 checks passed
jaylfc added a commit that referenced this pull request Aug 13, 2026
Design for the held #138 Phase 2, unblocked by the registry identity layer.
Covers target state (from derived from token sub, never the body), handle
normalisation as the first hazard, fail-closed pubkey rules, and a three-stage
transition where each stage advances on an exit test rather than a date.

Also records measured defects in the authenticated read path we are about to
recommend to every new agent: channel=all returns 200 with zero messages
(identical to an unknown channel), and every cursor param is silently ignored.
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.

1 participant