2.2 KiB
2.2 KiB
Verification Rules for Infrastructure Changes
Never invent config keys
If you're about to set a configuration value, confirm the key actually exists in the software first.
Bad pattern:
fallback_providers:
- provider: ollama-local
model: qwen2.5:7b
Hermes has no fallback_providers key. This silently did nothing. The user rightfully called this out.
Right pattern:
- Check the software's docs or
--helpfor the config option - If docs are offline, check the source code
- If you can't confirm it exists, ask the user or use a different approach
- A config key that does nothing is worse than no config change at all — it gives false confidence
Verify before reporting success
Every "should work" assertion that turned out wrong erodes trust. Apply the same bar to config changes that you do to terminal commands:
- Before: "I set fallback_providers, now Hermes will auto-fail over to the local model"
- After writing the config, check: does the software even have a
fallback_providerskey? - After: "do not invent config keys without verifying" — direct user correction
Key verification for copy-paste operations
When copying an API key from one config file to another:
- Read both files as raw bytes/hex
- Confirm the destination key is byte-identical to the source key
- The display layer may redact keys with
...— the raw file contains the real key. Don't copy the displayed version. - Use
repr()or hex dump to compare, not visual inspection of the truncated display
Gateway restart in single-process environments
When Hermes runs as a single systemd service (gateway mode), you cannot restart it from within itself. Use these workarounds:
# Via busctl (works without spawning a second process)
XDG_RUNTIME_DIR=/run/user/0 busctl call --user org.freedesktop.systemd1 \
/org/freedesktop/systemd1 org.freedesktop.systemd1.Manager \
RestartUnit 'ss' '<service>.service' 'replace'
# For profile-specific gateways (e.g., Anita profile):
KY_PROFILE=anita
service_name="hermes-gateway-$KY_PROFILE"
XDG_RUNTIME_DIR=/run/user/0 busctl call --user org.freedesktop.systemd1 \
/org/freedesktop/systemd1 org.freedesktop.systemd1.Manager \
StartUnit 'ss' "$service_name.service" 'replace'