Problem
The LLM Advisor Data MCP server validates only the outer decision-node shape before persisting a new node. Nested options are accepted without enforcing the browser application's actual contract.
For example, a schema-valid option containing "tools": [] can be written successfully, but the browser later dereferences option.tools[0].name while populating the workflow selector. That aborts advisor initialization for every visitor. Other malformed nested tools values can also reach rendering code.
This was identified in the capped round-nine review of branch agent/tools-impact-burndown and is intentionally deferred from that issue-burndown PR.
Acceptance criteria
- Define and enforce the complete nested decision-tree option/tool shape before persistence.
- Reject empty or malformed
tools arrays and unsupported fields.
- Validate both existing file contents and
add_decision_node inputs against the same contract.
- Add regression tests proving malformed nested options cannot be persisted.
- Confirm valid existing decision-tree data still loads and the browser advisor initializes successfully.
Problem
The LLM Advisor Data MCP server validates only the outer decision-node shape before persisting a new node. Nested options are accepted without enforcing the browser application's actual contract.
For example, a schema-valid option containing
"tools": []can be written successfully, but the browser later dereferencesoption.tools[0].namewhile populating the workflow selector. That aborts advisor initialization for every visitor. Other malformed nestedtoolsvalues can also reach rendering code.This was identified in the capped round-nine review of branch
agent/tools-impact-burndownand is intentionally deferred from that issue-burndown PR.Acceptance criteria
toolsarrays and unsupported fields.add_decision_nodeinputs against the same contract.