Files
Understand-Anything/understand-anything-plugin
Lum1104andClaude Opus 4.7 fdfa331009 fix(merge): coerce malformed tags before adding "tested" (#113)
Codex flagged that prod_node.setdefault("tags", []) returns the existing
value when the key is present, so a raw LLM batch with tags=None or
tags="some string" would crash the whole merge on the next "tested" not
in tags membership check.

The TypeScript autoFixGraph normalizer that handles this case runs
downstream of merge-batch-graphs.py, not before it, so the Python side
has to defend itself. Coerce non-list tags to a fresh [] before the
membership/append.

Regression test exercises None / comma-string / single-string / int /
dict inputs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 10:25:56 +08:00
..