Commit Graph
100 Commits
Author SHA1 Message Date
nesquena-hermesandnesquena-hermes 2d20d336ea Release v0.51.230 — Release GX (stage-p14 — extract <think> to m.reasoning #3455 + LLM Wiki last-writer #1257) (#3466)
* Release v0.51.230 (stage-p14): extract <think> to m.reasoning #3455 + LLM Wiki last-writer (#1257)

Salvage of #3455 (@gsurenull): dropped the stale api/config.py bits (MiniMax-M3 +
SCHEMA_VERSION 3->4 — both already on master via #3374). Kept the two genuine fixes:
(1) _splitThinkFromContent persist-path extraction of inline <think> blocks into
m.reasoning (fixes 30-50% session bloat for reasoning-only providers like MiniMax-M3);
(2) LLM Wiki status Last-writer 3-tier fallback (was always 'Not available' since #1257).
Added 9 Node-driven think-split regression tests (data-loss guards: content-before/after
preserved, unclosed blocks intact, lookalike tags not extracted).

* fix(#3455): renderer-matching think extraction + wiki symlink/bounded-read guards (Codex review)

Codex review of stage-p14 found 3 SILENT bugs, all fixed:
(1) DATA-LOSS: _splitThinkFromContent's Pass-2 whole-body scan extracted a CLOSED literal
<think>...</think> from visible prose/code (e.g. inside a fenced code block) into m.reasoning,
emptying it — more aggressive than the renderer (which only strips LEADING blocks). Removed
Pass 2; extraction now matches _streamDisplay semantics (leading-only, loop captures
consecutive leading blocks). +fenced-code regression test.
(2) PRIVACY: _llm_wiki_last_writer followed symlinked .md pages resolving OUTSIDE the wiki
(is_file follows symlinks), leaking external frontmatter. Now requires resolved path under
wiki_root. +symlink-containment regression test.
(3) CONTRACT/PERF: replaced full read_text() with bounded line-by-line reads (frontmatter
block only / capped log-heading scan), never page bodies.

* fix(#3455): think-split is leading-single (renderer-matching) + fix 2 stale source-match tests

Codex re-review finding #2: looping consecutive leading blocks diverged from the renderer
(_streamDisplay/_parseStreamState strip ONE leading block). Now extracts exactly one leading
block. Also updated 2 tests that asserted pre-split implementation strings:
test_live_stream_tokens_persist (content:assistantText -> content:split.content, invariant
preserved) and the consecutive-blocks test. NOTE: Codex finding #1 (client-only split doesn't
persist server-side) is a separate architectural decision pending Nathan.

* feat(#3455): split inline <think> server-side before s.save() so persisted file is compacted (Codex #1)

Codex finding #1: the think-split was client-only, so the SAVED session file still
carried inline <think> blocks (bloat) — the fix only compacted the browser copy.
Added _split_thinking_from_content (api/streaming.py), a server-side twin of the JS
helper with identical leading-only/single-block semantics, applied to the final
assistant message before s.save() (extended the existing reasoning-persist block).
Merges with on_reasoning-stream reasoning. +8 backend-parity regression tests covering
the mid-body-code-block data-loss guard, unclosed-intact, single-leading, none-content.

* test: update 3 save-path source-assertion tests for #3455 server-side think-split

The backend think-split (api/streaming.py reasoning-persist block) changed the literal
code shape + grew the pre-save block, breaking 8 source-assertion tests that anchor on it:
- test_sprint42: assert _rm['reasoning']=_reasoning_text -> now _merged_reasoning/_existing_reasoning
  + _split_thinking_from_content present (intent preserved: reasoning persisted before save).
- test_pr1318 (6) + test_pr1341: re-anchored the locator from the changed 'if _reasoning_text
  and s.messages:' line to the stable 'Persist reasoning trace in the session' comment marker;
  bumped the 1341 byte-distance limit 15000->16000 (the test self-documents bumping on legit
  pre-save growth). All behavioral invariants (reasoning persisted + context fields before save)
  unchanged.

---------

Co-authored-by: nesquena-hermes <[email protected]>
2026-06-02 22:48:35 -07:00
nesquena-hermesandnesquena-hermes 7c6fb33549 Release v0.51.229 — Release GW (stage-p13 — /model never silently snaps a versioned name to a -tier variant #3368) (#3465)
* Release v0.51.229 (stage-p13): /model never silently snaps versioned name to -tier variant (#3368, @nesquena-hermes)

Agent-authored, nesquena-APPROVED. Rebased onto current master. Both _findModelInDropdown
(ui.js) and _bestModelMatch (commands.js) reject a prefix-snap when the typed target ends
in a version digit and the longer option's extra text is a variant/tier suffix (.pro) rather
than a version continuation (.digit). Adds _nearestModelSuggestion + 'did you mean?' toast.
34 tests pass (14 new #3368 + 20 regression: #1188 fuzzy + #3360 collision).

* fix(commands): /model did-you-mean toast renders suggestion + single quotes (#3368 review)

Live-render review of the approved #3437 caught two toast-assembly bugs in cmdModel:
(1) t('model_did_you_mean') was called WITHOUT the suggestion arg — model_did_you_mean
is a (m)=>... template that t() invokes, so it rendered 'did you mean "undefined"?';
fixed to t('model_did_you_mean', suggestion). (2) no_model_match already ends with an
opening quote, so '"${args}"' doubled it ('No model matching ""deepseek-v4""'); fixed
to '${args}"'. +4 source-assertion regression tests. Verified live: toast now reads
'No model matching "deepseek-v4" — did you mean "deepseek/deepseek-v4-pro"?'.

* fix(commands): slash-qualified versioned no-snap falls through to suggestion (#3368 Codex CORE)

Codex review found a 2nd no-snap layer the version guard missed: for a slash-qualified
versioned query (e.g. 'xiaomi/mimo-v2.5') whose only near catalog entry is a rejected
tier variant ('xiaomi/mimo-v2.5-pro'), cmdModel's cross-provider /api/session/update
fallback would silently persist the invalid model + 'Switched to...'. Now gated on
!versionedNoSnap (_looksLikeVersionedModel(bare) && a near suggestion exists) so it falls
through to the 'did you mean?' toast; genuinely off-catalog providers (no near variant)
still direct-update. Verified live: '/model deepseek/deepseek-v4' no longer switches, shows
suggestion toast. +1 regression test.

---------

Co-authored-by: nesquena-hermes <[email protected]>
2026-06-02 21:35:09 -07:00
nesquena-hermesandnesquena-hermes 9374e66855 Release v0.51.228 — Release GV (stage-p12 — workspace tree-drop #3411 + large-markdown preview #3378) (#3463)
* Release v0.51.228 (stage-p12): workspace tree-drop #3411 + large-markdown preview #3378

#3411 (@pamnard): stopPropagation on workspace file-tree OS-file dragenter/dragover/drop
so a tree drop uploads to the workspace WITHOUT also attaching to the composer.
#3378 (@starGazerK): raise md rich-render ceiling 64KB/1500L->256KB/5000L + backend
file read 200KB->400KB, add 'Render as markdown anyway' force button (reuses cached
raw content, no extra fetch).

* fix(workspace): force-render uses fresh path-scoped cache, blocked while dirty (#3378 Codex follow-up)

Codex review of #3378 found the markdown force-render path had two SILENT bugs:
(1) saving a md file from the plain-text fallback didn't update _previewRawContent,
so a later force-render showed stale pre-save content; (2) the cache-reuse check
'path===_previewCurrentPath' was tautological (var just assigned), so a force-render
after a file switch could render the previous file's cached content. Fixes: track
_previewRawContentPath (set on fetch AND save), reuse cache only when it matches the
requested path, and block force-render while the editor is dirty/open. +3 regression
tests. (#3411 was cleared clean by Codex.)

---------

Co-authored-by: nesquena-hermes <[email protected]>
2026-06-02 20:58:22 -07:00
nesquena-hermesandnesquena-hermes fdfb935b5e Release v0.51.227 — Release GU (stage-p11 — keep active New Chat visible in sidebar #3408) (#3461)
* fix(sidebar): keep active New Chat visible before first message (#3408, @AJV20)

Squashed net diff of #3408. Injects ONLY the active ephemeral session into the
sidebar render rows (when the server list omits it) so a freshly-created New Chat
stays visible/selected before its first turn; inactive empty sessions stay
filtered as before. New Chat also resets a CLI source-filter back to webui so the
active chat isn't immediately hidden.

* fix(sidebar): gate active-row reinjection to 0-message ephemeral only (#3408 Codex follow-up)

Codex review found _ensureActiveSessionRowPresent re-injected ANY active session
after search-merge — so an active conversation WITH messages that was correctly
filtered out by the search query would pollute unrelated search results. Gate the
reinjection to Number(activeRow.message_count||0)<=0 so only the freshly-created
0-message ephemeral chat is re-added; an active chat with messages stays filtered
by search as before. Added a regression test asserting the gate.

---------

Co-authored-by: nesquena-hermes <[email protected]>
2026-06-02 20:24:48 -07:00
nesquena-hermesandnesquena-hermes 0b5458f3da Release v0.51.226 — Release GT (stage-p9 — mobile composer context-usage ring #3062 + activity-feed default-expand setting #3080) (#3459)
* feat(composer): replace mobile config-button sliders icon with context-usage ring (#3062, @NottheGuy007)

Squashed net diff of #3062 (the PR branch's tip commits were deletes of files not
present in our tree). Replaces the composerMobileCtxBadge text badge with an SVG
progress ring (ctx-arc + ctx-num) showing real-time context-window usage: ring
fill via stroke-dashoffset, centered percentage, color-coded green<=50%
orange<=85% red>85%. Ring resets to 0%/green on new session.

* feat(activity): add 'expand activity feed by default' appearance setting (#3080, @AJV20)

Squashed net diff of #3080. Adds a Settings -> Appearance checkbox
(activity_feed_expanded_default, default off) to expand new Activity disclosures
by default; preserves manual per-turn collapse/expand (explicit toggle still
wins); live 'Waiting on model' rows explain what the agent is doing before/after
tool calls. i18n keys for all locales.

* docs(changelog): v0.51.226 — context-usage ring (#3062) + activity-feed default-expand setting (#3080)

* test(mobile): update touch-target test for #3062 ring (badge removed)

#3062 replaced the composerMobileCtxBadge text badge with the SVG context-usage
ring (composerMobileCtxRing) but left 3 stale references in tests/test_mobile_layout.py.
The full suite caught test_mobile_composer_primary_controls_keep_touch_friendly_sizing
asserting the removed .composer-mobile-ctx-badge CSS rule + #composerMobileCtxBadge
element. Updated the assertion to the new ring: confirm composerMobileCtxRing exists,
the old badge is fully gone (not dangling), and the ring SVG is aria-hidden so it
stays a decorative overlay that doesn't steal the config button's 44px touch target
(which is still asserted via .composer-mobile-config-btn above). 56/56 mobile-layout
tests pass. Codex: no production JS dereferences the removed badge.

---------

Co-authored-by: nesquena-hermes <[email protected]>
2026-06-02 19:48:01 -07:00
ec46f05c92 Release v0.51.225 — Release GS (stage-p7 — remote gateway health probe resolves gateway_state #3355) (#3458)
* fix(health): probe /health/detailed first and unify gateway env vars (#3355)

* docs(changelog): v0.51.225 — remote gateway health probe gateway_state fix (#3355)

* fix(health): normalize gateway URL health-suffix + cap remote body read (#3355 Codex follow-up)

Codex review of #3355 found two issues:
(1) SILENT — a gateway env var already pointing at a health path (e.g.
    GATEWAY_HEALTH_URL=http://host/health) produced doubled paths like
    /health/health/detailed once probe paths were appended. Now strip a trailing
    /health/detailed, /health, /v1/health, /status suffix before appending
    (mirrors api/updates.py).
(2) CORE — the new resp.read() on a 2xx body was unbounded; a large/trickled
    remote response could hang /api/health/agent or balloon memory. Cap the read
    at _REMOTE_PROBE_BODY_LIMIT_BYTES (64KB)+1 and skip JSON parse when over cap
    (still report the gateway alive, just without parsed gateway_state).

Adds regression tests for both (no doubled /health/health path; oversized body
is capped + does not hang). Also updated _FakeResp.read to accept the size arg.

---------

Co-authored-by: Rod Boev <rod.boev@gmail.com>
Co-authored-by: nesquena-hermes <[email protected]>
2026-06-02 18:56:25 -07:00
bb5aa02523 Release v0.51.224 — Release GR (stage-p6 — profile tool/skill config authoritative on streaming worker #3294) (#3456)
* fix: respect profile toolset/skill config on WebUI streaming worker (#3294)

The streaming agent runs on a detached worker thread that does not inherit
the per-request thread-local profile context (set from the hermes_profile
cookie on the HTTP handler thread). On that worker, the ambient get_config()
resolves via get_active_profile_name() which falls back to the process-global
_active_profile (usually 'default'). A session under a non-default profile
with an empty platform_toolsets.cli therefore loaded the DEFAULT profile's
full toolset list, inflating a tools-disabled profile's prompt from ~400 to
~15K input tokens.

Add api.config.get_config_for_profile_home() — a race-free direct disk read
of an explicit profile home's config.yaml (no shared-cache mutation), which
defers to get_config() when the requested home matches the ambient path so
in-memory test overrides are preserved. The streaming worker now resolves
_cfg from the session's own profile home, fixing toolsets, prefill context,
and fallback chains in one place.

Closes #3294

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

* docs(changelog): v0.51.224 — #3294 profile toolset config (dropped #3405 to hold per Codex stale-model-repair finding)

---------

Co-authored-by: nesquena-hermes <[email protected]>
Co-authored-by: gottipx <gottipx@users.noreply.github.com>
2026-06-02 18:33:22 -07:00
b850a88e8b Release v0.51.223 — Release GQ (stage-p5 — openai-api first-class picker provider #3443 + MiniMax-M3 #3374) (#3453)
* feat: upgrade MiniMax default model to M3

Add MiniMax-M3 as the new default and prune deprecated older
versions (M2.5/M2.5-highspeed/M2.1/M2) from the model catalog.
M2.7 (and M2.7-highspeed) is retained as the legacy compatible
option for users who pin to it.

Updated:
  - api/config.py: _FALLBACK_MODELS adds minimax/MiniMax-M3 (placed
    before M2.7 so the dropdown surfaces it first)
  - api/config.py: _PROVIDER_MODELS['minimax'] adds M3 first, removes
    M2.5/M2.5-highspeed/M2.1
  - api/config.py: _PROVIDER_MODELS['minimax-cn'] adds M3 first,
    removes M2.5/M2.1/M2
  - tests/test_minimax_provider.py: updated CN catalog assertions
    to match the new {M3, M2.7} list

API URL and TTS configuration are unchanged.

Co-Authored-By: Octopus <liyuan851277048@icloud.com>

* fix(models): register openai-api as first-class picker provider

* fix(models): detect OPENAI_API_KEY as openai-api, not bare openai (#3443 Codex follow-up)

Codex review found #3444 added the openai-api picker entry but the env-detection
side still did detected_providers.add('openai') for OPENAI_API_KEY. The agent
registry has only openai-api and openai-codex (no bare openai), so a env-only
OPENAI_API_KEY setup emitted @openai: picker entries the agent can't resolve on
the send path. Detect openai-api to match the registry. Adds a regression test.

* docs(changelog): v0.51.223 — re-stamp keep-set (#3443 openai-api + #3374 MiniMax-M3); dropped #3289 + #3264 to hold per Codex

---------

Co-authored-by: octo-patch <octo-patch@github.com>
Co-authored-by: Octopus <liyuan851277048@icloud.com>
Co-authored-by: Rod Boev <rod.boev@gmail.com>
Co-authored-by: nesquena-hermes <[email protected]>
2026-06-02 18:08:01 -07:00
cccb97d970 Release v0.51.222 — Release GP (stage-p4 — backend bugfix batch: title language drift #3293 + orphaned CLI sidecar prune #3238 + pin-quota lineage #3288) (#3452)
* fix: reject cross-script drifted auto-generated session titles (#3293)

The title-language mismatch guard only knew two states: German (de) or empty,
and _title_language_mismatch early-returned False whenever the user start
wasn't German. So an English conversation whose LLM-generated title came back
in Chinese / Spanish / Russian sailed through and persisted with
llm_title_generated=true. The German case was the only one covered because
that's the one prior report it was built for.

Generalize from a German-specific binary to a language-agnostic cross-script
check. Add _script_counts() + _dominant_script() (cheap, dependency-free
Unicode-block classification: latin / cjk / cyrillic / arabic / hebrew / greek
/ devanagari). _title_language_mismatch now rejects a title that introduces a
substantial amount (>=35% of alphabetic chars, min 2) of a script different
from the conversation start's dominant script — so short titles that embed a
borrowed Latin technical term still trip, while an English title with a single
foreign place-name does not. The legacy German->English same-script heuristic
is preserved verbatim.

Kept api/streaming.py ASCII-only (the test_title_generation_source_has_no_cjk_
literals guard) — all CJK examples live in the test file, not the source.

Closes #3293

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

* fix: prune orphaned imported-CLI sidecars from the WebUI sidebar (#3238)

When a CLI/agent session is opened in WebUI it gets a WebUI-owned sidecar
(webui/sessions/<id>.json + _index.json row) so it can render and reopen;
all_sessions() then returns it independently of the agent state.db. If the
user later deletes that session from the CLI / local Hermes storage, nothing
pruned the sidecar — the merge loop only overlays CLI metadata when a matching
state.db row exists and otherwise continues, so the stale row lingered in the
sidebar indefinitely (there is no WebUI delete affordance for CLI rows).

Add api.models.agent_session_row_exists(): an exact, uncapped existence probe
against the state.db sessions table. The sidebar merge loop now drops a row
that is_cli_session_row + not WebUI-native + absent from cli_by_id + whose
state.db row is genuinely gone, and calls prune_session_from_index() so
_index.json self-heals.

The state.db probe is deliberate: get_cli_sessions() caps at
CLI_VISIBLE_SESSION_LIMIT (20), so a still-existing session can fall out of
that window and look deleted — pruning on cli_by_id absence alone would delete
live sessions. WebUI-native rows with a CLI ancestor are never pruned, and any
probe error degrades to keep-the-row so a transient failure can't lose data.

Closes #3238

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

* fix: count pin quota by visible session lineage

* docs(changelog): v0.51.222 — backend bugfix batch (#3293 title drift, #3238 sidecar prune, #3288 pin lineage)

* fix(pins): forks count as own pin lineage, not collapsed to parent (#3288 Codex follow-up)

Codex review of the batch found a pin-limit UNDERCOUNT: _session_row_lineage_root_id
followed any parent_session_id to the root, but /api/session/branch creates
independent visible fork sessions that also carry parent_session_id (session_source=
'fork'). Two pinned forks of the same parent collapsed to one quota lineage, letting
a user exceed pinned_sessions_limit with no 400. Fix: a fork returns its own id as
its lineage root (it's a separately-visible session); only compression/continuation
rows still collapse to a shared root. Adds a regression test with two pinned forks +
the parent counting as three distinct lineages, and confirms the existing
pre-compression-snapshot collapse case still passes.

* test(pins): update #2508/#2821 source-match tests for #3288 lineage rename

#3288 replaced the raw-session-id pin counter (pinned_ids set) with a
visible-lineage counter (pinned_lineage_ids via _visible_pinned_lineage_ids over
persisted_rows/candidate_rows). Two pre-existing source-string-matching tests
asserted the OLD implementation literals (pinned_ids = {, _session_field(existing,
session_id...), len(pinned_ids) >=). Updated both to assert the new mechanism while
preserving the invariants they actually guard: snapshot computed BEFORE LOCK (no
all_sessions()-inside-LOCK deadlock), quota filtering via the shared
_session_counts_toward_pin_quota helper, and the limit/400 guard. Behaviour
unchanged; these were implementation-detail assertions, not behaviour tests.

---------

Co-authored-by: nesquena-hermes <[email protected]>
Co-authored-by: andrewkangkr <andrewkangkr@users.noreply.github.com>
Co-authored-by: Luxciax <Luxciax@users.noreply.github.com>
Co-authored-by: Andy Kang <andrewkang.kr@gmail.com>
2026-06-02 17:35:18 -07:00
7c48c37629 Release v0.51.221 — Release GO (stage-p3e — block all workspace symlink escapes + portable TOCTOU hardening [security]) (#3398) (#3451)
* [security] fix(workspace): block all symlink escapes from the selected workspace (#3398, @Hinotoi-agent)

Previously safe_resolve_ws allowed a symlink placed inside a workspace to resolve
to an external host path as long as it wasn't a system dir (/etc, /proc, etc).
But the workspace file API is reachable by LLM agent tool calls (read_file_content),
so an in-workspace symlink to ~/.ssh, ~/.hermes/auth.json (credentials), etc. was a
real read path. Now ANY symlink escape is blocked: safe_resolve_ws resolves and
requires the result stay under the workspace root; list_dir hides escaping symlinks
(they could never be opened anyway); internal symlinks resolving back under the
workspace still work. Updated the upload symlink-target test to accept the new
400 'Path traversal blocked' rejection (was 403) — the invariant (nothing lands
outside the workspace) is unchanged.

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

* docs(changelog): v0.51.221 release header for #3398 symlink-escape security fix

* [security] harden workspace file API against symlink-swap TOCTOU via portable anchored openat-walk (#3398 follow-up)

Codex review of #3398 flagged that safe_resolve_ws() validates a path but
list_dir/read_file_content/upload/extraction then re-open by pathname, leaving a
TOCTOU window: a symlink swapped in AFTER the check could still escape. (This
race pre-existed #3398; closing it here so the containment is complete.)

A first attempt used /proc/self/fd for the post-open containment check, but that
BRICKS workspace browsing on macOS/Windows (no /proc → every read/list rejected).
This version is portable:

- open_anchored_fd(): opens the (already symlink-resolved) target
  component-by-component from the workspace root via openat (dir_fd) + O_NOFOLLOW.
  Every component must be a real non-symlink entry, so a component swapped to a
  symlink mid-flight is refused. No /proc dependency. Used by read_file_content
  (read from the fd) and list_dir (enumerate via os.scandir(fd), per-entry
  fstatat/readlinkat).
- open_anchored_create_fd(): same anchored walk for writes, creating missing
  intermediate dirs with mkdir(dir_fd=) and the leaf with O_CREAT|O_EXCL|
  O_NOFOLLOW. Used by the workspace upload write AND archive (zip+tar) member
  writes, anchored against the TRUE workspace root (not the mutable extraction
  dest_dir, closing Codex's root-swap finding). fd-leak-safe on rejection.
- Portability: gated on os.supports_dir_fd; platforms without it (Windows, where
  symlink creation needs admin) fall back to a plain O_NOFOLLOW open/exclusive
  create — no new race protection but no regression vs the prior path-based code.

Legit in-workspace symlinks still resolve and read/list fine (safe_resolve_ws
collapses them to a real in-workspace path, which the anchored walk then opens).
Verified: the swap-race leaks external content against the old path-based read
and is blocked here; macOS-class symlinked-root workspaces work; no fd leak over
300 rejected creates. Adds TOCTOU + anchored-create regression tests.

* [security] close 3 more #3398 TOCTOU gaps from Codex r3: root-swap, pre-create mkdir, Windows list_dir fallback

Codex round-3 review found three residual issues in the anchored openat-walk:

1. (CORE) The workspace ROOT itself could be swapped to a symlink after
   resolve() but before the root os.open() — add _O_NOFOLLOW to the root open in
   open_anchored_fd() and open_anchored_create_fd() (and make_anchored_dir()), so
   a raced root symlink is refused. Verified: root-swap race now blocked.

2. (SILENT) Upload/extraction still did pathname Path.mkdir() AFTER the
   containment check, so a raced symlink component could make the server create
   dirs outside the workspace before the anchored file create rejected. Removed
   the redundant member_path.parent.mkdir() calls (open_anchored_create_fd
   already creates intermediates via anchored mkdirat) and replaced the two
   base-dir mkdirs (upload target dir + archive extraction root) with a new
   make_anchored_dir() that walks from the true workspace root via
   openat+O_NOFOLLOW + mkdir(dir_fd=).

3. (CORE) list_dir() unconditionally used os.scandir(fd)/os.stat(dir_fd=)/
   os.readlink(dir_fd=), which would brick workspace browsing on platforms
   without os.supports_dir_fd (Windows). Split list_dir() into a _DIR_FD_OK
   anchored branch and a path-based fallback branch (prior behaviour) sharing one
   _process() entry builder. open_anchored_create_fd()'s Windows fallback now also
   creates parent dirs.

Adds regression tests: no-dir_fd fallback (list+read+create+symlink filtering)
and the root-swap race. All prior TOCTOU + anchored-create tests still green.

* fix(workspace): portable symlink-loop filtering in list_dir via follow-stat ELOOP

CI on Python 3.13 caught test_mutual_symlink_loop_filtered failing: a mutual
symlink loop (a->b->a) was NOT filtered from the listing. Root cause: the new
readlink-based cycle detection relied on (target_resolved / raw_link).resolve()
RAISING on a loop, but Path.resolve() loop handling differs by Python version
(3.11 raises RuntimeError, 3.13 can return a path), so the loop slipped through
on 3.13.

Fix: compute a version-independent 'reachable' flag per symlink via
os.stat(..., follow_symlinks=True) — the syscall reliably returns ELOOP for
mutual/self loops and ENOENT for broken targets on every platform/version. A
symlink whose follow-stat raises can never be opened, so list_dir filters it.
Applied in both the dir_fd-anchored branch (fd-relative stat) and the Windows
path-based fallback branch. Mutual loop now filtered on all versions.

---------

Co-authored-by: nesquena-hermes <[email protected]>
Co-authored-by: Hinotoi-agent <Hinotoi-agent@users.noreply.github.com>
2026-06-02 16:56:30 -07:00
nesquena-hermes 42aef61b31 Merge pull request #3442 from nesquena/docs/contributor-attribution-backfill
docs: backfill contributor attribution for absorbed PRs (graph credit + CONTRIBUTORS.md)
2026-06-02 14:46:38 -07:00
nesquena-hermes b774b03900 Merge pull request #3441 from nesquena/release/stage-p3c
Release GN — v0.51.220 (fix aux title generation 422 with @provider: model ids, #3430)
2026-06-02 14:25:07 -07:00
nesquena-hermes b9a0b77baa Merge pull request #3439 from nesquena/release/stage-p3b
Release GM — v0.51.219 (extend URI-scheme model-ID fix to backend normalization, #3436)
2026-06-02 14:12:09 -07:00
nesquena-hermes f7087a3d1d Merge pull request #3438 from nesquena/release/stage-p3a
Release GL — v0.51.218 (fix getModelLabel mangling URI-scheme model IDs, #3429 regression)
2026-06-02 13:56:35 -07:00
nesquena-hermes 6703b39a2d Merge pull request #3435 from nesquena/release/stage-p2f
Release GK — v0.51.217 (decode + complete zh-Hant locale; fix missing fr provider_mismatch_warning)
2026-06-02 13:19:50 -07:00
nesquena-hermes 67936f5c8b Merge pull request #3434 from nesquena/release/stage-p2e
Release GJ — v0.51.216 (fix consecutive-user-turn rejection on strict chat templates)
2026-06-02 12:57:04 -07:00
nesquena-hermes 60369cab69 Merge pull request #3428 from nesquena/release/stage-p2d
Release GI — v0.51.215 (deduplicate legacy messages in append-only merge)
2026-06-02 12:27:50 -07:00
nesquena-hermes a1d44d6482 Merge pull request #3426 from nesquena/release/stage-p2c
Release GH — v0.51.214 (preserve loaded transcript width on same-session external refresh)
2026-06-02 12:17:53 -07:00
nesquena-hermes e156cbf356 Merge pull request #3423 from nesquena/release/stage-p2b
Release GG — v0.51.213 (keep gateway context visible in chat transcripts)
2026-06-02 11:50:07 -07:00
nesquena-hermes ab05670daf Merge pull request #3416 from nesquena/release/stage-batch2
Release GF — v0.51.212 (i18n regenerate-title + self-restart argv + todos cold-load)
2026-06-02 10:44:10 -07:00
nesquena-hermes f12608487f Merge pull request #3415 from nesquena/release/stage-batch1
Release GE — v0.51.211 (reasoning heuristics + /model shortest-match + Copilot env-token filter)
2026-06-02 10:28:27 -07:00
nesquena-hermes 4baa26bb5b Merge pull request #3380 from nesquena/release/stage-batch1
Release v0.51.210 — Release GD (stage-batch1: model-picker multi-slash fix + extensionless preview highlighting)
2026-06-01 22:23:26 -07:00
nesquena-hermes 866969161e Merge pull request #3376 from nesquena/review/pr-2622
Release GC — v0.51.209 (#2622 WebUI dashboard plugin system with iframe isolation)
2026-06-01 21:14:00 -07:00
nesquena-hermes 3cafec3004 Merge pull request #3372 from nesquena/hotfix/upload-hardening
Release GB — v0.51.208 (workspace upload hardening hotfix)
2026-06-01 19:38:37 -07:00
nesquena-hermes 36faa02364 Merge pull request #3369 from nesquena/review/pr-2931
Release GA — v0.51.207 (#2931 Edge TTS as an alternative speech engine)
2026-06-01 19:15:12 -07:00
nesquena-hermes f0c3668d97 Merge pull request #3367 from nesquena/review/pr-3104
Release FZ — v0.51.206 (#3104 workspace file upload + drag-and-drop with archive extraction)
2026-06-01 18:18:50 -07:00
nesquena-hermes 383e0501db Merge pull request #3363 from nesquena/release/stage-hi1
Release FY — v0.51.205 (stage-hi1: workspace syntax highlighting + generated-image rendering + manual title regeneration)
2026-06-01 17:20:49 -07:00
nesquena-hermes b718cf436f Merge pull request #3361 from nesquena/release/stage-batch17
v0.51.204: project/session operations honor the session's own profile (#3331)
2026-06-01 14:12:01 -07:00
nesquena-hermes 99b3745b01 Merge pull request #3359 from nesquena/release/stage-batch15
v0.51.203: sticky manual unpin for streaming chat scroll (#3343)
2026-06-01 13:44:57 -07:00
nesquena-hermes 720695a0c2 Merge pull request #3358 from nesquena/release/stage-batch14
v0.51.202: filter interrupted-recovery control text from visible transcript (#3321)
2026-06-01 13:23:59 -07:00
nesquena-hermes fa374f61d8 Merge pull request #3356 from nesquena/release/stage-batch13
v0.51.201: colored diff lines in tool-card snippets (#3336)
2026-06-01 13:04:00 -07:00
nesquena-hermes 1c6e34b7b6 Merge pull request #3354 from nesquena/release/stage-batch12
v0.51.200: remote-gateway health probe + ephemeral-turn-field preservation
2026-06-01 12:52:18 -07:00
nesquena-hermes b6e4899887 Merge pull request #3353 from nesquena/release/stage-batch11
v0.51.199: pinned-scroll recovery + inline-math currency false-positive
2026-06-01 12:25:17 -07:00
nesquena-hermes 9cad8980ff Merge pull request #3350 from nesquena/release/stage-batch10
v0.51.198: custom-provider reasoning model-id normalize + profile skill counts + run-adapter RFC slice
2026-06-01 11:41:21 -07:00
nesquena-hermes c5aed7654c Merge pull request #3349 from nesquena/release/stage-batch9
v0.51.197: stop agent replaying edited/undone messages (#3102)
2026-06-01 11:21:09 -07:00
nesquena-hermes 65d1728c81 Merge pull request #3348 from nesquena/release/stage-batch8
v0.51.196: file-manager external sessions + artifacts tool metadata + edge-toggle icon + type hints
2026-06-01 10:34:48 -07:00
nesquena-hermes 1fcd81e38e Merge pull request #3310 from nesquena/release/stage-batch7
v0.51.195: hide attachment path markers in chat UI (#3296)
2026-05-31 22:40:22 -07:00
nesquena-hermes 36fac9d0a3 Merge pull request #3309 from nesquena/release/stage-batch6
v0.51.194: profiles config-import-cycle fix (#3303)
2026-05-31 22:13:10 -07:00
nesquena-hermes 4591f53b0e Merge pull request #3308 from nesquena/release/stage-batch5
v0.51.193: ctl dotenv opt-out + workspace inline-open + gateway reply polish (3 PRs)
2026-05-31 21:53:32 -07:00
nesquena-hermes 763756ca55 Merge pull request #3302 from nesquena/docs/markdown-refresh
docs: refresh markdown, regenerate contributor tally (137→194), README IA pass
2026-05-31 19:40:01 -07:00
nesquena-hermes 4c7c65192c Merge pull request #3298 from nesquena/release/stage-batch4
v0.51.192: per-model context_length default-only guard (#3263, closes #3256) (stage-batch4)
2026-05-31 18:28:07 -07:00
nesquena-hermes 0488adc695 Merge pull request #3292 from nesquena/release/stage-batch3
v0.51.191: skills-detail markdown styling (#3284) + launchd duplicate-start guard (#3291) (stage-batch3)
2026-05-31 16:20:44 -07:00
nesquena-hermes e16f699313 Merge pull request #3287 from nesquena/add-github-funding
chore: add GitHub Sponsors funding config
2026-05-31 15:40:19 -07:00
nesquena-hermes e459acd81a Merge pull request #3282 from nesquena/release/stage-batch2
v0.51.190: Windows upgrade state-stranding hotfix (#2905) + gateway banner (#3194) + quiet tool previews (stage-batch2)
2026-05-31 12:44:46 -07:00
nesquena-hermes 1d4d40b16d Merge pull request #3277 from nesquena/release/stage-batch1
v0.51.189: ruff lint gate + SSE refresh dedupe + tooltip i18n (stage-batch1)
2026-05-31 11:39:37 -07:00
nesquena-hermes 78994c6a49 Merge pull request #3274 from nesquena/release/stage-batchH
v0.51.188: configured runner-client boundary, default-off (batchH, #3073)
2026-05-31 10:55:47 -07:00
nesquena-hermes 556f5d1c15 Merge pull request #3271 from nesquena/release/stage-batchG
v0.51.187: workspace-preview persistence + scroll-intent window (batchG)
2026-05-31 10:10:46 -07:00
nesquena-hermes e09bd013d9 Merge pull request #3269 from nesquena/release/stage-batchF
v0.51.186: update-checker ff-reachability fall-through + utf-8 git-output test coverage (batchF)
2026-05-31 09:33:52 -07:00
nesquena-hermes d4d87a901b Merge pull request #3251 from nesquena/release/stage-batchE
Release v0.51.185 — Release FE (stage-batchE): clarify-card bug-fix batch
2026-05-30 23:58:51 -07:00
nesquena-hermes 13c7f7157b Merge pull request #3244 from nesquena/release/stage-batchD
Release stage-batchD → v0.51.184 (raw audio mode #3169 + scroll-preserve #3237 + non-POSIX test skip #3235)
2026-05-30 22:12:02 -07:00
nesquena-hermes 83a45b6fe1 Merge pull request #3240 from nesquena/release/stage-batchC
Release stage-batchC → v0.51.183 (#3219 inline file:// media + #3234 /api/media secret-file confinement)
2026-05-30 21:21:15 -07:00
nesquena-hermes 0405fefb5e Merge pull request #3233 from nesquena/release/stage-batchB2
Release stage-batchB2 → v0.51.182 (consolidated client-disconnect handling #3210)
2026-05-30 19:06:43 -07:00
nesquena-hermesandnesquena-hermes 5b2cbe1323 ci: add headless browser smoke test (runtime brick-class gate) (#3231)
Boots the real server.py agent-free and loads the key pages in headless
Chromium, failing on any console error or uncaught JS exception. Catches the
runtime-JS brick class (const-reassign #3162, function/window collision
#2715/#2771) that node --check, ESLint, and the mocked pytest suite cannot see
because they only manifest when a real browser executes the page.

Credential-free: strips *_API_KEY from the env, drives no real model, needs no
secrets. Runs on every PR + push via .github/workflows/browser-smoke.yml.

Co-authored-by: nesquena-hermes <[email protected]>
2026-05-30 18:48:25 -07:00
nesquena-hermes 82fe933b5a Merge pull request #3221 from nesquena/release/stage-batchA
Release stage-batchA → v0.51.181 (agent-cache eviction teardown #3218 + streaming finalize race #3201)
2026-05-30 17:31:34 -07:00
nesquena-hermes 82f92eb78d Merge pull request #3216 from nesquena/release/stage-batch62
Release stage-batch62 → v0.51.180 (session/agent cache ownership hardening — #3191 + #3166)
2026-05-30 15:21:06 -07:00
nesquena-hermes f50aac68b2 Merge pull request #3213 from nesquena/release/stage-batch61
Release stage-batch61 → v0.51.179 (custom-provider reasoning efforts #3202 + clearer sidebar tooltips #3203)
2026-05-30 14:54:15 -07:00
nesquena-hermes e41fee1dfd Merge pull request #3212 from nesquena/release/stage-batch60
Release stage-batch60 → v0.51.178 (parallel sharded CI + shard-safe test suite, completes #3197)
2026-05-30 14:12:18 -07:00
nesquena-hermes 113c9791f8 Merge pull request #3207 from nesquena/release/stage-batch59
Release stage-batch59 → v0.51.177 (Docker smoke-test layer caching, #3197 docker half)
2026-05-30 13:14:31 -07:00
nesquena-hermes f8f1052d53 Merge pull request #3206 from nesquena/release/stage-batch58
Release stage-batch58 → v0.51.176 (sidebar attention indicators)
2026-05-30 13:07:44 -07:00
nesquena-hermes 0560a3fa8b Merge pull request #3205 from nesquena/release/stage-batch57
Release stage-batch57 → v0.51.175 (internal conversation links)
2026-05-30 12:23:12 -07:00
nesquena-hermes 05122e263d Merge pull request #3204 from nesquena/release/stage-batch56
Release stage-batch56 → v0.51.174 (CLI/gateway session usage in Insights, double-count fix)
2026-05-30 12:11:37 -07:00
nesquena-hermes 9f775d3f63 Merge pull request #3200 from nesquena/release/stage-batch55
Release stage-batch55 → v0.51.173 (Windows safety + pin-quota snapshot + tool-card paging anchor + sidebar dedupe + quieter tool cards)
2026-05-30 11:47:10 -07:00
nesquena-hermes 79145c0a39 Merge pull request #3198 from nesquena/release/stage-batch54
Release stage-batch54 → v0.51.172 (model-label fallback + dev cache-bust + tilde completion + cron project chips)
2026-05-30 11:11:32 -07:00
nesquena-hermes 7dc4273a21 Merge pull request #3168 from nesquena/release/stage-batch53
Release v0.51.171 — Release EQ (stage-batch53: tool-output badge #2867 + Neon opt-in skin)
2026-05-29 21:38:36 -07:00
nesquena-hermes 0fc38cecf8 Merge pull request #3167 from nesquena/release/stage-batch52
Release v0.51.170 — Release EP (stage-batch52: run-aware SSE replay cursors #3124)
2026-05-29 21:16:41 -07:00
nesquena-hermes d37e57f1ea Merge pull request #3165 from nesquena/release/stage-batch51
Release v0.51.169 — Release EO (stage-batch51: skill-toggle profile scoping #3066 + update-tag filter #3140 + Docker docs)
2026-05-29 20:54:34 -07:00
nesquena-hermes e8e93ad98c Merge pull request #3163 from nesquena/fix-3162
Release v0.51.168 — Release EN (hotfix #3162: mobile 'Failed to load conversation messages' + JS runtime-lint guard)
2026-05-29 20:31:14 -07:00
nesquena-hermes 9cd7729915 Merge pull request #3161 from nesquena/release/stage-batch49
Release v0.51.167 — Release EM (stage-batch49: iOS-style swipe actions for touch devices #2252)
2026-05-29 20:10:17 -07:00
nesquena-hermes abe87b9b3e Merge pull request #3156 from nesquena/release/stage-batch48
Release v0.51.166 — Release EL (stage-batch48: shared OpenCode runtime key #3145 + cron project-chip sessions #3134)
2026-05-29 19:26:02 -07:00
nesquena-hermes 3005811200 Merge pull request #3153 from nesquena/release/stage-batch47
Release v0.51.165 — Release EK (stage-batch47: stop EventSource reconnect storm #3103)
2026-05-29 19:15:40 -07:00
nesquena-hermes 832cf8e4be Merge pull request #3151 from nesquena/release/stage-batch46
Release v0.51.164 — Release EJ (stage-batch46: passive performance hardening)
2026-05-29 19:01:22 -07:00
nesquena-hermes e90ebd2394 Merge pull request #3149 from nesquena/release/stage-batch45
Release v0.51.163 — Release EI (stage-batch45: session duplicate/branch field propagation)
2026-05-29 18:37:35 -07:00
nesquena-hermes 24a266841a Merge pull request #3148 from nesquena/release/stage-batch44
Release v0.51.162 — Release EH (stage-batch44: conversation-filter clear button + title-lang regression coverage)
2026-05-29 18:13:04 -07:00
nesquena-hermes cbc74e33b8 Merge pull request #3147 from nesquena/release/stage-batch43
Release v0.51.161 — Release EG (stage-batch43: 3-PR live-display fixes)
2026-05-29 17:50:01 -07:00
nesquena-hermes c8afb37ae7 Merge pull request #3146 from nesquena/release/stage-batch42
Release v0.51.160 — Release EF (stage-batch42: 3-PR low-risk cleanup)
2026-05-29 16:55:24 -07:00
nesquena-hermes 95cee09c31 Merge pull request #3144 from nesquena/release/stage-batch41
Release v0.51.159 — Release EE (stage-batch41: 5-PR low-risk cleanup)
2026-05-29 15:28:50 -07:00
nesquena-hermes 1ebd1601d6 Merge pull request #3143 from nesquena/release/stage-batch40
Release v0.51.158 — Release ED (stage-batch40: 5-PR low-risk cleanup)
2026-05-29 15:11:11 -07:00
nesquena-hermes cf003ae986 Merge pull request #3096 from nesquena/release/stage-batch39
stage-batch39: v0.51.157 / Release EC — 5-PR mixed-risk cleanup
2026-05-28 13:08:40 -07:00
nesquena-hermes 5ec136af3b Merge pull request #3095 from nesquena/release/stage-batch38
stage-batch38: v0.51.156 / Release EB — 2-PR Tier B cleanup
2026-05-28 12:45:09 -07:00
nesquena-hermes 20f8c7c02d Merge pull request #3089 from nesquena/release/stage-batch37
stage-batch37: v0.51.155 / Release EA — 3-PR very low-risk cleanup
2026-05-28 11:47:06 -07:00
nesquena-hermes 6267716ba4 Merge pull request #3088 from nesquena/release/stage-batch36
stage-batch36: v0.51.154 / Release DZ — 9-PR medium-risk cleanup
2026-05-28 11:24:31 -07:00
nesquena-hermes b103f4ad68 Merge pull request #3081 from nesquena/release/stage-batch35
stage-batch35: v0.51.153 / Release DY — 11-PR low-risk cleanup
2026-05-28 10:46:25 -07:00
nesquena-hermes 5528e2c579 Merge pull request #3041 from nesquena/release/stage-batch34
stage-batch34: v0.51.152 / Release DX — optional gateway-backed browser chat
2026-05-27 20:40:43 -07:00
nesquena-hermes 4d6269eae6 Merge pull request #3038 from nesquena/release/stage-batch33
stage-batch33: v0.51.151 / Release DW — SSE reattach + title-lang + composer cap
2026-05-27 20:10:49 -07:00
nesquena-hermes 5bc3cdb3dd Merge pull request #3036 from nesquena/release/stage-batch32
stage-batch32: v0.51.150 / Release DV — single-PR reasoning-effort agent metadata
2026-05-27 19:23:36 -07:00
nesquena-hermes 1082a4108f Merge pull request #3034 from nesquena/release/stage-batch31
stage-batch31: v0.51.149 / Release DU — hyphenated session ids + prefill role consistency
2026-05-27 19:15:24 -07:00
nesquena-hermes 1d1daeb6c1 Merge pull request #3033 from nesquena/release/stage-batch30
stage-batch30: v0.51.148 / Release DT — single-PR Insights skill-usage reader
2026-05-27 18:50:31 -07:00
nesquena-hermes d9766d9e56 Merge pull request #3032 from nesquena/release/stage-batch29
stage-batch29: v0.51.147 / Release DS — single-PR streaming ownership-cleanup follow-up
2026-05-27 18:41:31 -07:00
nesquena-hermes 5edc7d15ae Merge pull request #3031 from nesquena/release/stage-batch28
stage-batch28: v0.51.146 / Release DR — 6-PR low-risk safety+contrast batch
2026-05-27 18:20:51 -07:00
nesquena-hermes 329debcd33 Merge pull request #3004 from nesquena/release/stage-batch27
Release DQ — stage-batch27 — sidebar running-state preservation (v0.51.145)
2026-05-26 22:13:57 -07:00
nesquena-hermes 3f22e54700 Merge pull request #3002 from nesquena/release/stage-batch26
Release DP — stage-batch26 — terminal supervisor hardening (v0.51.144)
2026-05-26 21:54:43 -07:00
nesquena-hermes 875ce4169a Merge pull request #3000 from nesquena/release/stage-batch25
Release DO — stage-batch25 — workspace:// markdown scheme (v0.51.143)
2026-05-26 21:28:39 -07:00
nesquena-hermes 620696b4a4 Merge pull request #2997 from nesquena/release/stage-batch24
Release DN — stage-batch24 — 4-PR fresh-today batch (v0.51.142)
2026-05-26 20:42:03 -07:00
nesquena-hermes 08e9ce3d8a Merge pull request #2992 from nesquena/release/stage-batch23
Release DM — stage-batch23 — 4-PR second hold-bucket pass (v0.51.141)
2026-05-26 17:46:00 -07:00
nesquena-hermes 83862e67aa Merge pull request #2990 from nesquena/release/stage-batch22
Release DL — stage-batch22 — 5-PR hold-bucket reassessment (v0.51.140)
2026-05-26 17:27:19 -07:00
nesquena-hermes 8bc3404932 Merge pull request #2989 from nesquena/release/stage-batch21
Release DK — stage-batch21 — 5-PR tier-2 batch (v0.51.139)
2026-05-26 17:10:22 -07:00
nesquena-hermes a6c65de2e8 Merge pull request #2988 from nesquena/release/stage-batch20
Release DJ — stage-batch20 — 7-PR ultra-safe batch (v0.51.138)
2026-05-26 16:58:47 -07:00
nesquena-hermes 48a2e79224 Merge pull request #2947 from nesquena/release/stage-batch19
Release DI — stage-batch19 — 6-PR medium-risk batch (v0.51.137)
2026-05-25 10:56:06 -07:00
nesquena-hermes 2577432f14 Merge pull request #2945 from nesquena/release/stage-batch18
Release DH — stage-batch18 — 5-PR streaming + session index batch (v0.51.136)
2026-05-25 10:25:05 -07:00
nesquena-hermes a0ab1687b1 Merge pull request #2944 from nesquena/release/stage-batch17
Release DG — stage-batch17 — 9-PR small-fix batch (v0.51.135)
2026-05-25 10:14:51 -07:00