refactor(state): extract title cluster into hermes_state_title.py (hermes_state.py slice R3-C9, epic #78647) - #80371
Closed
andrexibiza wants to merge 1 commit into
Closed
refactor(state): extract title cluster into hermes_state_title.py (hermes_state.py slice R3-C9, epic #78647)#80371andrexibiza wants to merge 1 commit into
andrexibiza wants to merge 1 commit into
Conversation
…rmes_state.py slice R3-C9, epic NousResearch#78647) Signed-off-by: andrexibiza <84248988+andrexibiza@users.noreply.github.com>
This was referenced Aug 6, 2026
Collaborator
Contributor
Author
Contributor
Author
FILE-LIST close — title cluster DUPLICATESuperseded by #80363 (same window 5291–5463, same golden
#80363 carries dual-blind APPROVED receipts (Pass A + Pass B) + pyproject packaging. Credit retained for this branch's implementer work; do not double-merge |
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.
What changed and why
God-file kill campaign (epic #78647):
hermes_state.pyslice R3-C9 — the title cluster, extracted byte-verbatim into a new mixin module.hermes_state.pylines 5291–5463 (class attrMAX_TITLE_LENGTH+sanitize_title,_is_compression_ancestor,_set_session_title,set_session_title,set_auto_title_if_empty,get_session_title).bb7de39c73a6de9e8a61ab3dfd25528e980c310b6b58c25cb8f4742d115ab15b(7,619 B); with-NL variantbdec5623ae3a63e63e652c7e21f993b7804134762739db03910141a213122f05(7,620 B) — both verified byte-exact against the pinned blob.hermes_state_title.pywithSessionTitleMixin(house precedent; module never importshermes_state— cycle guard).class SessionDB(SessionSearchMixin, SessionSchemaMixin, SessionPortabilityMixin, SessionTitleMixin):— mixin appended last.hermes_state.py, byte-identical.global, no instance state;MAX_TITLE_LENGTHreferenced only inside the window; single out-edgeself._execute_write; zerofrom hermes_state import <name>consumers; zero patch targets on any C9 name (verified repo-wide).Double-blind: consensus
R3-CONSENSUS.md(adjudicated 2026-08-06; pass B's pick, pass A's C1+C2 rejected on live collision #71486). Implementer re-ran the collision gate (only #72149, 210 commits behind, inserts a method adjacent to the C9 tail — rebase friction, not a collision).How to test
HERMES_PYTHON="C:/Users/andre/AppData/Local/hermes/hermes-agent/venv/Scripts/python.exe" scripts/run_tests.sh tests/test_hermes_state_title_seam.py tests/test_hermes_state.pyExpected: seam test (7/7 moved names identity, MRO mixin-first,
MAX_TITLE_LENGTH == 100, sanitize behavior) + the title test matrix. Implementer ran the full title matrix: 202/202 + 37/37 green; 7 pre-existing Windows env failures proven identical at pristine origin/main.Seam identity probe:
python -c "import sys; sys.path.insert(0,'.'); import hermes_state; import hermes_state_title as m; from hermes_state import SessionDB; assert SessionDB.set_session_title is m.SessionTitleMixin.set_session_title; assert SessionDB.get_session_title is m.SessionTitleMixin.get_session_title"Platforms tested
Windows (dev host), venv python 3.11;
git diff --checkclean; LF-only.Why this matters to users
No user-visible change — step 5 in shrinking
hermes_state.py(9,691 → 9,518) toward the 2K Law ceiling. Seam identity + suite green keep the refactor invisible until the god-file is dead.Part of #78647
Part of #78636