fix(title): don't let an unrecognised enabled value silently disable titling - #80382
Open
fabiosiqueira wants to merge 1 commit into
Open
fix(title): don't let an unrecognised enabled value silently disable titling#80382fabiosiqueira wants to merge 1 commit into
fabiosiqueira wants to merge 1 commit into
Conversation
…titling
`_auto_title_enabled()` reads the knob with
`is_truthy_value(..., default=True)`. That helper answers "is this truthy?",
which is the right question for an env var but the wrong one for a config
key whose documented default is on: `default=True` only applies when the key
is *absent* (`value is None`), so every unrecognised value is falsy.
The result is that the safe direction is a typo in the key, not in the value:
enabled: true -> True titling on
enabled: ture -> 'ture' titling OFF <- typo meant to enable
enbaled: false -> None titling on <- typo in the key
A user who mistypes the value while trying to turn titling *on* loses it,
with nothing in the log to say why — the same shape as the original
`enabled` bug from NousResearch#41744, arriving through the fix for it.
Recognise the falsy tokens explicitly and treat anything else as "not a
value I understand": keep the documented default and warn, naming the
offending value. Booleans, the truthy tokens and the falsy tokens all behave
exactly as before.
Scoped to this call site on purpose. `utils.is_truthy_value` is shared —
`env_var_enabled` passes `default=False`, where collapsing unrecognised into
False is correct — so the distinction belongs to the caller that has a
default of True, not to the helper. Seven call sites pass `default=True`
today; this is the one reported in NousResearch#41744.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fabiosiqueira
force-pushed
the
fix/title-enabled-unrecognised-value
branch
from
August 17, 2026 00:28
3a4c659 to
6d11a92
Compare
fabiosiqueira
added a commit
to fabiosiqueira/hermes-engine
that referenced
this pull request
Aug 17, 2026
Routine /fork-sync catch-up. Clean merge-tree dry run (0 conflicts, 8 files auto-merged: .gitignore, agent/agent_init.py, agent/curator.py, cron/scheduler.py, run_agent.py, tools/skill_manager_tool.py, tools/skill_usage.py, tools/skills_tool.py). Open upstream PRs NousResearch#74875, NousResearch#80382, NousResearch#78819, NousResearch#45809, NousResearch#27724 re-verified mergeable clean against the new tip; carry b1e8eb1 (skip_memory_provider) has no upstream route and stays local per prior audit.
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.
Follow-up to the
auxiliary.title_generation.enabledgate that #66049 landed(salvaging #37349), for the issue it was fixing: #41744.
The gap
_auto_title_enabled()(agent/title_generator.py:57) reads the knob withis_truthy_value(title_config.get("enabled"), default=True). That helper answers"is this truthy?" — the right question for an env var, the wrong one for a config
key whose documented default is on.
default=Trueapplies only when the key isabsent (
value is None), so every value the truthy set doesn't recognise isfalsy, and the safe direction ends up being a typo in the key, not in the value:
TRUTHY_STRINGSis{"1", "true", "yes", "on"}(utils.py:19), and YAML parsesan unquoted
tureas the string"ture". So a user who mistypes the value whiletrying to turn titling on silently loses it, with nothing in the log to say
why — the same failure shape #41744 reported, arriving through the fix for it.
cli-config.yaml.example:634documents the knob asenabled: true, which iswhat makes a value typo plausible in the first place.
The change
Recognise the falsy tokens explicitly and treat anything else as "not a value I
understand": keep the documented default and warn, naming the offending value.
Booleans, the truthy tokens and the falsy tokens all behave exactly as before —
enabled: false,no,off,0still disable titling.Scope
Deliberately at this call site, not in
utils.is_truthy_value. The helper isshared, and
env_var_enabledpassesdefault=False, where collapsingunrecognised into False is correct — the distinction belongs to callers whose
default is True. Seven call sites pass
default=Truetoday(
title_generator.py:68,verify_hooks.py:47,cli.py:12762,voice.py:259,web_routers/tools.py:96,delegate_tool.py:654,transcription_tools.py:162); this PR fixes the one reported in #41744 ratherthan assuming the same answer fits the other six. Happy to follow up on the rest
if you'd like it handled centrally.
Tests
tests/agent/test_title_generator.py— parametrised over recognised truthyvalues, recognised falsy values, unrecognised values (asserting titling stays on
and that the warning names the value), and the absent key. The unrecognised
cases fail on current
mainand pass with the change; the rest pass on both.32 passedfor the file.— 🤖 Claude Opus 5