Skip to content

Refresh interactive import graph HTML with proof-route colors #131

Description

@cameronfreer

The static blueprint/web/import_graph_colored.{svg,png} artifacts were refreshed in #129 with current modules and 3-way proof coloring (blue/green/orange for Martingale/L²/Koopman). The interactive import_graph_colored.html was deliberately left alone because regenerating it via lake exe graph file.html would have replaced the existing colored sigma.js view with the lake-default grayscale (colored by decl_count) — a visual regression on a user-facing "Interactive" link.

This issue tracks the proper follow-up.

The two stale HTMLs

File Current state Live Pages mitigation
blueprint/web/import_graph_colored.html Jan 2026 sigma.js view; pretty proof colors but missing modules added since (and includes some now-deleted ones) Pages serves whatever's in the repo via docgen-action — stale there too
blueprint/web/import_graph_full_declarations.html Feb 2026 doc-gen4 output; still mentions deleted decls (contractable_map_single / _pair / _comp, map_coords_apply) Pages copy is regenerated fresh by doc-gen4 on every push, so the user-facing "All declarations" link IS current — only the checked-in mirror is stale

What "proper" looks like for import_graph_colored.html

lake exe graph file.html produces a valid sigma.js viewer embedding a GEXF data block. The viewer uses node attributes for styling. Reproducing the proof coloring needs:

  1. Generate GEXF via lake exe graph /tmp/g.gexf (or extract from a fresh lake exe graph file.html).
  2. Inject per-node color attributes by namespace prefix — same 3-way scheme used in chore(blueprint): regenerate import_graph_colored {svg,png} (refresh) #129:
    • Exchangeability.DeFinetti.ViaMartingale.*#6baed6 (blue)
    • Exchangeability.DeFinetti.ViaL2.*#74c476 (green)
    • Exchangeability.DeFinetti.ViaKoopman.*#fd8d3c (orange)
    • Exchangeability.DeFinetti.Theorem*#fc9272 (red-ish)
    • default → #e0e0e0 (gray)
  3. Wrap the colored GEXF back into the lake HTML template (or re-embed in the existing HTML, replacing the JS-escaped GEXF string).
  4. Verify nodes render with the right colors in a browser.

Worth doing as a small Python script under scripts/ so future regens are reproducible (compare scripts/make_svg_clickable.py for the SVG counterpart).

Acceptance criteria

  • import_graph_colored.html regenerated from current graph data (not the Jan 2026 snapshot).
  • Node count matches the current import graph (currently 105).
  • No occurrences of the now-deleted names contractable_map_single, contractable_map_pair, contractable_comp, or map_coords_apply in the embedded data.
  • Proof-route colors match the SVG/PNG scheme established in chore(blueprint): regenerate import_graph_colored {svg,png} (refresh) #129 (blue/green/orange/red-ish/gray per the prefix table above).
  • Root Exchangeability umbrella node handled explicitly (mirrors the make_svg_clickable.py fix from chore(blueprint): regenerate import_graph_colored {svg,png} (refresh) #129).
  • Browser smoke test confirms sigma.js loads, all 105 nodes render, and the proof-family color groups are visually distinguishable.

Separate decision for import_graph_full_declarations.html

The checked-in mirror is purely a staleness liability — the live Pages copy is always regenerated fresh by doc-gen4 on every push. Two options:

  • Stop tracking the mirror (git rm blueprint/web/import_graph_full_declarations.html) and rely solely on the Pages-deployed version. The live "All declarations" link stays — the goal here is to stop the checked-in copy from drifting, not to remove the live artifact.
  • Add a CI commit-back step that takes the doc-gen4 output and commits it to blueprint/web/ on a schedule (more complex, probably not worth it given Pages is already current).

I'd lean toward stopping tracking, but it's a small workflow choice not a release blocker.

Why not block on this

Both files are linked from README.md and home_page/index.md as absolute Pages URLs (https://cameronfreer.github.io/exchangeability/blueprint/...). The user-facing "All declarations" link is live-correct via doc-gen4; the user-facing "Interactive" link is live-stale but cosmetic (the static SVG/PNG cover the "colored module graph" claim accurately). v1.3 is out and the primary user touchpoints are fresh.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions