Skip to content

4/7 A capability registry that proves itself - #305

Closed
Alek99 wants to merge 2 commits into
claude/customization-capability-matrix-vckjxg-3-mark-plugin-apifrom
claude/customization-capability-matrix-vckjxg-4-capability-registry
Closed

4/7 A capability registry that proves itself#305
Alek99 wants to merge 2 commits into
claude/customization-capability-matrix-vckjxg-3-mark-plugin-apifrom
claude/customization-capability-matrix-vckjxg-4-capability-registry

Conversation

@Alek99

@Alek99 Alek99 commented Jul 26, 2026

Copy link
Copy Markdown
Member

Stacked on #304.

The pattern, and the half of it that was missing

benchmarks/categories.py is the thing this repo already got right: one committed registry, stable ids, every harness keying off it. It left one gap — nothing asserts that the committed markdown matches the registry, so spec/benchmarks/results.md is hand-maintained and can drift. Customization had neither half.

python/xy/styling/capabilities.py is the registry: one entry per mark style property and per chrome slot, each with its support level in the WebGL client, the SVG writer, and the native rasterizer, plus the extension points and the divergences no style property selects.

Two rules make it evidence rather than prose

It cannot drift from the code. tests/test_capability_registry.py asserts the registry covers exactly CHART_DOM_SLOTS and exactly the property set styles.py compiles. A new property with no entry fails; so does an entry for a property that was removed. I verified the guard bites by adding a fake paint-order property and watching the suite go red.

A planned row additionally has to still be refused by compile_mark_style — so a property cannot ship while the matrix keeps understating it. That direction is the easy one to miss.

It does not restate what the code already knows. Which mark kinds accept a property is read from styles.py at access time, never typed out, so there is no second list to keep in sync.

scripts/gen_capability_matrix.py generates both the spec page and the public docs page from the same registry; --check fails when either is stale, the suite runs it, and it is wired into verify_local.py's quick checks. That closes the loop the benchmark side left open.

The rows a flattering table would omit

  • stroke-linejoin sits at planned with the WebGL blocker written out
  • 22 of 23 slots are none outside the browser
  • 2 of 3 extension points are planned
  • the polyline join default is recorded as a live divergence

Those rows are the reason to believe the rest.

uv run pytest 2347 passed.


Generated by Claude Code

`benchmarks/categories.py` is the pattern this repo already got right: one
committed registry, stable ids, every harness keying off it. It left one gap —
nothing asserts that the committed markdown matches the registry, so
`spec/benchmarks/results.md` is hand-maintained and can drift. Customization
had neither half.

`python/xy/styling/capabilities.py` is the registry: one entry per mark style
property and per chrome slot, each with its support level in the WebGL client,
the SVG writer, and the native rasterizer, plus the extension points and the
divergences no style property selects.

Two rules make it evidence rather than prose, and both are enforced:

It cannot drift from the code. `tests/test_capability_registry.py` asserts the
registry covers exactly `CHART_DOM_SLOTS` and exactly the property set
`styles.py` compiles — a new property with no entry fails, and so does an entry
for a property that was removed. A `planned` row additionally has to still be
*refused* by `compile_mark_style`, so a property cannot ship while the matrix
keeps understating it.

It does not restate what the code already knows. Which mark kinds accept a
property is read from `styles.py` at access time, never typed out, so there is
no second list to keep in sync.

`scripts/gen_capability_matrix.py` generates both the spec page and the public
one from the same registry; `--check` fails when either is stale, and the suite
runs it. That closes the loop the benchmark side left open.

The registry also carries what a flattering table would omit: `stroke-linejoin`
sits at `planned` with the WebGL blocker written out, 22 of 23 slots are `none`
outside the browser, two of three extension points are `planned`, and the
polyline join default is recorded as a live divergence. Those rows are the
reason to believe the rest.
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bf432100-b3a5-4b13-b379-026e483212c5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/customization-capability-matrix-vckjxg-4-capability-registry

Comment @coderabbitai help to get the list of available commands.

A fresh-agent evaluation of the finished stack — hand it the clone, ask 'is xy
more customizable than Plotly?' — returned the right three-part answer and then
found a defect nothing else had: the comparison document quoted 15 axis style
keys after a 16th (tick_label_anchor) had shipped, and no test pinned it.

capabilities.axis_style_keys() reads the vocabulary out of styles.py the same
way the mark-property rows already do, and summary() publishes the count, so
the number has one source instead of living in a sentence someone has to
remember to update.
@codspeed-hq

codspeed-hq Bot commented Jul 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 103 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing claude/customization-capability-matrix-vckjxg-4-capability-registry (5d8e9c4) with main (62462ec)2

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on claude/customization-capability-matrix-vckjxg-3-mark-plugin-api (497e28d) during the generation of this report, so main (62462ec) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Alek99 Alek99 closed this Jul 26, 2026
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.

1 participant