Layered configuration — the unified config tree, agent config, and the XML/empathy config layer
Failure modes
| Symptom | Cause | Fix | Severity |
|---|---|---|---|
AttributeError mixing the two configs |
Treating a UnifiedConfig like an AttuneConfig (or vice versa) |
They are different types — use one tree's API consistently | high |
| Env override ignored | Variable not ATTUNE_/EMPATHY_-prefixed, or set after load |
Prefix correctly; reload after setting | medium |
validate_config reports errors |
A section value is out of range/invalid | Read each ValidationError; fix the named field |
medium |
get_value/set_value KeyError |
Key path not in get_all_keys() |
List get_all_keys() first |
low |
| XML config changes not seen elsewhere | Replaced a local instance, not the global | Use set_config() to swap the global instance |
medium |
Risk areas
- Two return types.
load_config→AttuneConfig;load_unified_config→UnifiedConfig. Don't cross their APIs. - Env precedence.
ATTUNE_wins overEMPATHY_wins over file. - Global XML config.
get_config/set_configoperate on a shared instance; a localEmpathyXMLConfig(...)is not the global one.
Diagnosis order
- Which tree are you on?
type(cfg).__name__. - For the unified tree,
validate_config(cfg)then read each error. - For env issues, confirm the
ATTUNE_/EMPATHY_prefix and load order. - For key-path issues,
cfg.get_all_keys().