Skip to content

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

Merged
malibio merged 3 commits into
mainfrom
feature/issue-1080-namespace-first-property-lookup
Apr 11, 2026
Merged

malibio merged 3 commits into
mainfrom
feature/issue-1080-namespace-first-property-lookup

Conversation

@malibio

@malibio malibio commented Apr 11, 2026

Copy link
Copy Markdown
Collaborator

Closes #1080

Michael Libio and others added 3 commits April 11, 2026 19:53
…at values (#1080)

- Flip get_prop() lookup order: check namespaced key first, flat fallback second
  so MCP updates (which normalize to namespace) aren't shadowed by pre-normalization
  flat values stored in older databases
- Update SkillNodeBehavior::validate() to use get_namespaced_prop() so validation
  runs against the actual stored value (namespaced after create_node normalization)
- Add get_namespaced_prop() helper in behaviors/mod.rs with namespace-first order
- Fix 3 stale agent tool tests left broken by #1091: tool count 12→13,
  create_node required field title→content, create_node_missing_required test

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Adds get_prop_namespace_overrides_stale_flat test that directly documents
the failure mode: flat {"max_iterations": 2} coexisting with namespaced
{"skill": {"max_iterations": 4}} after an MCP update, ensuring namespace wins.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@malibio

malibio commented Apr 11, 2026

Copy link
Copy Markdown
Collaborator Author

Review addressed

✅ Addressed: Added regression test get_prop_namespace_overrides_stale_flat that directly documents the bug scenario — flat {"max_iterations": 2} coexisting with namespaced {"skill": {"max_iterations": 4}} after an MCP update.

⏭️ Skipped (with reasoning):

  • Cross-crate duplication (get_prop / get_namespaced_prop): Structural constraint — core and agent are separate crates with different dependency directions. Consolidation would require a new shared utility crate, which is out of scope for this bug fix.
  • Doc comment nit on get_namespaced_prop_str: Trivial; existing comment is accurate.

@malibio
malibio merged commit af3f9a1 into main Apr 11, 2026
@malibio
malibio deleted the feature/issue-1080-namespace-first-property-lookup branch April 11, 2026 18:03
malibio added a commit that referenced this pull request Jun 22, 2026
… max_iterations updates via MCP (#1095)

* Fix: namespace-first property lookup so MCP updates override stale flat values (#1080)

- Flip get_prop() lookup order: check namespaced key first, flat fallback second
  so MCP updates (which normalize to namespace) aren't shadowed by pre-normalization
  flat values stored in older databases
- Update SkillNodeBehavior::validate() to use get_namespaced_prop() so validation
  runs against the actual stored value (namespaced after create_node normalization)
- Add get_namespaced_prop() helper in behaviors/mod.rs with namespace-first order
- Fix 3 stale agent tool tests left broken by #1091: tool count 12→13,
  create_node required field title→content, create_node_missing_required test

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Fix linting and formatting

* Address review: add regression test for #1080 bug scenario

Adds get_prop_namespace_overrides_stale_flat test that directly documents
the failure mode: flat {"max_iterations": 2} coexisting with namespaced
{"skill": {"max_iterations": 4}} after an MCP update, ensuring namespace wins.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Michael Libio <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant