You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Patch76's homeassistant-ai#1431-aware re-review (verdict: mechanism "solid... ready").
Three non-blocking items addressed:
1. Narrow the settings-lookup except (util_helpers.py). build_skill_content
and attach_skill_content wrapped get_global_settings() in a bare
`except Exception`, masking programming bugs (AttributeError/ImportError)
the same as a genuine config issue. Narrowed both to
`except ValidationError` (the realistic Settings() config-load failure
named in the existing comment) so real bugs now surface, per the repo's
narrow-except convention. Also flipped the attach_skill_content fallback
from `master_on = True` to `False`: on a settings-fetch failure we can't
know the master state, so suppress the vendor-missing warning rather
than emit a misleading one whose true cause was the settings fetch.
2. e2e skill_content delivery now covers all six write tools:
- test_skill_content_delivery.py: parametrized on/off coverage for
script / scene / helper / dashboard (hint-is-first-key + canonical
files on default; suppression on MandatoryBPS=False). Automation keeps
its explicit tests incl. the BP-warning section-slice.
- test_yaml_config.py: TestYamlConfigSkillContentDelivery (on/off) using
the module's mcp_client_with_yaml_config fixture (ha_config_set_yaml is
feature-flag + component gated, can't share the automation-dir fixtures).
The six tools have distinct success-return shapes where an ordering or
wrong-dict bug would slip past the structural AST test.
3. test_skill_loader.py: test_resolve_skill_files_rejects_absolute_path
(`/etc/passwd` passed directly) — guards the traversal check against a
future refactor to a naive prefix match.
Test bookkeeping for #1: test_settings_load_raises_returns_empty now feeds a
real pydantic.ValidationError (via _make_validation_error()) instead of a
plain ValueError, and test_settings_load_propagates_unexpected_error pins
that a non-config error (AttributeError) is NOT swallowed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments