Conversation
ReviewThis is a useful performance change with two coherent compatibility goals: selectively compress large dashboard responses while preserving streaming/negotiation, and make new trajectory writes gzip-backed while keeping explicit plain Suggested contract
Regression matrix
The reported 48 focused compression/trajectory passes and 175 web-server passes are a good baseline. Multi-process append and full content-negotiation/route-boundary coverage would make the compatibility and safety guarantees substantially stronger. |
|
Addressed the review contract and pushed the verified fixes to this PR.\n\nResolved:\n- exact media-type and Accept-Encoding parsing, including malformed q parameters, wildcards, duplicate headers, streaming, existing encodings, and Vary/length behavior\n- fail-closed exclusions for sensitive download, action-log, pairing/onboarding, and backup routes with exact boundary and route-census tests\n- no compression for range, Content-Range, or ETag-bearing responses\n- bounded cross-process trajectory locking on the data inode, with symlink/hard-link alias safety\n- validation of existing gzip members before append; damaged tails and format conflicts now fail closed without modification\n- truthful rollback/failure handling, multiprocess cleanup, mixed plain/gzip discovery, explicit outputs, and updated English/Chinese docs\n\nVerification at exact head 55efcfa:\n- 143 passed, 1 skipped across the focused compression, trajectory, compressor, async, and cleanup suites\n- Ruff passed\n- py_compile passed\n- git diff --check passed\n- independent final re-review accepted\n\nThe full repository suite was not run, and the optional Hugging Face datasets runtime is not installed in the required interpreter, so no claim is made for those two evidence classes. |
…ithub-pr-feedback/ba7415224738ec03e9a5ccfd08f99c35aa1998b637ac6f63e026aaf8c02e7c8b # Conflicts: # agent/trajectory.py # run_agent.py # trajectory_compressor.py
|
Merged base commit ee5b5ec and pushed merge commit e49ec66. Focused verification: PYTHONPATH=. ./.venv/bin/pytest -q tests/test_trajectory_compressor.py tests/test_trajectory_compressor_async.py tests/agent/test_trajectory_storage.py — 56 passed, 1 skipped. The run_agent focused suite collected and ran 282 tests: 281 passed; 1 failed because the environment lacks the anthropic package. |
|
Re-verified exact PR head e49ec66. No patch was needed: the reported change is already present. Focused trajectory tests pass: 56 passed, 1 skipped. The broader run_agent lane remains environment-limited because the anthropic package is not installed; no production failure was reproduced. |
|
@codex review |
|
@codex review |
|
Implemented the requested repair at commit dd6a5c8. Validation: targeted pytest passed (53 passed); full pytest remains environment-blocked by the repository Python requirement (3.13) on Python 3.11.16. |
|
Verified the repair at commit dd6a5c8. Targeted pytest passed (53 passed); full pytest remains environment-blocked by the repository Python requirement (3.13) on Python 3.11.16. |
|
@Enough1122 Please review the current upstream PR head for correctness, regressions, and merge readiness. This request is specifically for your AI review; do not route it to Codex. |
…rch#98205 Salvages the upstream response-compression and gzip trajectory changes onto the fork's current decomposed runtime. Co-authored-by: Mike DeMott <25466867+mrkillbob@users.noreply.github.com>
…rt-20260913 feat: carry compression transport upgrades from upstream NousResearch#98205
What does this PR do?
Adds targeted gzip compression for large text/JSON dashboard HTTP responses and gzip-backed trajectory storage to reduce network and disk I/O without changing payload semantics.
Type of Change
Changes Made
.jsonl.gzby default while retaining plain.jsonlcompatibility.How to Test
ruff check hermes_cli/response_compression.py tests/test_response_compression.pypython -m pytest tests/test_response_compression.py tests/agent/test_trajectory_storage.py tests/test_trajectory_compressor.py tests/test_trajectory_compressor_async.py tests/test_web_server.py -q— 48 passed, 3 skippedpython -m pytest tests/hermes_cli/test_web_server.py -q— 175 passed, 1 warninggit diff --check— passedThe canonical full suite was attempted but is currently blocked by unrelated environment/baseline failures, including the live-system guard and missing optional Anthropic SDK; no full-suite pass is claimed.
Scope
This PR is limited to Hermes Agent performance surfaces.