Commit Graph

1349 Commits

Author SHA1 Message Date
nesquena-hermes 91099051c6 Stage 384: PR #2505
# Conflicts:
#	CHANGELOG.md
2026-05-18 22:44:02 +00:00
nesquena-hermes 2675b6266d Stage 384: PR #2520
# Conflicts:
#	CHANGELOG.md
2026-05-18 22:44:02 +00:00
Ruslan 6d8e5031fc Merge branch 'master' into fix/archive-extract-respects-attachment-dir 2026-05-18 23:01:23 +03:00
r.kulbaev 2fe0ece991 fix(upload): scope archive extraction to per-session attachment dir
handle_upload_extract() used Path(s.workspace) as the extraction root,
bypassing HERMES_WEBUI_ATTACHMENT_DIR entirely. Route through
_session_attachment_dir(session_id) so archives land alongside
single-file uploads and session cleanup covers them.

Add tests and CHANGELOG entry.

Ref #2247
2026-05-18 21:22:02 +03:00
Michael Lam e94827f460 fix: stop replaying reasoning-only history 2026-05-18 10:50:42 -07:00
Hermes Agent 42b97d15f6 fix: clear fallback streaming warnings 2026-05-18 12:21:59 -05:00
nesquena-hermes c28fa63cc9 Stamp removal-required comment on Slice 3c gate test (Opus advisor followup #3) 2026-05-18 16:57:40 +00:00
nesquena-hermes 63d75df818 Stage 383: PR #2530
# Conflicts:
#	CHANGELOG.md
2026-05-18 16:44:36 +00:00
nesquena-hermes d161e9a074 Stage 383: PR #2528
# Conflicts:
#	CHANGELOG.md
2026-05-18 16:44:36 +00:00
nesquena-hermes 69b2289671 Stage 383: PR #2512
# Conflicts:
#	CHANGELOG.md
2026-05-18 16:44:36 +00:00
nesquena-hermes c7badae039 Stage 383: PR #2515
# Conflicts:
#	CHANGELOG.md
2026-05-18 16:44:35 +00:00
nesquena-hermes 75f6d2a03c Stage 383: PR #2522
# Conflicts:
#	CHANGELOG.md
2026-05-18 16:44:35 +00:00
nesquena-hermes 3bf2b10a68 Stage 383: PR #2509
# Conflicts:
#	CHANGELOG.md
2026-05-18 16:44:35 +00:00
nesquena-hermes cd7ee68e02 Stage 383: PR #2511
# Conflicts:
#	CHANGELOG.md
2026-05-18 16:44:35 +00:00
nesquena-hermes c713b80197 Stage 383: PR #2459 2026-05-18 16:44:26 +00:00
nesquena-hermes 8286061fb0 Stage 383: PR #2294
# Conflicts:
#	tests/test_gateway_sync.py
2026-05-18 16:44:26 +00:00
Frank Song 0cd62ab474 fix: keep kanban drag drop from opening detail 2026-05-18 22:13:04 +08:00
Michael Lam b76d698a79 fix: guard new conversation cold-start clicks 2026-05-18 06:48:05 -07:00
Michael Lam f3f9f3ed40 fix: allow keyless named custom endpoints 2026-05-18 04:27:31 -07:00
Michael Lam 037652308d fix: load remote models for named custom providers 2026-05-18 01:08:09 -07:00
Frank Song 9d6eb5f0df Fix board selector label overlap 2026-05-18 16:02:56 +08:00
Dennis Soong d72b3382fd fix: clarify compression elapsed cap 2026-05-18 14:22:29 +08:00
Michael Lam 9f1ff51950 docs(runtime): tighten queue goal gate 2026-05-17 23:17:46 -07:00
Dennis Soong 516d2a588c fix: show auto-compression elapsed time 2026-05-18 13:08:38 +08:00
Frank Song 46029e0b1c docs: align uiux demo theme controls 2026-05-18 12:50:25 +08:00
Nathan Esquenazi e8dbf94a6f fix(i18n+tests): complete locale parity + bump test windows for new menu action
PR #2294 added the show_previous_messaging_sessions setting and a "Hide
from list" menu action for external sessions, but tripped 8 tests:

  - 4 locale-parity tests (tests/test_{japanese,russian,spanish,chinese}_locale.py)
    demand every en key be defined in ja/ru/es/zh blocks. The contributor
    only added the 5 new keys to en + ko, leaving ja/ru/es/zh/it/de/zh-TW/pt/fr
    missing them. tests/test_provider_quota_status.py also requires the two
    settings_{label,desc}_previous_messaging_sessions keys in ALL 11 locales.

  - tests/test_1466_sidebar_cancel_clarify.py read the first 5200 chars of
    _openSessionActionMenu to find cancelSessionStream/delete actions; the
    new "Hide from list" branch (17 lines for external sessions) pushed
    those past the read window.

  - tests/test_issue1611_session_profile_filtering.py grep'd for the
    literal string `_keep_latest_messaging_session_per_source(scoped)`,
    which no longer exists after the call was rewritten as a multi-line
    keyword-arg form.

Fixes:

1. Translations for the 5 new i18n keys added to all 9 missing locales
   (it, ja, ru, es, de, zh-CN, zh-TW, pt, fr):
   - session_hide_external
   - session_hide_external_desc
   - session_hidden
   - settings_label_previous_messaging_sessions
   - settings_desc_previous_messaging_sessions

   Where the locale already used the English fallback for related keys
   (ru/es/de session_archive), I provided localized translations for the
   new keys to match the project's general direction. Native-script
   quality, not machine-translation.

2. test_1466 window bumped 5200 → 6400 with a comment explaining the
   bump (mirrors the existing 3200→4400→5200 history annotations).

3. test_1611 dedupe-position check loosened to match the function name
   without the `(scoped)` suffix so it tolerates both single-line and
   keyword-arg call shapes.

Tests: full suite 5828 passed / 63 skipped / 0 failed (was 8 failed).
Behavioral harness verifies the toggle's claimed behavior — off (default)
hides reset/compression segments, on shows all rows in timestamp order.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 21:38:06 -07:00
junjunjunbong 3a53592107 Add previous messaging session controls 2026-05-17 21:27:32 -07:00
junjunjunbong 98f2814ecd Fix empty gateway session hiding messaging history 2026-05-17 21:13:24 -07:00
nesquena-hermes cec1e87d04 Stage 382: PR #2500 (with whitespace polish on panels.js + ARCHITECTURE.md) 2026-05-18 03:45:02 +00:00
nesquena-hermes 42c677b223 Stage 382: PR #2496 2026-05-18 03:43:59 +00:00
nesquena-hermes ea1261d03b Stage 382: PR #2501 2026-05-18 03:43:26 +00:00
nesquena-hermes f731f1fa43 Stage 382: PR #2499 2026-05-18 03:43:01 +00:00
nesquena-hermes 00fc4ccc02 Stage 381: PR #2493 2026-05-18 01:44:05 +00:00
nesquena-hermes db048fade5 Stage 381: PR #2485 2026-05-18 01:32:24 +00:00
nesquena-hermes eef47ea27b Stage 381: PR #2484 2026-05-18 01:32:21 +00:00
nesquena-hermes 669e815a73 Stage 380: PR #2482
# Conflicts:
#	CHANGELOG.md
#	docker_init.bash
2026-05-18 01:16:19 +00:00
Dennis Soong 9b65e2440b fix: collapse WebUI compression continuations in sidebar 2026-05-18 08:35:38 +08:00
Nathan Esquenazi 64590cb6b9 harden(docker-smoke): catch !!ERROR/!!Exiting + tighten egg_info test
Two non-blocking observations from the review, both addressed:

1. The bad-pattern grep listed `error_exit` as a literal token, but the
   `error_exit()` function at docker_init.bash:5-10 only echoes the
   strings `"!! ERROR: "` and `"!! Exiting script (ID: $$)"` — the
   function name itself never appears in container logs. So
   `grep -E -i "error_exit"` would only fire on stray debug prints of
   the name, not on actual failures. The other patterns
   (`Failed to set (UID|GID|...)`, `groupmod: cannot`, etc.) DO catch
   real error_exit output, so this wasn't a coverage gap — just a dead
   token.

   Add `!! ERROR` and `!! Exiting script` to the bad-pattern set so the
   grep actually matches the function's output. Keep the literal
   `error_exit` token as belt-and-suspenders for any debug/echo of the
   name.

2. `test_docker_init_excludes_egg_info_during_staging` was a single
   `assert "egg-info" in src` check. That passes if any occurrence
   appears — including the explanatory comment block above the staging
   logic. A maintainer removing the `--exclude='*.egg-info'` from
   rsync but keeping the comment would slip past the test.

   Tighten to:
   - scope to the staging block (between `_stage_src=` and the
     `uv pip install` line) so comments outside that window can't
     satisfy the assertion;
   - require the literal `--exclude='*.egg-info'` rsync flag;
   - require `*.egg-info` in the block so the cp-fallback cleanup is
     also pinned;
   - additionally require `--exclude='build'`, `--exclude='dist'`,
     `--exclude='__pycache__'` so all four setuptools-touchable
     artifact dirs stay excluded.

Verified:
- tests/test_docker_docs_and_readonly.py — 11/11 pass.
- YAML parses cleanly via `yaml.safe_load`.
- Full suite: 5770 passed, 0 failed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 17:34:46 -07:00
nesquena-hermes 70f371c8b9 fix(docker): stage agent source to writable build dir before pip install
The Docker smoke gate added in this same PR caught a real production
regression on its very first CI run. v0.51.84 (PR #2470) mounted
hermes-agent-src read-only on the WebUI side and widened the chown
prune to keep the read-only walk happy, but missed that the WebUI's
startup also runs:

    uv pip install "$_agent_src[all]"

against the same now-read-only mount. setuptools' egg_info step writes
hermes_agent.egg-info/ inside the source tree even under PEP 517 build
isolation (this is by design -- PEP 517 isolates the BUILD environment,
not the source tree's metadata directory). On a :ro mount this returns
EROFS, the install fails, error_exit fires, and every multi-container
deploy dies at startup. The smoke gate flagged it on both the
two-container and three-container variants.

The fix
-------
Stage the agent source into a writable build dir under /tmp BEFORE
invoking pip install, then point pip at the staged copy.

  _stage_src="/tmp/hermes-agent-build"
  rm -rf "$_stage_src" && mkdir -p "$_stage_src"
  rsync -a --exclude='*.egg-info' --exclude='build' --exclude='dist' \
        --exclude='__pycache__' --exclude='.git' \
        "$_agent_src"/ "$_stage_src"/
  uv pip install "$_stage_src[all]" ...
  rm -rf "$_stage_src"

The exclusion list matters: when setuptools sees a pre-baked *.egg-info,
build, or dist directory, it takes a timestamp-update code path that
also reads/writes inside that directory -- which itself fails on a :ro
source. Excluding them keeps the build on the fresh-build path
unconditionally.

rsync is in the production image (Dockerfile line 41-44). For users
running custom WebUI images without rsync, the script falls back to
cp -a + post-copy rm -rf of the same artifacts.

Tests
-----
Two new source-level invariants in tests/test_docker_docs_and_readonly.py:

  test_docker_init_stages_agent_source_for_writable_install
    -- asserts _stage_src=... is declared
    -- asserts every `uv pip install ...[all]` line uses _stage_src,
       NOT raw $_agent_src

  test_docker_init_excludes_egg_info_during_staging
    -- asserts the staging path excludes *.egg-info (rsync exclude
       form or cp-fallback's explicit rm -rf both pass)

These would have caught the v0.51.84 regression at the source level
(once written; they're new). The Docker runtime smoke gate is the
durable defence for the broader class of :ro x init-script
interactions, since source-level invariants only catch what they're
written to catch.

Verification
------------
- pytest tests/test_docker_docs_and_readonly.py: 11 passed (9 existing
  + 2 new)
- pytest tests/ -q --timeout=60: 5891 passed, 6 skipped (was 5889;
  delta is exactly the 2 new tests)
- bash -n docker_init.bash: clean

Once this lands, the Docker smoke gate's two/three-container variants
should go green, completing the self-validating loop.
2026-05-18 00:21:31 +00:00
nesquena-hermes 50d4f4cfb9 Stage 379: PR #2480
# Conflicts:
#	CHANGELOG.md
2026-05-17 23:35:19 +00:00
nesquena-hermes 6f9cead15e Stage 379: PR #2479 2026-05-17 23:35:18 +00:00
nesquena-hermes 935d9e6402 Stage 379: PR #2461
# Conflicts:
#	CHANGELOG.md
2026-05-17 23:35:18 +00:00
Frank Song 496b34fe4d Fix CSRF test isolation 2026-05-18 07:27:31 +08:00
Frank Song 8daf716307 Repair selected text reply review blockers 2026-05-18 07:26:19 +08:00
Frank Song 996942429c Add session-bound CSRF token checks 2026-05-18 07:14:26 +08:00
Frank Song 9646773487 Add selected text reply composer append 2026-05-18 07:13:14 +08:00
Michael Lam 310d69bed8 docs: inventory agent source boundary 2026-05-17 16:11:29 -07:00
Michael Lam f986507809 fix: align fork-from-here with merged messaging history 2026-05-17 15:01:57 -07:00
Michael Lam a5385e5859 feat(runtime): route cancel through RuntimeAdapter seam 2026-05-17 13:23:22 -07:00
nesquena-hermes fa6e939c69 Stage 378: PR #2146 2026-05-17 19:55:09 +00:00