stage-346: 10-PR contributor batch — stale-stream guard extension + guarded worktree remove + CSP report collector + perf + i18n + ctl fix - #2180
Merged
Conversation
Backend: - POST /api/session/worktree/remove — removes a session's git worktree - Guards: stream/terminal lock, dirty/untracked without force - remove_worktree_for_session() in api/worktrees.py Frontend: - 'Remove Worktree' context menu item + confirm modal - i18n keys for all 11 locales Tests: - 5 tests: clean remove, missing worktree, no-path, route success, 404
When a provider's 'models' config contains dicts (e.g. {"id": "x", "label": "y"})
instead of plain strings, _apply_provider_prefix() crashes with:
AttributeError: 'dict' object has no attribute 'startswith'
This happens because the list comprehension at line 3505 passes the raw dict
as the model ID. The fix extracts 'id' and 'label' from dict entries while
keeping string entries as-is.
Fixes the /api/models and /api/onboarding/status 500 errors.
fix: handle dict model entries in provider models list
Soften session lineage count badge (refs #2155)
Fix ctl Python wrapper ownership (closes #2172)
Fix stale stream exception writeback guards (closes #2154) # Conflicts: # CHANGELOG.md
Localize logs severity filters (closes #2098) # Conflicts: # CHANGELOG.md
Skip CLI metadata lookup for native session loads # Conflicts: # CHANGELOG.md
Fix stale stream state in session list (closes #2157) # Conflicts: # CHANGELOG.md
Add CSP report collector endpoint (closes #2095)
Consolidate session post-render processing # Conflicts: # CHANGELOG.md
Issue #2057 Slice 2: Add guarded worktree remove action
… contributor batch
…report auth bypass to POST only Opus advisor flagged that PR #2160's CSP-report auth carve-out covered all write methods on the path, not just POST. Currently harmless (PATCH/DELETE fall through to CSRF 403 or routing 404), but defense-in-depth — scope the bypass to its actual use case. CSP report regression suite (6 tests) still passes.
SysAdminDoc
pushed a commit
to SysAdminDoc/hermes-webui
that referenced
this pull request
Jun 26, 2026
stage-346: 10-PR contributor batch — stale-stream guard extension + guarded worktree remove + CSP report collector + perf + i18n + ctl fix
bernyforce
pushed a commit
to bernyforce/hermes-webui
that referenced
this pull request
Jul 29, 2026
stage-346: 10-PR contributor batch — stale-stream guard extension + guarded worktree remove + CSP report collector + perf + i18n + ctl fix
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-346 — 10-PR contributor batch (v0.51.53)
Nathan's "no high-risk merges today" directive: 10 low/medium-low-risk PRs ship; 6 deferred to tomorrow; 10 still on hold.
Composition
POST /api/session/worktree/removewith 5 fail-closed checksactive_stream_idon/api/sessionsReport-ToheaderPYTHON_EXE_apply_provider_prefixTotal: +1567 / -150 across 29 files + 1 stage-346 maintainer-fix commit.
Stage-346 maintainer fix
server.pyCSP-report auth carve-out scoped to POST only — Opus SHOULD-FIX defense-in-depth. PR Add CSP report collector endpoint #2160's carve-out (parsed.path != "/api/csp-report" and not check_auth) bypassed auth for all write methods on that path. Currently harmless (PATCH/DELETE fall through to CSRF 403 or routing 404), but scoping the bypass to POST is a one-line clarity win. 6-test CSP suite still passes.What's deferred to tomorrow
api/auth.pyrewrite (PBKDF2 caching + key separation + Secure cookie + rate-limit locking) with a documented breaking change forsettings.json.password_hashusers. Needs explicit maintainer policy decision.test_ctl_script.pythat #2173 fixes — after #2173 lands, contributor can rebase.show_cli_sessionsdefault flip + auto-import). Needs explicit OK.Verification
run-browser-tests.sh: 20/20 QA + 11/11 API checks PASSEDPOST /api/csp-reportreturns 204 ✓;Report-Toheader advertised ✓;report-uri /api/csp-reportin CSP header ✓${n} prior turn${n === 1 ? '' : 's'}template visible ✓logs_severity_*localized values ✓postProcessRenderedMessagesin ui.js (3 refs) ✓/api/modelsreturns 200 with dict-shaped entries ✓python -m py_compileclean on all modified.pyfilesnode --checkclean on all modified.jsfilesStats
Closes
Closes #2154(via Fix stale stream exception writeback guards #2158)Closes #2157(via Fix stale stream state in session list #2159)Closes #2095(via Add CSP report collector endpoint #2160)Closes #2098(via Localize logs severity filters #2161)Closes #2172(via Fix ctl Python wrapper ownership #2173)Refs #2057 slice 2 (via #2156); refs #2155 (via #2175).