P2 follow-up: native c[R]→c[p] bake + drop the report's last c[p]/kateri dependency#32
Open
drserajames wants to merge 3 commits into
Open
P2 follow-up: native c[R]→c[p] bake + drop the report's last c[p]/kateri dependency#32drserajames wants to merge 3 commits into
drserajames wants to merge 3 commits into
Conversation
…le_to_legacy)
Implements the stubbed Chart::semantic_style_to_legacy natively, reproducing
kateri's plotSpecLegacy().setFrom(currentPlotSpec): resolve a named c["R"]
semantic style to a concrete per-point spec (kateri PlotSpecSemantic.activate/
apply), then collapse to a unique-spec palette + per-point index list written
into the legacy plot spec (c["p"] = {"d","p","P"}). This makes native export
self-contained — the report no longer needs kateri to bake c["p"].
Resolution mirrors the validated native renderer (cc/map-draw/styled-draw.cc)
but tracks colours as kateri's ColorAndModifier (base string + deferred :pale)
rather than resolving to RGB, because the legacy F/O fields carry the colour
string, not a paled hex. Reference antigens use kateri's name-only + has-coord
rule; egg shape uses kateri's raw-passage regex for byte-exact fidelity.
Adds cc/chart/v3/semantic-to-legacy.cc (registered in meson.build) and a
Chart.semantic_style_to_legacy Python binding in cc/py/chart-v3.cc.
Verified against 21 kateri-baked golden charts (self-rebake): 0 per-antigen
legacy-fill diffs, 0 per-point palette-index diffs (mod colour normalisation
#CCCCCC->gray80 / hex case). Serum circles / serum coverage are not baked
(absent from the report's clades legacy styles, so lossless there).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…c["p"] legacy_fills() now resolves the clades-v10 SEMANTIC style (c["R"]) in-process via Chart.semantic_style_to_legacy instead of reading a pre-baked legacy plot spec (c["p"]). That stored c["p"] could only be produced by kateri (baked in prestyle), so multiple_circles was the last thing tying the report to a kateri-baked c["p"]. Resolving c["R"] removes that dependency — verified byte-equal fills (0 diffs across the report's charts). Downstream: prestyle no longer needs to bake c["p"] for multiple_circles, so a report run can skip that kateri step (separate follow-up in commander/prestyle). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
prestyle launched kateri solely to bake c["p"] (export_to_legacy + get_chart). Nothing consumes c["p"] anymore — multiple_circles resolves clade fills from c["R"] directly — so the bake is dead weight. Remove it: serialise the in-memory prestyled chart natively and mark prestyle @no_kateri, so it no longer launches kateri in any render mode. (export's kateri-branch bake at commander.py is likewise now vestigial, but is already skipped by the native default.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native semantic→legacy bake + eliminate the report's last
c["p"]dependencyStacked on #31 (base
p2-render-spike). Three commits that remove the final reason a report run needs kateri.Background
The report stores styling two ways: semantic named styles (
c["R"]) and a flat per-point legacy plot spec (c["p"]). Resolvingc["R"]→c["p"]("baking") was kateri-only, soprestylelaunched kateri just to bake it. The native map renderer and tree/signature pages already readc["R"]directly and ignorec["p"]; the only remainingc["p"]reader wasmultiple_circles.Changes
chart/v3: nativeChart.semantic_style_to_legacy(style_name)— implements the stubbed C++ bake (c["R"]→c["p"]), the in-process reproduction of kateri'splotSpecLegacy().setFrom(...). Verified 21/21 report charts exact vs the kateri-baked goldenc["p"](0 per-antigen fill diffs, 0 per-point palette-index diffs, after colour-string normalisation).report/multiple_circles: resolve fills fromc["R"], not storedc["p"]—legacy_fills()now resolves theclades-v10semantic style in-process via the native bake instead of reading a pre-baked legacy spec. Verified 0-diff fills across the report's charts.multiple_circleswas the lastc["p"]consumer.report/prestyle: drop the now-dead kateri bake — with nothing consumingc["p"],prestyle'sexport_to_legacy+get_chartround-trip is dead weight. Removed; the prestyled chart is serialised natively andprestyleis now@no_kateri(no kateri launch in any render mode).Effect
Combined with #31 (native default renderer + native
styled.acewrite), a batch report run now needs no kateri process for its headless generation steps. Kateri remains the interactive viewer (drag/Relax) and an opt-in render fallback.Notes