Problem
Fast follow to #978. Once the display-config keys have a type, the same keys need checking at runtime, because most of them arrive from places no type checker ever sees: notebook calls, JSON on the wire, and project display files loaded through exec (server/xorq_loading.py).
Today a malformed value either raises inside style_column — costing that column its styling — or is silently ignored. After #977 the two known cases are ignored: a non-dict ag_grid_specs and a non-list delete_keys (customizations/styling.py:137,143). Silently ignoring a typo conflicts with wanting a broken setup to be obvious; it just moves the failure from loud-and-wrong to quiet-and-wrong.
Suggested fix
Check init_sd and column_config_overrides where they enter, rather than at the point of use:
Keep the guards at the point of use regardless: entry validation can't cover a ColAnalysis subclass that contributes a bad value into the sd from inside the pipeline.
Context
Split out of #978 as the runtime half. Related: #976 (validating the configs styling produces, i.e. the other end of the same pipe), #977 (the guards that prompted this), #971.
Problem
Fast follow to #978. Once the display-config keys have a type, the same keys need checking at runtime, because most of them arrive from places no type checker ever sees: notebook calls, JSON on the wire, and project display files loaded through
exec(server/xorq_loading.py).Today a malformed value either raises inside
style_column— costing that column its styling — or is silently ignored. After #977 the two known cases are ignored: a non-dictag_grid_specsand a non-listdelete_keys(customizations/styling.py:137,143). Silently ignoring a typo conflicts with wanting a broken setup to be obvious; it just moves the failure from loud-and-wrong to quiet-and-wrong.Suggested fix
Check
init_sdandcolumn_config_overrideswhere they enter, rather than at the point of use:displayer_args/ag_grid_specsdicts,delete_keysa list of strings,highlight_*strings).delete_keys: 'tooltip_config'is accepted as the single key (fix(styling): make base styling survive malformed init_sd, keep default_styling as the fallback hook #977 already does this) — it's a typo with an unambiguous intent, unlike the others.Keep the guards at the point of use regardless: entry validation can't cover a
ColAnalysissubclass that contributes a bad value into the sd from inside the pipeline.Context
Split out of #978 as the runtime half. Related: #976 (validating the configs styling produces, i.e. the other end of the same pipe), #977 (the guards that prompted this), #971.