test: add unit tests for 8 untested core modules#60
Merged
Conversation
Add comprehensive test coverage for: - cron/jobs.py: schedule parsing, job CRUD, due-job detection (34 tests) - tools/memory_tool.py: security scanning, MemoryStore ops, dispatcher (32 tests) - toolsets.py: resolution, validation, composition, cycle detection (19 tests) - tools/file_operations.py: write deny list, result dataclasses, helpers (37 tests) - agent/prompt_builder.py: context scanning, truncation, skills index (24 tests) - agent/model_metadata.py: token estimation, context lengths (16 tests) - hermes_state.py: SessionDB SQLite CRUD, FTS5 search, export, prune (28 tests) Total: 210 new tests, all passing (380 total suite).
These tests documented the macOS symlink bypass bug with platform-conditional assertions. The fix and proper regression tests are in PR NousResearch#61 (tests/tools/test_write_deny.py), so remove them here to avoid ordering conflicts between the two PRs.
sudo-yf
pushed a commit
to sudo-yf/hermes-agent
that referenced
this pull request
Apr 5, 2026
…ults (NousResearch#60) The sessions table in the CLI state.db does not have a 'profile' column -- selecting s.profile caused an OperationalError which was silently caught by 'except Exception: return []', making get_cli_sessions() always return empty. Fix: remove s.profile from the SELECT (it doesn't exist in the CLI schema) and derive the profile from get_active_profile_name() instead, which is the right value anyway since the CLI DB has no profile concept. Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
linxule
added a commit
to linxule/hermes-agent
that referenced
this pull request
Apr 27, 2026
…k variant Parity port from linxule/hermes-kimi-plugin@93476f5 — same four fixes plus the NousResearch#60 fold-in: 1. connect# off-by-one: counter + ts now bumped pre-dispatch in _group_subscribe_once so the gap log inside _on_group_event reads the correct connect# (matches the subscribe-stream-live log emitted moments later). Subscribe-live log + backoff clamp stay post-dispatch as the operator-visible recovery announcement. 2. Monotonic clock: arrival-time tracking + since-reconnect correlation now use time.monotonic() (immune to NTP/leap-second/VM-suspend). 3. _BoundedLRU shared cap: _last_arrival_time_per_room gets its own _ARRIVAL_TIME_CACHE_DEFAULT_MAX (10000), so eviction can't blind Phase 0 gap detection under cardinality pressure. 4. Anchor-only-on-first-page in list_group_messages: pageToken and start_message_id/end_message_id are now mutually-exclusive cursoring modes. Fold-in (NousResearch#60): _fetch_group_message uses max_pages=2 for tight-range pagination resilience. Tests: 200 passing on fork (194 unit + 6 plugin-integration). Same +10/-1 delta as standalone. Existing handler-exception test updated to reflect new pre-dispatch state semantic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
test: add unit tests for 8 untested core modules
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
test: add unit tests for 8 untested core modules
MickaelV0
added a commit
to Roxabi/hermes-agent
that referenced
this pull request
May 24, 2026
The upstream image entrypoint runs as root and tries to `su hermes`,
which fails under our DropCapability=all (no CAP_SETUID). Force the
container to start as uid 10000 directly via User= alongside UserNS=.
The earlier comment ("starts directly as hermes") was inaccurate —
verified 2026-05-22 on digest 9d0a12c0… that removing User= produces
"error: failed switching to 'hermes': operation not permitted" and a
crashloop.
Also update CLAUDE.md provider wiring: llmcli now joins roxabi.network
(llmCLI NousResearch#60 resolved), so the canonical path is `llmcli:18091` via
container-name DNS — not `host.containers.internal:18091`, which is no
longer reachable from bridge containers (curl returns 000).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Implemented in commit d997e70 ( What changed:
Verification:
Remaining gates: no live Telegram canary or prod MCP packet replay was run. Renderer aliases may need a small follow-up if kb-engine emits a packet type spelling outside the tested set. |
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
test: add unit tests for 8 untested core modules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modules Tested
cron/jobs.pytools/memory_tool.pytoolsets.pytools/file_operations.pyagent/prompt_builder.pyagent/model_metadata.pyhermes_state.pyTest plan
uv run pytest tests/ -v— 380 passed, 3 skipped (croniter optional), 0 failed