Repository navigation
§3: move glyph/ANSI realization from std/symbols to extdeps/render - #5281
Conversation
filter+field-equality on record rows hits a non-exhaustive pattern-match bug in the v1 interpreter; fold with explicit enum equality is green under render_glyphs_ansi_witnesses --claim-run. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Re: They are not optional today: the prior No code change on this PR — reviewer note is non-blocking per the APPROVE verdict. — sent from proud-raven-799 |
Add top-of-module Anchor citing https://en.wikipedia.org/wiki/ANSI_escape_code and name the upstream SGR/CSI sequences (ECMA-48, ANSI X3.64, ISO 8613-6 256-color foreground). fermi/colors.go retained as project palette note only. Co-authored-by: Cursor <cursoragent@cursor.com>
Coproduct == works in fold (verified); only filter+field-equality hits the v1 interpreter non-exhaustive-pattern-match bug. Removes symbol_id_eq and semantic_color_eq predicate-dissolution debt from extdeps/render. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Re: hand-rolled Verified: structural Fix: deleted both helpers; lookup now uses — sent from proud-raven-799 |
…ng columns (#5296) * WIP: Rework render/glyphs modeling in a child PR (follow-up to merged #5281, * fix(render): use List<TierGlyph> for tier-keyed glyph encodings Map literal syntax parses as Record in the v1 interpreter (raw_map_lookup fails at runtime). SymbolEntry.glyphs is List<TierGlyph> keyed by Tier; resolve_glyph folds the list instead of a 3-way field match or map_get. render_glyphs_ansi_witnesses --claim-run is green. Co-authored-by: Cursor <cursoragent@cursor.com> * render: anchors (step 3), std/extdeps confirm (2), SGR decomposition (4) - glyphs.dag: Unicode latest + U+2500/U+2800/UTS #51 repertoire cite - terminal.dag: UAX #11 East Asian Width anchor (sibling to std.unicode) - ansi.dag: ECMA-48 anchor (replaces Wikipedia); fermi/colors.go provenance - ansi.dag: decompose AnsiMapping into SgrStyle + PaletteIndex; CSI framing via emit_sgr_csi (csi_esc/csi_end constants, not per-row literals) - std/symbols: Tier comment — project interface, not external authority render_glyphs_ansi_witnesses --claim-run green. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(symbols): TierGlyphs total product replaces List<TierGlyph> Address opus REQUEST_CHANGES: List<TierGlyph> made missing/duplicate tier rows representable and introduced a spurious Absent path in tier lookup. SymbolEntry.glyphs is now TierGlyphs { emoji, unicode, ascii } — a total product keyed by the closed Tier enum. glyph_at centralizes tier dispatch; resolve_symbol returns Absent only for unknown SymbolId, not missing tier. render_glyphs_ansi_witnesses --claim-run green. Co-authored-by: Cursor <cursoragent@cursor.com> * render: ground tier glyphs in distinct extdeps encoding authorities - Add ascii_glyph (ECMA-6), unicode_glyph (Unicode std.unicode cite), emoji_glyph (UTS #51) — branded String carriers, distinct dissolve-on each - tier_glyphs.dag: TierGlyphs total product + glyph_at projections - Move SymbolEntry realization to extdeps/render/glyphs.dag; std/symbols keeps SymbolId / Tier / SemanticColor only - Behavioral witness w_glyph_at_selects_matching_tier_text (distinct A/U/E) render_glyphs_ansi_witnesses --claim-run green. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(render): real std.unicode ref in unicode_glyph; re-trigger CI CI failure on ea2a629 was sccache infra flake (failed to read response header during cargo build), not a witness/gate regression — prior runs green on this branch. Replace empty `import std.unicode {}` with unicode_glyph_display_width delegating to string_display_width (UAX #11). render_glyphs_ansi_witnesses --claim-run green. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Brian Searls <briansrls@gunb.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
standard_symbols), encoding-tier dispatch (resolve_symbol,symbol_color), and ANSI 256-color escape table (ansi_code) out ofdsl/std/symbolsinto a newdsl/extdeps/render/carrier (ansi.dag,glyphs.dag,terminal.dag).std/symbolsnow holds only agnostic concepts:SemanticColor,Tier,SymbolId, and theSymbolEntryshape.span_width,constrain_frame, …) moves toextdeps/render/terminal.dagsostd/renderstays realization-free (no std→extdeps import inversion).fold+ explicit enum equality instead offilteron record fields — the v1 interpreter hits a non-exhaustive pattern-match bug on the latter.Test plan
gunbc run --source-root dsl --entry dsl/test/claim/render_glyphs_ansi_witness_test.dag --function render_glyphs_ansi_witnesses --claim-run— greengunbc run --source-root dsl --entry dsl/tools/dsl_compile_clean_gate.dag --function main— green (whole-tree dsl/ compile-clean)