mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
The concept 'never send a turn that strict wire validation rejects as empty' was forked across four sites, each with its own predicate and its own blind spots: 1. build_assistant_message write-time ' ' pad — broke codex commentary turns (content:'' is a designed state), and a DB-side pad can't survive _rows_to_conversation's whitespace strip anyway. REMOVED. 2. conversation_loop send-time ' ' pad — main-loop only (summary path uncovered), ordering-fragile (had to run after whitespace normalization), assistant-only. REMOVED. 3. stream-stub '[response interrupted]' substitution — defeated the loop's empty-stub guard (the stub no longer looked empty, entered history, and the placeholder leaked into the stitched final response via truncated_response_parts). REMOVED. 4. repair_empty_non_final_messages in sanitize_api_messages — the unconditional pre-send chokepoint shared by the main loop AND the summary path, covers user and assistant turns, non-final only, copy-on-write. This is now the SINGLE OWNER. The owner's payload predicate (_msg_has_payload) is extended to treat codex_message_items / codex_reasoning_items as payload, so designed-empty codex commentary turns are never rewritten on any api_mode — the failure shape that broke site 1 in CI is encoded in the owner, not special-cased at a call site. Tests updated to pin the new contracts: builder stores textless turns as-is; the empty stream stub stays recognizably empty for the loop guard; poisoned resumed histories are repaired to the placeholder at the send boundary; codex item carriers are never rewritten. Sabotage-verified: unwiring the owner fails 3 regression tests. |
||
|---|---|---|
| .. | ||
| 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.