stage-352: 4-PR clean batch — _summary_cache LRU cap #2216 + re.MULTILINE strip fix #2217 + Compact sidebar lineage hide #2219 + CONTRIBUTORS/README refresh #2220 - #2221
Merged
Conversation
Refs #2215 Fix B: remove the mid-response stripping hazard without losing leading multi-line wrapper cleanup. The pattern now strips only a leading 'the user is asking' wrapper line and preserves the visible answer that follows. Add regression coverage for both the leading-wrapper and mid-response prose cases.
Refs #2215 Fix A: replace plain dict _summary_cache with OrderedDict-based LRU capped at 16 entries to prevent unbounded memory growth from long-running update summary generations. Add regression coverage for the bounded LRU behavior: cache hits refresh recency, a new entry at capacity evicts the least-recently used key, and cache size never exceeds the cap.
Last refresh was at v0.51.44 (130 contributors / 568 PR credits). Since then, 14 releases shipped (v0.51.45 through v0.51.58) with 78 attributed PRs from 20 distinct contributors, adding 7 first-time contributors: - @lucasrc — auth-hardening trilogy (#2191/#2192/#2193) → sustained 3-PR bucket - @LumenYoung — stale-stream guard + 3 streaming-correctness fixes → sustained 4-PR bucket - @MrFant — 2 PRs (reasoning_content whitelist, message preservation) - @xz-dev — 2 PRs (thinking-card state, session-scoped metering) - @legeantbleu — French (fr) locale (#2142) - @ayushere — ctl.sh bash 3.2 macOS compat (#2117) - @plerohellec — single PR Bucket promotions (existing contributors who moved up): - @dobby-d-elf: 2 → 6 PRs (jumps from two-PR list into top contributors) - @samuelgudi: 1 → 2 - @michael-dg: 1 → 2 - @vcavichini: 1 → 2 - @hualong1009: 1 → 2 Top contributor PR-count updates (top 7 changed materially): | Contributor | Before | After | Delta | Latest release | |-------------------|-------:|------:|------:|---------------| | @franksong2702 | 92 | 117 | +25 | Unreleased | | @Michaelyklam | 81 | 92 | +11 | v0.51.57 | | @bergeouss | 61 | 62 | +1 | v0.51.46 | | @ai-ag2026 | 49 | 55 | +6 | v0.51.47 | | @dso2ng | 21 | 23 | +2 | v0.51.51 | | @jasonjcwu | 13 | 16 | +3 | v0.51.55 | | @Jordan-SkyLF | 6 | 12 | +6 | Unreleased | Header refreshed: 130 → 137 contributors, 568 → 646 PR credits, refresh tag bumped to v0.51.58. Notable contributions paragraphs in both files updated with the new work (manual /compress async pair, worktree status + guarded remove, fork-from-here, opencode-go resolver, the LumenYoung + lucasrc + dobby-d-elf entries). Source of truth: CHANGELOG.md attribution lines `**PR #N** by @user` between the v0.51.44 header and the Unreleased section, plus baseline buckets in the previous CONTRIBUTORS.md. Cross-bucket sanity check passes (no handle appears in multiple buckets; 21 + 13 + 19 + 84 = 137 unique handles).
fix: drop re.MULTILINE from 'the user is asking' strip pattern (franksong2702, refs #2215 Fix B)
Hide prior-turn lineage metadata in compact sidebar (franksong2702, closes #2218)
docs: refresh CONTRIBUTORS.md and README to v0.51.58 (nesquena-hermes)
…ed for 4-PR stage-352
SysAdminDoc
pushed a commit
to SysAdminDoc/hermes-webui
that referenced
this pull request
Jun 26, 2026
stage-352: 4-PR clean batch — _summary_cache LRU cap nesquena#2216 + re.MULTILINE strip fix nesquena#2217 + Compact sidebar lineage hide nesquena#2219 + CONTRIBUTORS/README refresh nesquena#2220
bernyforce
pushed a commit
to bernyforce/hermes-webui
that referenced
this pull request
Jul 29, 2026
stage-352: 4-PR clean batch — _summary_cache LRU cap nesquena#2216 + re.MULTILINE strip fix nesquena#2217 + Compact sidebar lineage hide nesquena#2219 + CONTRIBUTORS/README refresh nesquena#2220
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.
stage-352 — non-hold cleanups + UX fix + docs refresh (v0.51.59)
Per Nathan's directive: "take a look at the four PRs that are not on hold — if all four look good, consider moving them all forward as a release together as per the usual process."
All four non-hold PRs land clean. Three of them ship code that Opus pre-approved during stage-351 review yesterday (#2216, #2217 — Fix A and Fix B for issue #2215). The fourth (#2219) is a sound UX fix gating compressed-session lineage metadata behind Detailed density. The fifth (#2220) refreshes CONTRIBUTORS.md and the README after 14 release tags accumulated since the last refresh.
+159 / -71 across 11 files.
Composition (4 PRs)
re.MULTILINEflag from the "the user is asking" strip pattern (Opus flagged it during stage-351 review). PR also rewrites.*$to[^\n]*(?:\n|$)so the pattern still terminates correctly at a newline without MULTILINE._summary_cachewith OrderedDict LRU at 16 entries (Opus flagged it; I sketched the exact OrderedDict + move_to_end + popitem(last=False) shape in the issue). Closes #2215._sidebarDensity === 'detailed'so Compact density no longer exposes "N prior turns" badges that can lead to "Session not available in web UI" errors when expanded. Visual evidence underdocs/pr-media/2218/.Verification
run-browser-tests.sh: 20/20 QA + 11/11 API checks PASSED in 103sre.MULTILINEcount inapi/streaming.py: 0 (was 1 before fix: drop re.MULTILINE from 'the user is asking' strip pattern #2217)OrderedDict+_SUMMARY_CACHE_MAX+move_to_end+popitem(last=False)present inapi/updates.pyshowLineageMetadatagating present 6× instatic/sessions.jsCONTRIBUTORS.md+ 2× inREADME.md_fetchLineageReportForRowhas exactly one caller, inside thecanExpandLineageSegments-gated handler. No compact paths trigger fetch.Bonus from Opus on #2217: the PR isn't just "drop the
re.MULTILINEflag" — it also rewrites.*$to[^\n]*(?:\n\|$)so the pattern still terminates at a newline without MULTILINE. The two-part change is correct and the new test attests/test_issue607.py:91-102validates both the strip (leading wrapper) and the preserve (mid-response) cases.Stats
Closes
Closes #2215(via fix: cap _summary_cache with LRU (max 16 entries) #2216 — Fix A; PR fix: drop re.MULTILINE from 'the user is asking' strip pattern #2217 ships the matching Fix B in the same stage so the issue can fully close)Refs #2218 (#2219 ships the Compact-density fix; #2218 may stay open for follow-up Detailed-density polish).