Commit Graph
8109 Commits
Author SHA1 Message Date
webtecnica cd51670419 fix(profiles): guard agent.skill_utils import in skills-stats fallback (#7305) 2026-09-11 17:34:07 -03:00
nesquena-hermesandnesquena-hermes 2ad70a2815 docs(changelog): stamp #7525 (restore cron delivery platforms) (#7527)
Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
2026-09-11 05:32:02 +00:00
nesquena-hermesandnesquena-hermes f79325498e fix(cron): restore messaging platforms in the delivery picker (#7525)
* fix(cron): restore messaging platforms in the delivery picker

The Agent moved _KNOWN_DELIVERY_PLATFORMS from cron.scheduler to
cron.scheduler_delivery. _handle_cron_delivery_options imported the old
path inside a bare except and fell back to an empty frozenset, so the
import error was swallowed and GET /api/crons/delivery-options silently
returned only local and origin — telegram, discord, slack, feishu and
every other messaging platform disappeared from the cron delivery picker
with no error surfaced anywhere.

Resolve the authority across both module paths (current first, legacy
fallback) so the picker keeps working across Agent versions, and add a
regression test that pins the resolution order and cross-checks the
endpoint output against the resolved authority.

* test(cron): skip the authority-resolution test where the Agent is absent

CI runs agent-free (tests/browser_smoke.py), so neither cron.scheduler_delivery
nor cron.scheduler is importable there and the authority resolves empty. The
new regression test asserted non-empty and therefore failed shard 3 on both
Python versions. Skip instead: with no cron package there is no authority to
resolve and nothing meaningful to assert. The test still fails loudly wherever
the Agent IS installed, which is where a future relocation would bite.

* test(cron): register the new test in _AGENT_DEPENDENT_TESTS

Use the project's existing skip mechanism (tests/conftest.py) rather than an
ad-hoc inline pytest.skip, matching the five sibling delivery-options tests.
CI runs agent-free, so there is no cron package and no authority to resolve
there; with the Agent installed the test still asserts loudly, which is the
environment where a future relocation would actually bite.

Verified both directions: 6/6 pass with the Agent present, and forcing
AGENT_MODULES_AVAILABLE=False skips all 6 (was 5) as CI will.

---------

Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
2026-09-10 22:30:57 -07:00
nesquena-hermesandnesquena-hermes 88b8e7450a docs(changelog): stamp #7519 + #7522 (auxiliary model picker fixes, thanks @webtecnica) (#7526)
Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
2026-09-11 05:17:11 +00:00
nesquena-hermes b7d81ce89e Merge pull request #7522 from webtecnica/fix/7521-aux-picker-endpoint-error-groups
fix(settings): keep endpoint-error provider groups in the auxiliary model pickers (#7521)
2026-09-10 22:13:23 -07:00
nesquena-hermes c5315bda6a Merge branch 'master' into fix/7521-aux-picker-endpoint-error-groups 2026-09-10 22:07:56 -07:00
nesquena-hermes f6f344063d Merge pull request #7519 from webtecnica/fix/7486-aux-provider-preserve
fix(settings): preserve configured aux provider when absent from catalog (#7486)
2026-09-10 22:07:26 -07:00
nesquena-hermes 80eb26301c Merge branch 'master' into fix/7486-aux-provider-preserve 2026-09-10 22:03:09 -07:00
nesquena-hermesandnesquena-hermes ce483fc70f docs(changelog): stamp #7518 (OpenRouter z-ai/ namespace, thanks @webtecnica) (#7524)
Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
2026-09-11 04:52:39 +00:00
nesquena-hermes 8cd1e544ed Merge pull request #7518 from webtecnica/fix/7514-openrouter-zai-namespace
fix(onboarding): use OpenRouter namespace z-ai/ for Z.AI models (#7514)
2026-09-10 21:50:59 -07:00
webtecnica 617881feab test: drive the auxiliary loader behaviorally instead of grepping panels.js (#7521) 2026-09-10 23:18:44 -03:00
webtecnica dc1d41db04 fix: keep endpoint-error provider groups in auxiliary model pickers (#7521) 2026-09-10 23:11:12 -03:00
webtecnica e34980d969 test(7514): pass strict=True to zip() in the namespace projection test
Fixes the B905 finding flagged by the forward ruff gate on #7518.
2026-09-10 22:39:18 -03:00
webtecnica 4f109aebbe fix(settings): preserve configured aux provider when absent from catalog (#7486) 2026-09-10 22:37:09 -03:00
webtecnica 4359ed4fee fix(onboarding): use OpenRouter namespace z-ai/ for Z.AI models (#7514) 2026-09-10 22:30:44 -03:00
nesquena-hermesandn b0f1536f87 Release exp-v0.52.294: add GLM-5.3 Flash to Z.AI catalog (#7323) (#7517)
Co-authored-by: n <a@n>
2026-09-10 20:10:08 +00:00
rh-idandnesquena-hermes 40a6a7696a feat: add GLM-5.3 Flash to Z.AI model list (#7323)
* feat: add GLM-5.3 Flash to Z.AI model list

Add glm-5.3-flash next to glm-5.3 in _PROVIDER_MODELS["zai"] and mirror
it in _FALLBACK_MODELS, following the existing glm-4.5 / glm-4.5-flash
sibling pattern. Reasoning-effort gating needs no change: the >= 5.2
version gate already classifies the id at the full effort tier.

Adds a regression suite asserting catalog presence, label, ordering,
fallback entry, and end-to-end propagation through
get_available_models().

* test: pin glm-5.3-flash sibling adjacency in zai provider catalog

Per PR review feedback (#7323): the provider-catalog ordering test now
asserts glm-5.3-flash immediately after glm-5.3 and glm-5.2 immediately
after the flash sibling, matching the adjacency the fallback test
already pins. The base<flash relative check is subsumed; flash<glm-5.1
is kept to pin 5.1 after the whole 5.3 generation.

---------

Co-authored-by: nesquena-hermes <nesquena+hermes@gmail.com>
2026-09-10 13:08:49 -07:00
nesquena-hermesandn f4569ade88 Release exp-v0.52.293: extract _handle_session_get refactor (#7340) (#7516)
Co-authored-by: n <a@n>
2026-09-10 19:50:42 +00:00
zicochaosandnesquena-hermes a6b187fc84 refactor(routes): extract the 585-line GET /api/session handler to _handle_session_get (#7340)
* refactor(routes): extract the 585-line GET /api/session handler to _handle_session_get

Pure move out of handle_get's if/elif chain into a named module-level handler, matching the pattern the other ~200 routes already use. Body is verbatim (one-level dedent only); AST identity of the moved statements verified; no behavior change — the GET /api/session test slice passes identically before and after.

* test: repoint four source-window tests to _handle_session_get

The moved block's source-window extractors (chat_start synthesiser/read-only
pins, regressions runtime-streaming-state window, issue1436 load-path
markers, security-redaction inspect) now anchor on the extracted handler;
assertions unchanged.

* test: repoint messaging-session loader pin to _handle_session_get

---------

Co-authored-by: nesquena-hermes <nesquena+hermes@gmail.com>
2026-09-10 12:49:14 -07:00
nesquena-hermesandn a71f6c6feb Release exp-v0.52.292: recovered-reasoning-card duplication fix (#7443) (#7513)
Co-authored-by: n <a@n>
2026-09-10 19:30:53 +00:00
656575a400 Fix geometric duplication of recovered reasoning-only rows at turn settle (refs #7388, independent of #7416) (#7443)
* Fix geometric duplication of recovered reasoning-only rows at turn settle

_restore_display_reasoning_metadata() re-inserted every display-only
reasoning row at its API-safe position in the new result. After context
compaction that position is past the end of result_messages, so the row
was appended after the new reply; _message_identity() is None for an
empty assistant row, so the display merge could not dedup it. Each
settled turn therefore re-added every existing empty
_recovered_from_run_journal anchor once more (1,1,2,4,8,... blocks).

Only restore a reasoning-only row in front of its own API-safe
successor; a compacted result with no aligned slot is skipped.

Refs #7388, #7416 (independent: that PR fixes linear journal replay).

* tests: keep docstrings within the 5-line block budget

* Prefer stable ids when aligning a reasoning row's successor at restore

The successor-alignment guard compared the historical successor with the
aligned current row via _message_identity(), which ignores stable ids and
returns equal keys for repeated prompts ("continue"). A distinct current
turn with the same text false-matched the historical successor, every
recovered anchor before it was re-inserted, and 64 anchors became 128
after one restore->merge settle (nesquena-hermes gate on ed2076eda).

Alignment is now stable-id-first: when either row carries an id, both
must carry the same id; _message_identity() is the fallback only when
neither row has one. Adds a production-order regression through
_settle_result_messages() with 64 anchors, stable ids and repeated
"continue" prompts (RED on ed2076eda and origin/master: 128 != 64), plus
a unit test pinning all four id-presence branches.

* Fail closed on stable-id identity: positive-int only, unique, no content fallback

_restore_display_reasoning_metadata() compared ids with raw equality, so a
persisted historical successor with id=True (or 1.0) matched a distinct
current row minted as id=1 and restored the reasoning card before the
wrong turn. Ids are now accepted only when type(value) is int and > 0,
both rows must carry a valid equal id whenever either has an id field,
and the id must be the sole owner in both API-safe projections.
_assign_stable_message_ids() re-mints invalid ids so they cannot survive
into a collision with minted integers.

* tests: explicit zip strict= for the ruff B905 gate

* Resolve the active-turn boundary before restoration; never carry historical ids/rows into it

A historical assistant successor with the same content as the distinct
current assistant ("Done." / "Done.") let _restore_reasoning_metadata copy
the historical stable id onto the current row; the uniqueness guard then
accepted that forged identity and 64 recovered cards settled to 128.

_active_turn_boundary() is decided once in _prepare_marker_clean_writeback
before any restore (token > strict context prefix > last matching user row
> 0) and threaded through _settle_result_messages into both restores.
Rows at/after it receive no historical id/metadata and no historical
reasoning-only row. Assistant-only results are boundary zero.

* Keep the pinned _restore_reasoning_metadata signature; boundary goes through _restore_reasoning_metadata_before_boundary

tests/test_sprint49.py pins the two-arg signature as source text, so the
boundary-aware core lives in _restore_reasoning_metadata_before_boundary
and the original name stays a thin no-boundary wrapper.

* Content-only prefix is not turn ownership: fail closed to boundary 0; sync route passes result/Agent turn authority

- _active_turn_boundary: a previous-context prefix matched by _message_identity
  (ids/timestamps ignored) only narrows where the current user may be; the
  boundary is the prompt-matching user AT OR AFTER that prefix, else 0.
- _handle_chat_sync: resolve authority via _resolve_active_turn_authority
  (result, agent) instead of hard-coding None.
- Regressions: three-row current-only collision (boundary 0, one 64 block),
  exact-authority + append-only controls, ID-less-successor settle/save/load
  pinned at the persisted-display boundary, sync-route authority pass-through.

---------

Co-authored-by: carlotestor <carlotestor@users.noreply.github.com>
Co-authored-by: nesquena-hermes <nesquena+hermes@gmail.com>
2026-09-10 12:29:33 -07:00
nesquena-hermes 71689c6ce7 Merge pull request #7505 from nesquena/release/pr7398-keycmd-cache
Release: preserve agent cache for key_cmd credentials (#7398)
2026-09-09 22:49:15 -07:00
n a284d478d4 docs: credit key_cmd cache fix (#7398) 2026-09-10 05:43:14 +00:00
n f08c8426e1 test: keep key_cmd laziness assertion at construction boundary 2026-09-10 04:48:14 +00:00
n f74b8a7c86 Merge remote-tracking branch 'origin/pr/7398-head' into release/exp289-pr7398 2026-09-10 04:41:05 +00:00
Arush Khasru b39bf1a113 Fix key_cmd credentials in agent cache signatures 2026-09-10 04:40:26 +00:00
394ab31eea release: #7351 bind turn workspace as agent cwd (#7504)
* rebase #7351 onto master (bind turn workspace as agent session cwd)

Co-authored-by: samfoy <samfoy@users.noreply.github.com>

* fix test: use deployed agent.runtime_cwd API (_SESSION_CWD.get) not nonexistent _session_cwd_override

The two failing assertions referenced agent.runtime_cwd._session_cwd_override(), a
helper not present in the installed Agent (which exposes _SESSION_CWD, resolve_agent_cwd,
set/clear_session_cwd). The production binder is correct and verified: binding workspace=/tmp
sets _SESSION_CWD.get()=='/tmp' and resolve_agent_cwd()=='/tmp', reset restores _UNSET.
Line 343 was redundant with the surrounding assertions; line 386 now reads _SESSION_CWD.get().

Co-authored-by: samfoy <samfoy@users.noreply.github.com>

* docs(changelog): stamp #7351 turn workspace cwd binding

---------

Co-authored-by: n <a@n>
Co-authored-by: samfoy <samfoy@users.noreply.github.com>
2026-09-10 03:40:45 +00:00
47e394895d release: #7160 stale-runtime report + hardened Agent-update marker read (#7502)
* rebase #7160 onto master (report unverified Agent updates, no auto-restart)

Co-authored-by: hrdwdmrbl <hrdwdmrbl@users.noreply.github.com>

* harden agent-update marker read: no-follow, fstat regular-file, bounded (fixes gate CORE)

The Agent update marker is attacker-adjacent shared state. _read_live_agent_update()
used Path.read_text(), which follows symlinks, blocks forever on a FIFO, and reads an
unbounded regular file — a rejected/stale-runtime request could hang or OOM. Now opens
O_RDONLY|O_NONBLOCK|O_NOFOLLOW, fstat-verifies a small regular file, and reads a bounded
max, classifying anything else as 'unknown' (fail-closed). Adds FIFO/oversized/symlink/
happy-path regression tests.

Co-authored-by: hrdwdmrbl <hrdwdmrbl@users.noreply.github.com>

* fix marker-read portability: gate os.open fast-path on O_NONBLOCK+O_NOFOLLOW

os.O_NONBLOCK is Unix-only; accessing it unconditionally raised AttributeError
on native Windows, breaking every stale-revision barrier (chat/compression/etc).
Now both flags resolve via getattr and the os.open() fast path is taken only
when BOTH are available (_MARKER_SAFE_OPEN_AVAILABLE); otherwise fall back to an
lstat-only classification (absent vs unknown) so a fallback platform can never
symlink-traverse or crash. Adds a Windows-fallback regression test.

Co-authored-by: hrdwdmrbl <hrdwdmrbl@users.noreply.github.com>

* docs(changelog): stamp #7160 stale-runtime report + hardened marker read

---------

Co-authored-by: n <a@n>
Co-authored-by: hrdwdmrbl <hrdwdmrbl@users.noreply.github.com>
2026-09-10 02:21:04 +00:00
nesquena-hermes ae311e4377 Merge pull request #7500 from nesquena/release/exp-v0.52.288-bound-sidebar-cache
exp-v0.52.288: bound sidebar session-list cache
2026-09-09 17:23:57 -07:00
n a8f46e899e docs: credit bounded sidebar cache fix (#7489) 2026-09-10 00:09:11 +00:00
nandMartin Dell 3e616ad455 fix: harden bounded sidebar cache projection (#7489)
Preserve nested request isolation, make the response allowlist single-source,
and strip heavy fields from existing index rows after reconciliation.

Co-authored-by: Martin Dell <martindell@users.noreply.github.com>
2026-09-09 23:36:41 +00:00
n 989d7f3668 Merge remote-tracking branch 'origin/pr-7489' 2026-09-09 22:49:54 +00:00
Martin Dell 7150b8fb2b fix: bound sidebar session-list cache 2026-09-09 21:22:38 +00:00
cfdfe4db8f release: #7261 provider-native auxiliary model IDs (approved) (#7491)
* fix(settings): persist provider-native auxiliary model IDs

Co-authored-by: lowlandsheperd <lowlandsheperd@users.noreply.github.com>

* docs(changelog): stamp #7261 provider-native aux model IDs

---------

Co-authored-by: n <a@n>
Co-authored-by: lowlandsheperd <lowlandsheperd@users.noreply.github.com>
2026-09-09 20:49:47 +00:00
351f664021 release: #7317 workspace switcher stored order (approved) (#7490)
* fix: workspace selector follows Workspaces view order (drop alpha re-sort)

Co-authored-by: CharlesMcquade <CharlesMcquade@users.noreply.github.com>

* docs(changelog): stamp #7317 workspace switcher stored-order

---------

Co-authored-by: n <a@n>
Co-authored-by: CharlesMcquade <CharlesMcquade@users.noreply.github.com>
2026-09-09 20:38:57 +00:00
2477d992f4 release: lock-disciplined STREAMS reads (#7339) (#7488)
* fix(streaming): lock-disciplined STREAMS reads via peek_stream()

Writers pop STREAMS under STREAMS_LOCK, but four hot reads used bare
STREAMS.get(): the streaming worker start, the gateway run start, and the two
SSE attach paths in routes.py. Each is individually saved today by GIL-atomic
dict.get plus a None-guard, but the check-then-act windows (get → register,
get → subscribe) race teardown pops, and the bare pattern invites unprotected
copies. peek_stream() centralizes the locked read; all four sites migrate with
no behavioral change.

* test: dual-patch config.STREAMS alongside routes.STREAMS in SSE seam tests

peek_stream() reads the canonical api.config.STREAMS registry; tests that
inject a fake registry by patching only the routes-level re-export left the
helper reading the real (empty) registry and hung the SSE loop to the
pytest-timeout ceiling. Mirror the test_issue6623 pattern: patch both
bindings.

* docs(changelog): stamp #7339 lock-disciplined STREAMS reads

---------

Co-authored-by: Sebastian B <sb@wmc.sh>
Co-authored-by: n <a@n>
2026-09-09 20:22:36 +00:00
b1a5ade137 release: multimodal title-generation fix (#7306) (#7484)
* fix(title): preserve multimodal title generation

Assisted-by: Hermes Agent:gpt-5.6-sol
Assisted-by: Codex:gpt-5.6-luna
Assisted-by: Claude Code:claude-opus-5

* docs(title): explain multimodal title generation

Assisted-by: Hermes Agent:gpt-6-astra

* docs(changelog): stamp #7306 multimodal title-generation fix

---------

Co-authored-by: starship-s <45587122+starship-s@users.noreply.github.com>
Co-authored-by: n <a@n>
2026-09-09 18:50:13 +00:00
842b2ac471 release: composer footer-fit jitter fix (#7275) (#7483)
* fix(composer): stop footer fit from jittering the transcript during SSE

_fitComposerFooter() measured overflow by REMOVING the .cf-icons/.cf-burger
stage classes, reading scrollWidth, then adding them back. Between those two
steps the footer is laid out at full width: the composer grows a few px and
#messages loses the same amount of clientHeight, then gets it back on the
next frame.

For a pinned reader that is a visible up/down jitter of the whole transcript,
because the fit pass runs on every context-indicator update — which fires
continuously while an SSE turn is streaming.

Measured with a real Chromium probe instrumenting the scrollTop setter,
scroll events, ResizeObserver and MutationObserver:

  before: 4 non-JS backward jumps of exactly -8px per streamed turn,
          each one ~30ms after a `ctx-indicator-wrap` -> `composer-footer`
          class mutation pair
  after:  0 backward jumps over 5 streamed turns on 2 different sessions

Fix: freeze the footer's layout box (explicit height + visibility:hidden)
for the duration of the measurement, so the intermediate expanded geometry
is never committed to the screen, and restore the resolved stage in the same
task. The adaptive behaviour is unchanged — verified across 8 viewport
widths (1600 -> 420px), with the correct full/icons/burger stage at each and
no residual inline style left behind.

Note: the guard added in the tail-jitter work is what keeps the reader pinned
here; before it, the same footer jitter unpinned the reader instead, which
masked the oscillation behind a worse bug.

* test(composer): cover footer fit freeze across full/icons/burger stages

Add a behavioural node driver test for _fitComposerFooter() that runs the
actual function from static/ui.js against a small layout model where the
stage classes dictate the footer's natural height and the left cluster's
content width. Every class mutation, inline-style write and overflow
measurement commits a layout sample, so the recorded footer heights and
messages clientHeights are what a browser would have painted.

The matrix starts from each stage (full, icons, burger), forces each
overflow outcome, and runs with empty and caller-owned prior inline
styles. It asserts the resolved stage classes, that the footer border-box
height and messages clientHeight stay pinned while the ladder is probed
(and do not move at all in the steady state), that no intermediate stage
is ever painted, and that prior inline height/visibility are restored
verbatim. It also covers the zero-height skip and an exception during
measurement, and includes a control run with the freeze made ineffective
to prove the harness reports the original jitter. Against the pre-fix
ui.js the height, jitter, painted-stage and style-restoration assertions
fail.

* docs(changelog): stamp #7275 composer footer-fit jitter fix

* ci: re-trigger (playwright browser install hung on GH runners)

* ci: re-trigger (google chrome apt mirror hash-sum mismatch, external infra)

---------

Co-authored-by: Anthony Ruiz <ruizanthony@users.noreply.github.com>
Co-authored-by: n <a@n>
2026-09-09 18:11:21 +00:00
nesquena-hermes b1792e64e7 Merge pull request #7480 from nesquena/stage/7270
Release exp-v0.52.282: canonical server entrypoint for Windows restart (#7270, @rodboev)
2026-09-08 23:38:46 -07:00
n 1607767408 changelog: #7270 canonical Windows restart entrypoint (@rodboev) 2026-09-09 06:32:16 +00:00
n f9443e17b2 stage: merge #7270 (canonical Windows restart entrypoint) 2026-09-09 06:14:20 +00:00
nesquena-hermes ec63149e81 Merge pull request #7479 from nesquena/stage/7336
Release exp-v0.52.281: reject malformed/non-object JSON bodies with clean 400s (#7336, @zicochaos)
2026-09-08 21:44:39 -07:00
n 58df481bc5 changelog: #7336 reject malformed/non-object JSON bodies (@zicochaos) 2026-09-09 04:40:08 +00:00
nandzicochaos 1e17127f49 fix: treat whitespace-only body as empty ({}) not a 400
Gate finding on #7336: read_body() rejected whitespace-only bodies that
worked on master (a body-optional DELETE/PATCH/PUT can send b' \n'), returning
400 Invalid JSON body. Normalize a fully-whitespace body to {} before json.loads,
matching the pre-#7336 lenient behavior for that shape. Adds a parametrized
regression test.

Co-authored-by: zicochaos <zicochaos@users.noreply.github.com>
2026-09-09 04:21:46 +00:00
n 1f57afd84c stage: merge #7336 (reject malformed JSON bodies) 2026-09-09 04:02:32 +00:00
nesquena-hermes f4fa4bf77d Merge pull request #7477 from nesquena/stage/7476
Release exp-v0.52.280: warn once per state.db missing source column (#7476, @rodrigogs)
2026-09-08 19:33:49 -07:00
n 547ca6bb5e changelog: #7476 warn once per state.db missing source column (@rodrigogs) 2026-09-09 02:28:40 +00:00
n 927c4fa1b6 stage: merge #7476 (warn once per state.db) 2026-09-09 02:10:36 +00:00
nesquena-hermes 0c6b07c52c Merge pull request #7475 from nesquena/stage/7474
Release exp-v0.52.279: publish conversation context for aux title client (#7474, @webtecnica)
2026-09-08 19:07:44 -07:00
n f129de62e1 changelog: #7474 publish conversation context for aux title client (@webtecnica) 2026-09-09 02:03:26 +00:00