fix(honcho): sanitize dotted host fallback in workspace_id (#26459) - #26750
Closed
Tranquil-Flow wants to merge 1 commit into
Closed
fix(honcho): sanitize dotted host fallback in workspace_id (#26459)#26750Tranquil-Flow wants to merge 1 commit into
Tranquil-Flow wants to merge 1 commit into
Conversation
…rch#26459) When ``HonchoClientConfig.from_global_config`` falls back to ``resolved_host`` for ``workspace`` (no explicit ``workspace`` field in the host block or root), the resolved host is the dotted form ``hermes.<profile>``. Honcho's API rejects this against the ``^[a-zA-Z0-9_-]+$`` regex with ``string_pattern_mismatch``, and the plugin retries init once per minute, flooding the journal with warnings while memory is silently disabled. Rewrite ``.`` to ``_`` on the fallback path only. Explicit user-set ``workspace`` values are passed through unchanged so configuration mistakes surface as real API errors instead of being silently masked. This fix is scoped to the new-installs case the reporter described. Existing installs whose ``honcho.json`` outer keys are the dotted form (``hosts."hermes.X"``) keep working — the host_key lookup format is unchanged, only the workspace value sent to the API is sanitized.
Collaborator
Contributor
Author
|
Closing as graceful supersession by #26478 (@aqilaziz, opened 2026-05-15, ~1 day earlier). Both PRs sanitize dots to underscores on the fallback workspace ID path. @aqilaziz's PR has substantially broader coverage (+232/-54 vs ours +55/-2) — additionally migrates legacy dot-form host blocks when the CLI writes profile-scoped config and includes profile-rename handling, docs, and CI stabilizers. Going with theirs. Thanks @aqilaziz. |
1 task
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.
What does this PR do?
When `HonchoClientConfig.from_global_config` falls back to `resolved_host` for `workspace` (no explicit `workspace` field in the host block or root), the resolved host is the dotted form `hermes.`. Honcho's API rejects this against the `^[a-zA-Z0-9_-]+$` regex with `string_pattern_mismatch`, and the plugin retries init once per minute, flooding the journal with warnings while memory is silently disabled.
This PR rewrites `.` to `_` on the fallback path only. Explicit user-set `workspace` values are passed through unchanged so configuration mistakes surface as real API errors instead of being silently masked.
Related Issue
Fixes #26459
Type of Change
How was this tested?
Added regression coverage in `tests/honcho_plugin/test_client.py`:
Full `tests/honcho_plugin/` suite green.
Scope notes (what was deliberately NOT changed)
Checklist