Skip to content

Fix: skill node properties bypass namespace normalization, preventing max_iterations updates via MCP #1080

Closed

Description

@malibio

Problem

Skill nodes store properties flat (e.g. `{"max_iterations": 2}`) when seeded. When updating via MCP `update_node`, non-schema nodes go through `normalize_flat_properties_to_namespace` which wraps the new value into a namespaced format `{"skill": {"max_iterations": 4}}`. The deep merge then adds it under the namespace key, but `get_prop` checks the flat key first and always returns the original seeded value — so `max_iterations` can never be updated via MCP.

Root Cause

`node_service.rs` ~line 2791:

  • Schema nodes: skip normalization, deep merge directly ✅
  • All other nodes (including `skill`): normalize to namespace first, then merge

This means flat properties set during seeding are permanently shadowed.

Expected Behavior

`update_node` with `{"max_iterations": 4}` on a skill node should overwrite the existing flat `max_iterations` value.

Fix Options

  1. Add `skill` to the list of node types that bypass normalization (like `schema`)
  2. During seeding, store `max_iterations` under the namespaced key `{"skill": {"max_iterations": 2}}` so updates work consistently
  3. Have `get_prop` check namespaced key first (reverting precedence)

Broader Context

We want to manage prompt and skill nodes via MCP/database as the primary workflow (no rebuild cycle), with code as the fallback for fresh installs. This bug blocks that workflow for any numeric/non-string skill properties.

Labels

backend, bug

Metadata

Metadata

Assignees

Labels

backendbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions