The Tag Linter: How I Catch Untagged n8n Nodes Before They Reach Production
说明与用途
一个 linter 脚本发现,在 n8n 中重命名节点会导致其策略标签失效,留下一个无保护的有副作用节点,可能导致重复警报。
问题
Renaming a node caused its policy tags to become stale, leaving an effectful node unprotected and risking duplicate alerts.
结果
The linter identified 7 violations across 21 workflows, including 3 untagged effectful nodes, 2 stale entries, and 2 missing idempotent declarations, preventing potential duplicate alerts.
工作流
- Parse workflow JSON
- Classify each node by heuristic (HTTP method, email, slack, etc.)
- Verify every effectful node has a policy entry with kind and idempotent field
- Check that every policy entry matches an existing node by UUID
- Fail if heuristic says effectful but policy says pure
- Warn on renamed nodes and update labels
- Fail if effectful node has retry enabled without idempotent key
证据
I renamed a node. That is the whole incident.
The node was an HTTP POST to a Discord webhook, added during a debugging session and left in place because the alerts turned out to be useful.
The linter is a small Node script, lint-node-tags.js, that runs inside the pre-publish gate... Three checks...
I ran it over 21 workflow files — the free templates in the repo plus my production set. Seven violations:
- 记录日期: 2026-10-14T10:41:29.845Z