Skip to content

fix(gateway): use connector-owned no-clobber guard for relay thread rename + trace logs - #75912

Merged
benbarclay merged 2 commits into
mainfrom
fix/rename-connector-owned-guard
Aug 1, 2026
Merged

fix(gateway): use connector-owned no-clobber guard for relay thread rename + trace logs#75912
benbarclay merged 2 commits into
mainfrom
fix/rename-connector-owned-guard

Conversation

@benbarclay

Copy link
Copy Markdown
Collaborator

Use connector-owned no-clobber guard for relay thread rename + trace logs

Live staging (2026-08-01): relay semantic thread rename still declined silently despite #74482 (feedback cache) and #75581 (registration/poll ordering) both deployed — thread kept its initial-words name, session title generated fine.

Root cause (full write-up in the paired connector PR): the only_if_current_name no-clobber guard is a cross-repo byte-for-byte string match. The gateway cannot reliably reproduce the thread's initial name (the connector derives it with mention-stripping + whitespace-collapse + truncation at creation), so the connector's guard check always failed and returned a silent success:false.

Fix (gateway half):

  • The relay rename lane now passes prefer_connector_created=True instead of the fragile initial-name string. The connector resolves the guard from its own created-name memory (paired NousResearch/gateway-gateway#192 — only_if_connector_created, additive).
  • Native-marker lane is unchanged: it keeps the legacy only_if_current_name string, because there the source carries the real initial name and the local Discord adapter reads the live name itself.
  • rename_thread: new prefer_connector_created param → only_if_connector_created on the wire, taking precedence over the legacy string.
  • INFO logs at rename dispatch (thread / lane / new_title) and result (applied=bool). This entire multi-round hunt was slow because the gateway rename lane logged only at debug — invisible in prod. The outcome is now visible in fly logs.

Tests

Relay suite 149 passed · ruff + Windows-footguns clean.

Deploy note: needs the paired connector PR live too (the connector must understand only_if_connector_created). Old connectors ignore the flag and fall back — so deploy connector first, then this. After the fleet image roll, the new INFO logs will show applied=true (or the connector's decision log will show why not) — verify via logs before manual re-test.

…ename + trace logs

Live staging (2026-08-01): relay semantic thread rename still declined
silently despite both #74482 and #75581 deployed — thread kept its
initial-words name, session title generated fine. Root cause is the
no-clobber guard string mismatch (see paired gateway-gateway PR): the
gateway can't reproduce the thread's initial name byte-for-byte, so the
connector's only_if_current_name check always failed.

- relay rename lane now passes prefer_connector_created=True instead of
  the fragile initial-name string; the connector resolves the guard from
  its own created-name memory. Native-marker lane keeps the legacy
  only_if_current_name string (source carries the real initial name).
- rename_thread: prefer_connector_created param -> only_if_connector_created
  on the wire, precedence over the legacy string.
- INFO logs at rename dispatch (thread/lane/new_title) and result
  (applied=bool): the whole failure hunt needed telemetry the gateway
  never emitted — this makes the outcome visible in fly logs.

Tests: connector-guard wire shape + precedence over legacy string; the
title-turn race test updated to assert the connector-owned guard. Relay
suite 149 passed; ruff + footguns clean.
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 39b80d8

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

2 visual diffs.

inline evidence upload failed.

Failed to upload diff-1508682a2ae8-boot-ready-diff.png with gh image (exit code 1): Error uploading /home/runner/work/_temp/e2e-evidence/diff-1508682a2ae8-boot-ready-diff.png: step 0 (get upload token): uploadToken not found on repo page — do you have write access to NousResearch/hermes-agent? (or, if NousResearch enforces SAML SSO, authorize at https://github.com/orgs/NousResearch/sso)

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery platform/discord Discord bot adapter blocked Waiting on external dependency or decision sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages labels Aug 1, 2026
@benbarclay
benbarclay merged commit fed098b into main Aug 1, 2026
38 checks passed
@benbarclay
benbarclay deleted the fix/rename-connector-owned-guard branch August 1, 2026 16:28
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…ename + trace logs (NousResearch#75912)

Live staging (2026-08-01): relay semantic thread rename still declined
silently despite both NousResearch#74482 and NousResearch#75581 deployed — thread kept its
initial-words name, session title generated fine. Root cause is the
no-clobber guard string mismatch (see paired gateway-gateway PR): the
gateway can't reproduce the thread's initial name byte-for-byte, so the
connector's only_if_current_name check always failed.

- relay rename lane now passes prefer_connector_created=True instead of
  the fragile initial-name string; the connector resolves the guard from
  its own created-name memory. Native-marker lane keeps the legacy
  only_if_current_name string (source carries the real initial name).
- rename_thread: prefer_connector_created param -> only_if_connector_created
  on the wire, precedence over the legacy string.
- INFO logs at rename dispatch (thread/lane/new_title) and result
  (applied=bool): the whole failure hunt needed telemetry the gateway
  never emitted — this makes the outcome visible in fly logs.

Tests: connector-guard wire shape + precedence over legacy string; the
title-turn race test updated to assert the connector-owned guard. Relay
suite 149 passed; ruff + footguns clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Waiting on external dependency or decision comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/discord Discord bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants