mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-10-11 21:25:05 +00:00
* fix(hermes): match config items with inline comments
The plugins.enabled / plugins.disabled item scan compared raw line text, so
a YAML inline comment became part of the value it matched against. Three
concrete failures followed on configs users can edit by hand:
- an existing enabled entry carrying a comment ("agency-agents-router # x")
was not recognized, so the plugin was appended a second time;
- a stale disabled entry carrying a comment was not removed, so the
installer reported "enabled plugin ... in config.yaml" while the plugin
stayed disabled;
- the corrupted-glue repair counted "- " in the whole line, so a comment
containing " - " was split into fake list entries: the installer silently
rewrote a comment such as "# keep - rotate this one first" into two
enabled entries.
Strip a trailing YAML comment ("#" only starts one after whitespace) before
matching, counting, and splitting, and use the same value helper in the
post-repair re-check so a quoted entry is recognized too. No config format
or install behavior change beyond those shapes.
check-hermes-config-rewrite.py gains four cases for them plus two general
invariants: the plugin appears exactly once, and the writer may not gain or
lose unrelated enabled entries outside the documented glue repair. The
suite fails on the previous code with exactly those four cases and passes
with this patch.
* test(hermes): pin a quoted entry that also carries a comment
Independent verification on the PR (phant0um) covered an existing quoted
entry with an inline comment (`- "agency-agents-router" # quoted`). The fix
recognizes it through the comment-stripped item value; pin that shape so it
cannot regress. On the previous code the extended suite fails with this case
plus the original four; with the fix all 21 cases pass.