You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(import,export): scope-aware writes, refuse dangerous categories by default
mythy import used to write every key the YAML mentioned as long as
the catalog didn't mark it READONLY="YES". That meant a hand-edited
YAML carrying e.g. CodeNum or EnableBoard_* could put a fielded
protection relay into a FATALE state requiring SET_DB_DEFAULT and a
physical power-cycle. Catalog markers exist to flag these cases but
mythy was ignoring them outside of READONLY.
Add two layers of scope filtering on writes, both gated on
locale-independent catalog attributes:
- SKIP="YES" — identification / IP / comm config. Writing any of
these over the live Modbus connection typically drops the
connection mid-transaction. Excluded by default; --include-skip
plus --yes-i-understand to opt in.
- VISIBILITY="3" — Administrator / Menu Riservato subtree, plus
DATA-level overrides like CodeNum. Cascades from the containing
group AND honored on the DATA element itself. Excluded by default;
--include-hidden plus --yes-i-understand.
- --all is shorthand for both opt-ins; READONLY="YES" stays a hard
mythy-side refuse (the device empirically does not enforce
read-only on the wire, so this defensive guard remains load-
bearing).
Path-based per-category opt-ins (--include-ntp, etc.) from the
original spec are dropped: top-level menu names are locale-dependent
(`Network Services` in us vs `Comandi` in it), and the catalog
attributes give a strictly better classification anyway. See the
design note pinned to the issue for the full reasoning.
Banner + abort: when an --include-* flag is set without
--yes-i-understand, the command prints the affected keys grouped by
reason and refuses to proceed. With --yes-i-understand the same
grouped banner prints before the writes hit the device, so even in
the CI case the operator has accountability output.
Export gains the symmetric flag set: --include-skip is new; --all is
new; --include-readonly/--include-hidden already existed. No
confirmation gate on export — it's read-only.
Closes#8
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments