fix(gateway): use connector-owned no-clobber guard for relay thread rename + trace logs - #75912
Merged
Merged
Conversation
…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.
Contributor
૮ >ﻌ< ა ci reviewran on 39b80d8 ℹ️ InfoDesktop E2E visual evidence · View test artifacts · View job2 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) |
1 task
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.
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.
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_nameno-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 silentsuccess:false.Fix (gateway half):
prefer_connector_created=Trueinstead 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).only_if_current_namestring, because there the source carries the real initial name and the local Discord adapter reads the live name itself.rename_thread: newprefer_connector_createdparam →only_if_connector_createdon the wire, taking precedence over the legacy string.thread / lane / new_title) and result (applied=bool). This entire multi-round hunt was slow because the gateway rename lane logged only atdebug— 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 showapplied=true(or the connector's decision log will show why not) — verify via logs before manual re-test.