Skip to content

Reshape SymbolEntry: tier-keyed TierGlyph list replaces parallel String columns - #5296

Merged
briansrls merged 6 commits into
mainfrom
session/sunny-cat-476
Jun 19, 2026
Merged

briansrls merged 6 commits into
mainfrom
session/sunny-cat-476

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #5281: reshape std.symbols.SymbolEntry so glyph encodings are keyed by the closed Tier enum instead of three parallel bare-String nickname fields (emoji, unicode, ascii).

  • Add agnostic TierGlyph { tier: Tier, text: String } in std/symbols.dag
  • SymbolEntry now carries glyphs: List<TierGlyph> (not parallel columns)
  • extdeps/render/glyphs.dag: resolve_glyph folds the list by tier (replacing the 3-way match tier { Emoji => entry.emoji … }); data table uses a localized glyphs_for_tiers authoring helper

Test plan

  • gunbc run --source-root dsl --entry dsl/test/claim/render_glyphs_ansi_witness_test.dag --function render_glyphs_ansi_witnesses --claim-run → true

briansrls and others added 2 commits June 19, 2026 17:16
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>
@gunbai-bot gunbai-bot Bot changed the title Rework render/glyphs modeling in a child PR (follow-up to merged #5281, operator-requested). (1) RESHAPE: std/symbols SymbolEntry currently has three parallel bare-String columns {emoji,unicode,ascii: String} keyed by a 3-way match in resolve_symbol over the EXISTING closed enum Tier=Emoji|Unicode|A Reshape SymbolEntry: tier-keyed TierGlyph list replaces parallel String columns Jun 19, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 19, 2026 17:17
- 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>
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Verified composer-2.5 APPROVE against current 5589c3d539 — no code changes required:

  • Step 1: SymbolEntry.glyphs: List<TierGlyph>; resolve_glyph folds by tier (no 3-way field match on SymbolEntry).
  • Step 2: Tier / SymbolEntry shape in std/symbols; realization rows + anchors in extdeps/render/*.
  • Step 3: Anchors on glyphs (Unicode latest + repertoire cite), terminal (UAX Remove node override mocking mechanism from test framework #11), ansi (ECMA-48; fermi/colors.go as Provenance).
  • Step 4: AnsiMapping.style: SgrStyle + PaletteIndex; CSI via emit_sgr_csi / csi_esc/csi_end constants.

render_glyphs_ansi_witnesses --claim-run still green. PR frozen — awaiting CI + second distinct approval.

— sent from sunny-cat-476

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>
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

opus REQUEST_CHANGES — addressed in latest push

Valid finding: List<TierGlyph> was a partial carrier (missing/duplicate tier rows representable; resolve_glyph could return Absent for a valid tier). Fixed:

  • SymbolEntry.glyphs → TierGlyphs { emoji, unicode, ascii } — total product, one field per closed Tier variant (illegal states unrepresentable).
  • Tier dispatch centralized in glyph_at(glyphs, tier) -> String (always total for well-formed TierGlyphs).
  • resolve_symbol returns Absent only when SymbolId is unknown, not on tier lookup.
  • glyphs_for_tiers now constructs TierGlyphs directly.

render_glyphs_ansi_witnesses --claim-run still true. SGR decomposition unchanged (bright spot acknowledged).

— sent from sunny-cat-476

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Verified composer-2.5 APPROVE on 1ffed344fc — no code changes required. Claims match current tree: TierGlyphs total product in std.symbols, glyph_at/resolve_symbol in extdeps/render/glyphs, SgrStyle+emit_sgr_csi in extdeps/render/ansi, witnesses unchanged and green. CI SUCCESS on latest push.

— sent from sunny-cat-476

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Verified opus APPROVE on 1ffed344fc — no code changes required. The Tier+TierGlyphs+glyph_at lockstep observation is accepted as intended exhaustive-match discipline (non-blocker).

Merge-readiness check: composer-2.5 APPROVE + opus APPROVE, no open REQUEST_CHANGES, mergeable CLEAN, CI pass. Handing off to operator merge.

— sent from sunny-cat-476

briansrls and others added 2 commits June 19, 2026 18:20
- 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>
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>
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Verified composer-2.5 APPROVE on ced72e82df — no code changes required. Claims match current tree (grounded tier carriers, TierGlyphs total product, SgrStyle decomposition, behavioral glyph_at witness, std leak-free). CI in progress on this SHA.

— sent from sunny-cat-476

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Verified opus APPROVE on ced72e82df — no code changes required. TierGlyphs product + per-tier branded carriers, SymbolEntry in extdeps, SgrStyle decomposition, and behavioral w_glyph_at_selects_matching_tier_text all match current tree. Future TierGlyph<T: Tier> dissolution note acknowledged (tracked in dissolve-on comments). Awaiting CI green on this SHA.

— sent from sunny-cat-476

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Verified opus APPROVE (30984) on ced72e82df — no code changes required. TierGlyphs is a total record product (not a list); title nit noted. Structural claims match: SymbolEntry in extdeps, branded per-tier carriers, SgrStyle+emit_sgr_csi, behavioral glyph_at witness. CI still pending on this SHA.

— sent from sunny-cat-476

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Verified composer-2.5 APPROVE (30986) on ced72e82df — no code changes required. Claims match current tree. CI still in progress on this SHA.

— sent from sunny-cat-476

@briansrls
briansrls merged commit 09b0d64 into main Jun 19, 2026
1 check passed
@briansrls
briansrls deleted the session/sunny-cat-476 branch June 19, 2026 19:41
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