Gap analysis + ported remend conformity corpus - #13
Closed
jonathanKingston wants to merge 2 commits into
Closed
jonathanKingston wants to merge 2 commits into
jonathanKingston wants to merge 2 commits into
Conversation
Compares @copse/streaming-markdown against Vercel streamdown and its remend streaming primitive, records why copse is the pick for a framework-agnostic renderer with high partial-stream fidelity, and sets the policy for remend's test corpus: adopt the input scenarios, not the healed-string assertions (asserting copse's own convergence / no-flash invariants instead). Includes a gap-discovery follow-up checklist. Refs #12 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R76iwh8Xoc2afkXfx8N4RP
Mirrors the input scenarios from Vercel remend's __tests__ (bold/italic/ code/strike, single-tilde, comparison operators, links, images, snake_case underscores, blockquote, math) but asserts this renderer's OWN invariants instead of remend's healed-string outputs: - convergence: every prefix chunking converges to the fresh full render - no-flash: held constructs never leak their raw marker mid-stream - literal-safe: lone ~, <, and intraword _ stay literal (no tag/entity slip) - completed forms: closed markers render identically to the at-rest render - known-gap: $$ math is pinned to literal pass-through so adding KaTeX trips it Findings folded into docs/streamdown-gap-analysis.md: images are already handled (forming reveal), single-tilde/comparison/underscore all confirmed safe, and KaTeX is the one genuine gap. 31 new tests, full suite 406 green. Refs #12 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R76iwh8Xoc2afkXfx8N4RP
Collaborator
Author
|
Closing as a duplicate of #14, which addresses the same issue (#12) with a decision record + the ported remend conformity corpus. Consolidating on #14 to avoid two PRs adding the same Generated by Claude Code |
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.
Addresses #12. Two commits: a decision record, and the follow-up code it prescribes.
1. Decision record —
docs/streamdown-gap-analysis.mdWritten comparison of
@copse/streaming-markdownvs Vercel's streamdown and its streaming primitive remend, plus the policy for remend's test suite.2. Ported conformity corpus —
src/remend-corpus.test.tsThe conformity call from #12: adopt remend's input scenarios, not its assertions. remend asserts
remend(str) === healedString; copse emits HTML/DOM with pending states, so those fixtures can't run verbatim, and matching remend's expected strings would regress us by design (e.g. remend heals[doc→[doc](streamdown:incomplete-link), a fake href; we reveal the label with no href until the real URL arrives — pinned byforbidHtml: [/streamdown:incomplete-link/]).So each remend input runs through our own invariants:
~,<, intraword_stay literal — no tag/entity slip31 new tests; full suite 406 green (typecheck + build clean).
Findings (folded into the doc's checklist)
[alt](partialrevealsalt, hides[+ URL, parallelingrevealFormingLink. Not a gap.$$…$$math — the one genuine gap. Passes through as literal text; pinned as aknown-gapcase so implementing math trips the test on purpose. Decision (implement vs. out-of-scope) left open.Notes
dist//node_modules/remain gitignored.npm run typecheck,npm run build,npm testlocally — all pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01R76iwh8Xoc2afkXfx8N4RP