fix: skill memory keys breaking unrestricted node permissions

Only extend read_keys/write_keys with skill memory keys when the
list was already non-empty (restricted). An empty list means "allow
all" — adding _-prefixed skill keys to an empty list accidentally
activated the permission check and blocked legitimate reads.
This commit is contained in:
Timothy
2026-03-16 19:27:48 -07:00
parent 6e0255ebec
commit f49e7a760e
+5 -3
View File
@@ -1831,16 +1831,18 @@ class GraphExecutor:
# unchanged — empty means "allow all".
read_keys = list(node_spec.input_keys)
write_keys = list(node_spec.output_keys)
# Only extend lists that were already restricted (non-empty).
# Empty means "allow all" — adding keys would accidentally
# activate the permission check and block legitimate reads/writes.
if read_keys or write_keys:
from framework.skills.defaults import SHARED_MEMORY_KEYS as _skill_keys
# Also include any _-prefixed keys already written to memory
existing_underscore = [k for k in memory._data if k.startswith("_")]
extra_keys = set(_skill_keys) | set(existing_underscore)
for k in extra_keys:
if k not in read_keys:
if read_keys and k not in read_keys:
read_keys.append(k)
if k not in write_keys:
if write_keys and k not in write_keys:
write_keys.append(k)
scoped_memory = memory.with_permissions(