Summary
validate_chart silently accepts nonexistent chartProperties and options keys — it returns valid: true, warnings: []. Agents (and humans) get no signal that a knob does not exist, so they retry blindly.
Verified against flint-chart@0.3.0. Source refs at main (commit 95b2552).
Repro
→ { "valid": true, "warnings": [], "errors": [] }
None of lineWidth, pointSize, totallyFakeKnob, fontSize, bogusOption exist for a Line Chart, yet nothing is reported.
Root cause
packages/flint-js/src/core/normalize-properties.ts (normalizeChartProperties) validates discrete property values against the template's declared options, but never checks whether a chartProperties key exists in chartTemplate.properties. options keys are not validated at all. No unknown-key check exists in the pipeline.
Suggested fix
In normalizeChartProperties (and/or the validate path), diff the incoming keys against the template's known option keys (chartTemplate.properties.map(p => p.key) — the same model that drives the customization panel) and the recognized AssembleOptions names, and push a warning per unknown key:
unknown chartProperty "lineWidth" for Line Chart; available: [cornerRadius, ...]
Keep it a warning, not an error, for forward compatibility.
Summary
validate_chartsilently accepts nonexistentchartPropertiesandoptionskeys — it returnsvalid: true, warnings: []. Agents (and humans) get no signal that a knob does not exist, so they retry blindly.Verified against
flint-chart@0.3.0. Source refs atmain(commit95b2552).Repro
{ "chart_spec": { "chartType": "Line Chart", "encodings": { "x": { "field": "x" }, "y": { "field": "y" } }, "chartProperties": { "lineWidth": 5, "pointSize": 12, "totallyFakeKnob": true } }, "options": { "fontSize": 18, "bogusOption": "xyz" } }→
{ "valid": true, "warnings": [], "errors": [] }None of
lineWidth,pointSize,totallyFakeKnob,fontSize,bogusOptionexist for a Line Chart, yet nothing is reported.Root cause
packages/flint-js/src/core/normalize-properties.ts(normalizeChartProperties) validates discrete property values against the template's declared options, but never checks whether achartPropertieskey exists inchartTemplate.properties.optionskeys are not validated at all. No unknown-key check exists in the pipeline.Suggested fix
In
normalizeChartProperties(and/or the validate path), diff the incoming keys against the template's known option keys (chartTemplate.properties.map(p => p.key)— the same model that drives the customization panel) and the recognizedAssembleOptionsnames, and push a warning per unknown key:Keep it a warning, not an error, for forward compatibility.