Skip to content

feat(compose)+chore(oss): mistune markdown render + private-ref scrub - #23

Merged
nyashkn merged 1 commit into
mainfrom
chore/markdown-render-and-oss-scrub
Jun 9, 2026
Merged

nyashkn merged 1 commit into
mainfrom
chore/markdown-render-and-oss-scrub

Conversation

@nyashkn

@nyashkn nyashkn commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

Two changes bundled for one OSS-readiness pass:

1. `compose_record` now uses mistune for markdown rendering

The T33 composer's old `_markdown_to_html_paragraphs` rendered lists as one `

` blob and markdown tables as raw `|---|` text. Swap in `mistune>=3.0` with the GFM table + strikethrough + task_lists + autolink plugins and `escape=False` so the chart-embed snippets pass through intact.

  • Net surface change: lists, tables, blockquotes, inline code, links, h1-h6 all render correctly in `narrative.html` output.
  • Claim / chart ref-tag binding behaviour unchanged.
  • 835 / 835 tests pass.
  • Version bump `0.1.6` → `0.1.7` (new dep).

2. Private-ref scrub across 18 files

Replace internal hostnames + business + sibling-repo names so the public repo carries no inferences about author's internal infra:

Original Replacement
`growth_insights` `consumer-repo`
`nairomarket` / `naimarket` `your-business`
`kuze` / `kg_rust` `consumer-repo`
`kg_rust_embed_first` `consumer-repo-2`
`lan.ds.ke` `internal.example.com`
`infisical.lan.ds.ke` `infisical.internal.example.com`
`laminar-grpc.lan.ds.ke` `laminar-grpc.internal.example.com`

`LMNR_PROJECT_API_KEY_INSIGHT_KIT` env name retained — documents the "dedicated key per consumer" convention, not a leak.

Git history left intact (rewrite destroys SHAs that downstream consumers pin).

`.eval/` added to `.gitignore` — local demo artefacts no longer leak into tree.

Test plan

  • `uv run --with pytest pytest tests/ -q` → 835 / 835 pass.
  • Re-render `.eval/demo/shopify_meta_attr/narrative.html` via the example demo — verify lists, tables, and chart all render correctly.
  • `grep -rE "(nairomarket|growth_insights|kuze|lan\.ds\.ke|kg_rust)" src/ eval/ .html-kit/ SPEC.md tests/` → zero hits.

🤖 Generated with Claude Code

Two changes bundled for one OSS-readiness pass.

== Compose: real markdown rendering ==

The T33 compose_record used a naive paragraph-only converter that rendered
markdown lists as one <p> blob and tables as raw `|---|` text. Swap in
mistune>=3.0 with GFM table + strikethrough + task_lists + autolink
plugins and escape=False so the chart-embed snippets compose splices in
for <ClaimChart> tags pass through intact.

Net surface change: lists, tables, blockquotes, inline code, links,
headings (h1-h6), and ordered/unordered lists now render correctly in
narrative.html output. All 835 tests still pass — claim/chart ref
binding behaviour is unchanged.

Version bump 0.1.6 -> 0.1.7 to flag the new mistune dep to consumers.

== OSS scrub: private refs ==

Replace internal hostnames + business + sibling-repo names across 18
files in src/, eval/, .html-kit/, SPEC.md, and tests/ so the public
repo carries no inferences about the author's internal infra:

  growth_insights        -> consumer-repo
  nairomarket            -> your-business
  naimarket              -> your-business
  kuze                   -> consumer-repo
  kg_rust                -> consumer-repo
  kg_rust_embed_first    -> consumer-repo-2
  lan.ds.ke              -> internal.example.com
  infisical.lan.ds.ke    -> infisical.internal.example.com
  laminar-grpc.lan.ds.ke -> laminar-grpc.internal.example.com

`LMNR_PROJECT_API_KEY_INSIGHT_KIT` env name retained — it documents the
"use a dedicated key per consumer" convention, not a leak. Git history
left intact (rewriting destroys SHAs other repos may pin).

.eval/ added to .gitignore — local demo artefacts (shopify_meta_attr
compose output) don't belong in tree.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@nyashkn
nyashkn merged commit a980455 into main Jun 9, 2026
@nyashkn
nyashkn deleted the chore/markdown-render-and-oss-scrub branch June 9, 2026 03:13
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