mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-30 19:09:28 +00:00
test_session_not_found_goes_to_stdout_in_full_mode passes in isolation but fails in a full tests/cli run. Two independent leaks from the same neighbor test conspire: 1. test_cli_init.py's _make_cli() reloads cli.py while prompt_toolkit is stubbed with MagicMocks and never reloads it back, so sys.modules['cli'] is left with a mock _pt_print/_PT_ANSI and cli._cprint silently no-ops for every later test. Fixed by reloading cli once more with the real modules visible (try/finally). 2. prompt_toolkit's print_formatted_text caches its Output on the process-global default AppSession the first time it renders without an explicit output=. Under capsys (which swaps sys.stdout per test), the first CLI test to emit through _cprint locks that cache onto its own captured stdout, so later capsys tests read an empty buffer. Fixed with an autouse fixture in a new tests/cli/conftest.py that resets the cached output around each test. Neither change touches production code or the flaky test's own assertion. Related to #59358 (which addresses the same flaky test by mocking _cprint in the assertion instead; this fixes the two underlying leaks at the source and does not modify test_resume_quiet_stderr.py). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| emails | ||
| README.md | ||
Contributor email → GitHub login mappings
This directory replaces appending entries to AUTHOR_MAP in
scripts/release.py. The old dict caused constant merge conflicts when
several salvage PRs landed at once — every PR edited the same lines of the
same file. Here, each mapping is its own file, and file additions never
conflict.
Adding a mapping
One file per commit-author email, under emails/:
python3 scripts/add_contributor.py <email> <github-login>
# or by hand:
echo "<github-login>" > contributors/emails/<email>
- File name = the exact commit-author email (as shown by
git log --format='%ae'). - File content = the GitHub login on the first non-comment line.
Lines starting with
#are comments (use them for the PR reference).
Example — contributors/emails/jane.doe@example.com:
janedoe
# PR #12345 salvage (gateway: fix session key routing)
Rules
- Do NOT add new entries to
AUTHOR_MAPinscripts/release.py. That dict is frozen legacy data; the release tooling merges it with this directory (directory entries win on duplicates). - GitHub noreply emails (
<id>+<login>@users.noreply.github.comand<login>@users.noreply.github.com) auto-resolve — no file needed. - The
Contributor Attribution CheckCI job fails a PR whose commits carry an unmapped email; the failure message prints the exact command to run.