fix(ci): resolve 4 pre-existing main failures (docs lint + 3 stale tests)#11373
Merged
Conversation
Three docs pages had ASCII diagram boxes with off-by-one column alignment issues that failed docs-site-checks CI: - architecture.md: outer box is 71 cols but inner-box content lines and border corners were offset by 1 col, making content-line right border at col 70/72 while top/bottom border was at col 71. Inner boxes also had border corners at cols 19/36/53 but content pipes at cols 20/37/54. Rewrote the diagram with consistent 71-col width throughout, aligned inner boxes at cols 4-19, 22-37, 40-55 with 2-space gaps and 15-space trailing padding. - gateway-internals.md: same class of issue — outer box at 51 cols, inner content lines varied 52-54 cols. Rewrote with consistent 51-col width, inner boxes at cols 4-15, 18-29, 32-43. Also restructured the bottom-half message flow so it's bare text (not half-open box cells) matching the intent of the original. - agent-loop.md line 112-114: box 2 (API thread) content lines had one extra space pushing the right border to col 46 while the top and bottom borders of that box sat at col 45. Trimmed one trailing space from each of the three content lines. All 123 docs files now pass `npm run lint:diagrams`: ✓ Errors: 0 (warnings: 6, non-fatal) Pre-existing failures on main — unrelated to any open PR.
setup.py's `_curses_prompt_choice` gained an optional `description` parameter (used for rendering context hints alongside the prompt). `prompt_choice` forwards it via keyword arg. The two existing tests mocked `_curses_prompt_choice` with lambdas that didn't accept the new kwarg, so the forwarded call raised TypeError. Fix: add `description=None` to both mock lambda signatures so they absorb the new kwarg without changing behavior.
test_regular_audio_has_http_url asserted that non-voice audio messages keep their HTTP URL and are NOT downloaded/cached. That was true when the caching code only triggered on `is_voice_message`. Since bec02f3 (encrypted-media caching refactor), matrix.py caches all media locally — photos, audio, video, documents — so downstream tools can read them as real files via media_urls. This applies to regular audio too. Renamed the test to `test_regular_audio_is_cached_locally`, flipped the assertions accordingly, and documented the intentional behavior change in the docstring. Other tests in the file (voice-specific caching, message-type detection, reply-to threading) continue to pass.
run_agent.py's preflight compression runs up to 3 passes in a loop for very large sessions (each pass summarizes the middle N turns, then re-checks tokens). The loop breaks when a pass returns a message list no shorter than its input (can't compress further). test_preflight_compresses_oversized_history used a static mock return value that returned the same 2 messages regardless of input, so the loop ran pass 1 (41 -> 2) and pass 2 (2 -> 2 -> break), making call_count == 2. The assert_called_once() assertion was strictly wrong under the multi-pass design. The invariant the test actually cares about is: preflight ran, and its first invocation received the full oversized history. Replaced the count assertion with those two invariants.
ascii-guard 2.3.0 flagged two remaining issues after the initial fix pass: 1. gateway-internals.md L33: the '...' suffix after inner box 3's right border got parsed as 'extra characters after inner-box right border'. Dropped the '...' — the surrounding prose already conveys 'and more platforms' without needing the visual hint. 2. agent-loop.md: ascii-guard can't cleanly parse two side-by-side boxes of different heights (main thread 7 rows, API thread 5 rows). Even equalizing heights didn't help — the linter treats the left box's right border as the end of the diagram. Merged into a single 54-char-wide outer box with both threads labeled as regions inside, keeping the ▶ arrow to preserve the main→API flow direction.
This was referenced Apr 24, 2026
2 tasks
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…sts) (NousResearch#11373) * docs: fix ascii-guard border alignment errors Three docs pages had ASCII diagram boxes with off-by-one column alignment issues that failed docs-site-checks CI: - architecture.md: outer box is 71 cols but inner-box content lines and border corners were offset by 1 col, making content-line right border at col 70/72 while top/bottom border was at col 71. Inner boxes also had border corners at cols 19/36/53 but content pipes at cols 20/37/54. Rewrote the diagram with consistent 71-col width throughout, aligned inner boxes at cols 4-19, 22-37, 40-55 with 2-space gaps and 15-space trailing padding. - gateway-internals.md: same class of issue — outer box at 51 cols, inner content lines varied 52-54 cols. Rewrote with consistent 51-col width, inner boxes at cols 4-15, 18-29, 32-43. Also restructured the bottom-half message flow so it's bare text (not half-open box cells) matching the intent of the original. - agent-loop.md line 112-114: box 2 (API thread) content lines had one extra space pushing the right border to col 46 while the top and bottom borders of that box sat at col 45. Trimmed one trailing space from each of the three content lines. All 123 docs files now pass `npm run lint:diagrams`: ✓ Errors: 0 (warnings: 6, non-fatal) Pre-existing failures on main — unrelated to any open PR. * test(setup): accept description kwarg in prompt_choice mock lambdas setup.py's `_curses_prompt_choice` gained an optional `description` parameter (used for rendering context hints alongside the prompt). `prompt_choice` forwards it via keyword arg. The two existing tests mocked `_curses_prompt_choice` with lambdas that didn't accept the new kwarg, so the forwarded call raised TypeError. Fix: add `description=None` to both mock lambda signatures so they absorb the new kwarg without changing behavior. * test(matrix): update stale audio-caching assertion test_regular_audio_has_http_url asserted that non-voice audio messages keep their HTTP URL and are NOT downloaded/cached. That was true when the caching code only triggered on `is_voice_message`. Since 47d50ef (encrypted-media caching refactor), matrix.py caches all media locally — photos, audio, video, documents — so downstream tools can read them as real files via media_urls. This applies to regular audio too. Renamed the test to `test_regular_audio_is_cached_locally`, flipped the assertions accordingly, and documented the intentional behavior change in the docstring. Other tests in the file (voice-specific caching, message-type detection, reply-to threading) continue to pass. * test(413): allow multi-pass preflight compression run_agent.py's preflight compression runs up to 3 passes in a loop for very large sessions (each pass summarizes the middle N turns, then re-checks tokens). The loop breaks when a pass returns a message list no shorter than its input (can't compress further). test_preflight_compresses_oversized_history used a static mock return value that returned the same 2 messages regardless of input, so the loop ran pass 1 (41 -> 2) and pass 2 (2 -> 2 -> break), making call_count == 2. The assert_called_once() assertion was strictly wrong under the multi-pass design. The invariant the test actually cares about is: preflight ran, and its first invocation received the full oversized history. Replaced the count assertion with those two invariants. * docs: drop '...' from gateway diagram, merge side-by-side boxes ascii-guard 2.3.0 flagged two remaining issues after the initial fix pass: 1. gateway-internals.md L33: the '...' suffix after inner box 3's right border got parsed as 'extra characters after inner-box right border'. Dropped the '...' — the surrounding prose already conveys 'and more platforms' without needing the visual hint. 2. agent-loop.md: ascii-guard can't cleanly parse two side-by-side boxes of different heights (main thread 7 rows, API thread 5 rows). Even equalizing heights didn't help — the linter treats the left box's right border as the end of the diagram. Merged into a single 54-char-wide outer box with both threads labeled as regions inside, keeping the ▶ arrow to preserve the main→API flow direction.
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
…sts) (NousResearch#11373) * docs: fix ascii-guard border alignment errors Three docs pages had ASCII diagram boxes with off-by-one column alignment issues that failed docs-site-checks CI: - architecture.md: outer box is 71 cols but inner-box content lines and border corners were offset by 1 col, making content-line right border at col 70/72 while top/bottom border was at col 71. Inner boxes also had border corners at cols 19/36/53 but content pipes at cols 20/37/54. Rewrote the diagram with consistent 71-col width throughout, aligned inner boxes at cols 4-19, 22-37, 40-55 with 2-space gaps and 15-space trailing padding. - gateway-internals.md: same class of issue — outer box at 51 cols, inner content lines varied 52-54 cols. Rewrote with consistent 51-col width, inner boxes at cols 4-15, 18-29, 32-43. Also restructured the bottom-half message flow so it's bare text (not half-open box cells) matching the intent of the original. - agent-loop.md line 112-114: box 2 (API thread) content lines had one extra space pushing the right border to col 46 while the top and bottom borders of that box sat at col 45. Trimmed one trailing space from each of the three content lines. All 123 docs files now pass `npm run lint:diagrams`: ✓ Errors: 0 (warnings: 6, non-fatal) Pre-existing failures on main — unrelated to any open PR. * test(setup): accept description kwarg in prompt_choice mock lambdas setup.py's `_curses_prompt_choice` gained an optional `description` parameter (used for rendering context hints alongside the prompt). `prompt_choice` forwards it via keyword arg. The two existing tests mocked `_curses_prompt_choice` with lambdas that didn't accept the new kwarg, so the forwarded call raised TypeError. Fix: add `description=None` to both mock lambda signatures so they absorb the new kwarg without changing behavior. * test(matrix): update stale audio-caching assertion test_regular_audio_has_http_url asserted that non-voice audio messages keep their HTTP URL and are NOT downloaded/cached. That was true when the caching code only triggered on `is_voice_message`. Since 47d50ef (encrypted-media caching refactor), matrix.py caches all media locally — photos, audio, video, documents — so downstream tools can read them as real files via media_urls. This applies to regular audio too. Renamed the test to `test_regular_audio_is_cached_locally`, flipped the assertions accordingly, and documented the intentional behavior change in the docstring. Other tests in the file (voice-specific caching, message-type detection, reply-to threading) continue to pass. * test(413): allow multi-pass preflight compression run_agent.py's preflight compression runs up to 3 passes in a loop for very large sessions (each pass summarizes the middle N turns, then re-checks tokens). The loop breaks when a pass returns a message list no shorter than its input (can't compress further). test_preflight_compresses_oversized_history used a static mock return value that returned the same 2 messages regardless of input, so the loop ran pass 1 (41 -> 2) and pass 2 (2 -> 2 -> break), making call_count == 2. The assert_called_once() assertion was strictly wrong under the multi-pass design. The invariant the test actually cares about is: preflight ran, and its first invocation received the full oversized history. Replaced the count assertion with those two invariants. * docs: drop '...' from gateway diagram, merge side-by-side boxes ascii-guard 2.3.0 flagged two remaining issues after the initial fix pass: 1. gateway-internals.md L33: the '...' suffix after inner box 3's right border got parsed as 'extra characters after inner-box right border'. Dropped the '...' — the surrounding prose already conveys 'and more platforms' without needing the visual hint. 2. agent-loop.md: ascii-guard can't cleanly parse two side-by-side boxes of different heights (main thread 7 rows, API thread 5 rows). Even equalizing heights didn't help — the linter treats the left box's right border as the end of the diagram. Merged into a single 54-char-wide outer box with both threads labeled as regions inside, keeping the ▶ arrow to preserve the main→API flow direction.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…sts) (NousResearch#11373) * docs: fix ascii-guard border alignment errors Three docs pages had ASCII diagram boxes with off-by-one column alignment issues that failed docs-site-checks CI: - architecture.md: outer box is 71 cols but inner-box content lines and border corners were offset by 1 col, making content-line right border at col 70/72 while top/bottom border was at col 71. Inner boxes also had border corners at cols 19/36/53 but content pipes at cols 20/37/54. Rewrote the diagram with consistent 71-col width throughout, aligned inner boxes at cols 4-19, 22-37, 40-55 with 2-space gaps and 15-space trailing padding. - gateway-internals.md: same class of issue — outer box at 51 cols, inner content lines varied 52-54 cols. Rewrote with consistent 51-col width, inner boxes at cols 4-15, 18-29, 32-43. Also restructured the bottom-half message flow so it's bare text (not half-open box cells) matching the intent of the original. - agent-loop.md line 112-114: box 2 (API thread) content lines had one extra space pushing the right border to col 46 while the top and bottom borders of that box sat at col 45. Trimmed one trailing space from each of the three content lines. All 123 docs files now pass `npm run lint:diagrams`: ✓ Errors: 0 (warnings: 6, non-fatal) Pre-existing failures on main — unrelated to any open PR. * test(setup): accept description kwarg in prompt_choice mock lambdas setup.py's `_curses_prompt_choice` gained an optional `description` parameter (used for rendering context hints alongside the prompt). `prompt_choice` forwards it via keyword arg. The two existing tests mocked `_curses_prompt_choice` with lambdas that didn't accept the new kwarg, so the forwarded call raised TypeError. Fix: add `description=None` to both mock lambda signatures so they absorb the new kwarg without changing behavior. * test(matrix): update stale audio-caching assertion test_regular_audio_has_http_url asserted that non-voice audio messages keep their HTTP URL and are NOT downloaded/cached. That was true when the caching code only triggered on `is_voice_message`. Since bec02f3 (encrypted-media caching refactor), matrix.py caches all media locally — photos, audio, video, documents — so downstream tools can read them as real files via media_urls. This applies to regular audio too. Renamed the test to `test_regular_audio_is_cached_locally`, flipped the assertions accordingly, and documented the intentional behavior change in the docstring. Other tests in the file (voice-specific caching, message-type detection, reply-to threading) continue to pass. * test(413): allow multi-pass preflight compression run_agent.py's preflight compression runs up to 3 passes in a loop for very large sessions (each pass summarizes the middle N turns, then re-checks tokens). The loop breaks when a pass returns a message list no shorter than its input (can't compress further). test_preflight_compresses_oversized_history used a static mock return value that returned the same 2 messages regardless of input, so the loop ran pass 1 (41 -> 2) and pass 2 (2 -> 2 -> break), making call_count == 2. The assert_called_once() assertion was strictly wrong under the multi-pass design. The invariant the test actually cares about is: preflight ran, and its first invocation received the full oversized history. Replaced the count assertion with those two invariants. * docs: drop '...' from gateway diagram, merge side-by-side boxes ascii-guard 2.3.0 flagged two remaining issues after the initial fix pass: 1. gateway-internals.md L33: the '...' suffix after inner box 3's right border got parsed as 'extra characters after inner-box right border'. Dropped the '...' — the surrounding prose already conveys 'and more platforms' without needing the visual hint. 2. agent-loop.md: ascii-guard can't cleanly parse two side-by-side boxes of different heights (main thread 7 rows, API thread 5 rows). Even equalizing heights didn't help — the linter treats the left box's right border as the end of the diagram. Merged into a single 54-char-wide outer box with both threads labeled as regions inside, keeping the ▶ arrow to preserve the main→API flow direction.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…sts) (NousResearch#11373) * docs: fix ascii-guard border alignment errors Three docs pages had ASCII diagram boxes with off-by-one column alignment issues that failed docs-site-checks CI: - architecture.md: outer box is 71 cols but inner-box content lines and border corners were offset by 1 col, making content-line right border at col 70/72 while top/bottom border was at col 71. Inner boxes also had border corners at cols 19/36/53 but content pipes at cols 20/37/54. Rewrote the diagram with consistent 71-col width throughout, aligned inner boxes at cols 4-19, 22-37, 40-55 with 2-space gaps and 15-space trailing padding. - gateway-internals.md: same class of issue — outer box at 51 cols, inner content lines varied 52-54 cols. Rewrote with consistent 51-col width, inner boxes at cols 4-15, 18-29, 32-43. Also restructured the bottom-half message flow so it's bare text (not half-open box cells) matching the intent of the original. - agent-loop.md line 112-114: box 2 (API thread) content lines had one extra space pushing the right border to col 46 while the top and bottom borders of that box sat at col 45. Trimmed one trailing space from each of the three content lines. All 123 docs files now pass `npm run lint:diagrams`: ✓ Errors: 0 (warnings: 6, non-fatal) Pre-existing failures on main — unrelated to any open PR. * test(setup): accept description kwarg in prompt_choice mock lambdas setup.py's `_curses_prompt_choice` gained an optional `description` parameter (used for rendering context hints alongside the prompt). `prompt_choice` forwards it via keyword arg. The two existing tests mocked `_curses_prompt_choice` with lambdas that didn't accept the new kwarg, so the forwarded call raised TypeError. Fix: add `description=None` to both mock lambda signatures so they absorb the new kwarg without changing behavior. * test(matrix): update stale audio-caching assertion test_regular_audio_has_http_url asserted that non-voice audio messages keep their HTTP URL and are NOT downloaded/cached. That was true when the caching code only triggered on `is_voice_message`. Since bec02f3 (encrypted-media caching refactor), matrix.py caches all media locally — photos, audio, video, documents — so downstream tools can read them as real files via media_urls. This applies to regular audio too. Renamed the test to `test_regular_audio_is_cached_locally`, flipped the assertions accordingly, and documented the intentional behavior change in the docstring. Other tests in the file (voice-specific caching, message-type detection, reply-to threading) continue to pass. * test(413): allow multi-pass preflight compression run_agent.py's preflight compression runs up to 3 passes in a loop for very large sessions (each pass summarizes the middle N turns, then re-checks tokens). The loop breaks when a pass returns a message list no shorter than its input (can't compress further). test_preflight_compresses_oversized_history used a static mock return value that returned the same 2 messages regardless of input, so the loop ran pass 1 (41 -> 2) and pass 2 (2 -> 2 -> break), making call_count == 2. The assert_called_once() assertion was strictly wrong under the multi-pass design. The invariant the test actually cares about is: preflight ran, and its first invocation received the full oversized history. Replaced the count assertion with those two invariants. * docs: drop '...' from gateway diagram, merge side-by-side boxes ascii-guard 2.3.0 flagged two remaining issues after the initial fix pass: 1. gateway-internals.md L33: the '...' suffix after inner box 3's right border got parsed as 'extra characters after inner-box right border'. Dropped the '...' — the surrounding prose already conveys 'and more platforms' without needing the visual hint. 2. agent-loop.md: ascii-guard can't cleanly parse two side-by-side boxes of different heights (main thread 7 rows, API thread 5 rows). Even equalizing heights didn't help — the linter treats the left box's right border as the end of the diagram. Merged into a single 54-char-wide outer box with both threads labeled as regions inside, keeping the ▶ arrow to preserve the main→API flow direction.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…sts) (NousResearch#11373) * docs: fix ascii-guard border alignment errors Three docs pages had ASCII diagram boxes with off-by-one column alignment issues that failed docs-site-checks CI: - architecture.md: outer box is 71 cols but inner-box content lines and border corners were offset by 1 col, making content-line right border at col 70/72 while top/bottom border was at col 71. Inner boxes also had border corners at cols 19/36/53 but content pipes at cols 20/37/54. Rewrote the diagram with consistent 71-col width throughout, aligned inner boxes at cols 4-19, 22-37, 40-55 with 2-space gaps and 15-space trailing padding. - gateway-internals.md: same class of issue — outer box at 51 cols, inner content lines varied 52-54 cols. Rewrote with consistent 51-col width, inner boxes at cols 4-15, 18-29, 32-43. Also restructured the bottom-half message flow so it's bare text (not half-open box cells) matching the intent of the original. - agent-loop.md line 112-114: box 2 (API thread) content lines had one extra space pushing the right border to col 46 while the top and bottom borders of that box sat at col 45. Trimmed one trailing space from each of the three content lines. All 123 docs files now pass `npm run lint:diagrams`: ✓ Errors: 0 (warnings: 6, non-fatal) Pre-existing failures on main — unrelated to any open PR. * test(setup): accept description kwarg in prompt_choice mock lambdas setup.py's `_curses_prompt_choice` gained an optional `description` parameter (used for rendering context hints alongside the prompt). `prompt_choice` forwards it via keyword arg. The two existing tests mocked `_curses_prompt_choice` with lambdas that didn't accept the new kwarg, so the forwarded call raised TypeError. Fix: add `description=None` to both mock lambda signatures so they absorb the new kwarg without changing behavior. * test(matrix): update stale audio-caching assertion test_regular_audio_has_http_url asserted that non-voice audio messages keep their HTTP URL and are NOT downloaded/cached. That was true when the caching code only triggered on `is_voice_message`. Since 03f8e16 (encrypted-media caching refactor), matrix.py caches all media locally — photos, audio, video, documents — so downstream tools can read them as real files via media_urls. This applies to regular audio too. Renamed the test to `test_regular_audio_is_cached_locally`, flipped the assertions accordingly, and documented the intentional behavior change in the docstring. Other tests in the file (voice-specific caching, message-type detection, reply-to threading) continue to pass. * test(413): allow multi-pass preflight compression run_agent.py's preflight compression runs up to 3 passes in a loop for very large sessions (each pass summarizes the middle N turns, then re-checks tokens). The loop breaks when a pass returns a message list no shorter than its input (can't compress further). test_preflight_compresses_oversized_history used a static mock return value that returned the same 2 messages regardless of input, so the loop ran pass 1 (41 -> 2) and pass 2 (2 -> 2 -> break), making call_count == 2. The assert_called_once() assertion was strictly wrong under the multi-pass design. The invariant the test actually cares about is: preflight ran, and its first invocation received the full oversized history. Replaced the count assertion with those two invariants. * docs: drop '...' from gateway diagram, merge side-by-side boxes ascii-guard 2.3.0 flagged two remaining issues after the initial fix pass: 1. gateway-internals.md L33: the '...' suffix after inner box 3's right border got parsed as 'extra characters after inner-box right border'. Dropped the '...' — the surrounding prose already conveys 'and more platforms' without needing the visual hint. 2. agent-loop.md: ascii-guard can't cleanly parse two side-by-side boxes of different heights (main thread 7 rows, API thread 5 rows). Even equalizing heights didn't help — the linter treats the left box's right border as the end of the diagram. Merged into a single 54-char-wide outer box with both threads labeled as regions inside, keeping the ▶ arrow to preserve the main→API flow direction.
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
Fixes all four pre-existing CI failures on
mainthat were unrelated to any feature PR. Each commit is atomic and addresses one failure.What was failing
docs-site-checks / lint:diagramsdeveloper-guide/architecture.md,developer-guide/gateway-internals.md,developer-guide/agent-loop.mdtest—test_setup_prompt_menus.py(2 tests)tests/hermes_cli/test_setup_prompt_menus.py_curses_prompt_choicein setup.py gained adescriptionkwarg; the mock lambdas in the test didn't accept it, so the forwarded call raisedTypeErrortest—test_matrix_voice.py::test_regular_audio_has_http_urltests/gateway/test_matrix_voice.pytest—test_413_compression.py::test_preflight_compresses_oversized_historytests/run_agent/test_413_compression.pyassert_called_once()was strictly wrong under the new designWhat changed
Commit 1:
docs: fix ascii-guard border alignment errors│at col 1 and col 71.API thread,HTTP POST,to provider).Did not use
ascii-guard fix --dry-run— the auto-fixer introduces extra│characters that visually corrupt the diagrams. Rebuilt the two large diagrams from scratch with a consistent Python template.Commit 2:
test(setup): accept description kwarg in prompt_choice mock lambdasAdded
description=Noneto both mock lambda signatures so they absorb the kwarg thatprompt_choicenow forwards.Commit 3:
test(matrix): update stale audio-caching assertionRenamed
test_regular_audio_has_http_urltotest_regular_audio_is_cached_locally, flipped the assertions. Documented the intentional behavior change (PR #bec02f37 unified all media caching) in the docstring.Commit 4:
test(413): allow multi-pass preflight compressionReplaced
assert_called_once()with the actual invariants the test cares about:Test Plan
All affected test files pass locally:
ASCII lint clean:
All four CI checks that were previously failing on main should go green.