mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-09-08 03:00:51 +03:00
ensure_hermes_plugin_enabled() hardcoded a 2-space indent for the inserted `- agency-agents-router` line. Hermes writes plugins.enabled items at 4 spaces, so the new line and the next existing item collapsed into one plain scalar ("agency-agents-router - disk-cleanup") and every previously enabled plugin silently dropped (#839, and #689 diagnosed the same in July). The inserter now matches the existing item indent (default 4), appends after existing entries so order is preserved, and is idempotent on re-run. scripts/check-hermes-config-rewrite.{sh,py} runs seven regression cases; a small workflow runs it on every PR.
Reproduced on main with a 4-space config and verified fixed with this patch; installer suite 36/0; the regression script passes 7/7.
Fixes #839. Closes #689 (same fix, proposed first by @harshsinghmp).
Co-Authored-By: Harsh Singh <32476777+harshsinghmp@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
19 lines
769 B
Bash
Executable File
19 lines
769 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# check-hermes-config-rewrite.sh — regression test for the
|
|
# ensure_hermes_plugin_enabled() heredoc in scripts/install.sh.
|
|
#
|
|
# Reproduces and guards against the indent bug: the previous heredoc hardcoded
|
|
# a 2-space indent when inserting into plugins.enabled, which broke any
|
|
# config that used a different list-item indent (Hermes' default is 4 spaces).
|
|
# Symptom: plugins.enabled collapses onto one line as a plain scalar string
|
|
# when re-parsed, and the script's idempotency check fails to detect that
|
|
# the plugin is already there.
|
|
#
|
|
# Usage: ./scripts/check-hermes-config-rewrite.sh
|
|
# Exits non-zero on any failure. Mirrors scripts/check-X.sh style.
|
|
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
python3 scripts/check-hermes-config-rewrite.py |