You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ui.rich style table follow-ups from the #3175 review (double border, latent clamp, silent no-op, docs) #3176
Follow-ups from the independent review of #3175 (merged as a64c283c, style table on ui.rich). None were blocking; all are real and should be tracked so they do not rot.
Two borders paint on one node.Block.border (cells, cap 8) and the new style.border (px, cap 16) can both be set on the same node; the reviewer measured a Rounded op plus the 4-op cell frame. A separate stroke key was rejected by scene-style-primitives-candidate.md:157-159 for exactly this reason. Needs either a documented composition rule or a typed refusal. Evidence: crates/bitty-lua/src/ui_style.rs, crates/bitty-runtime/src/scene_bridge.rs.
Latent silent clamp.crates/bitty-lua/src/ui_style.rs:395 uses u16::try_from(*count).unwrap_or(cap) — unreachable today, but on the contract's central path a silent clamp is the failure mode the caps are supposed to prevent. Replace with the typed rejection path.
Band/overlay style is a silent no-op. The additive-minor rule (lua_ui_parity::unknown_properties_are_tolerated) means style on a band/overlay mount is accepted and ignored, so a plugin author believes it took effect. Keep the tolerance, add a one-shot non-fatal diagnostic.
Docs now false.bitty-terminal-docs/specifications/scene-style-primitives-candidate.md:385 and lua-ui-composition-reconciliation.md:189 still describe ui.rich as shipping no style key; safe-mode flattening is now plugin-reachable. Sync both, and link this issue.
DuplicateField wording. That error is unreachable from a real plugin (Lua collapses duplicate table keys before the bridge sees them); adjust the message/doc so it does not imply otherwise.
Node-cost test gap. The integration-level "flat declaration costs nothing" test stayed green under a mutant that wraps flat styles; only the unit test caught it. Add a node-count assertion at the integration layer.
Acceptance
Each item either fixed with a test that fails on the pre-fix tree, or explicitly rejected with the reason recorded in the owning contract.
All six findings from the #3175 review are now resolved. Closing.
#
Finding
Resolution
Evidence
1
Two borders paint on one node
Typed refusal: a Block carrying both border.width > 0 (cells) and style.border > 0 (px) fails E_UI_COMPONENT_INVALID before anything is mounted. Zero width never collides, so each spelling alone still works; no shipped plugin declares a style table, so nothing breaks. Rationale recorded in ui_style.rs / ui_rich.rs / scene_bridge.rs and consistent with scene-style-primitives-candidate.md §157-159 (a second border mechanism on one node is the defect).
unwrap_or(cap) removed; the u16 conversion is the check and shares one refusal site with the cap check. Proved unreachable at the pre-fix head, then proved hazardous by restoring the clamp + deleting the guard (cap test fails with a clamped value). Tests pin u16::MAX+1, 1e9, i64::MAX, i64::MIN.
bitty#3179
3
Band/overlay style is a silent no-op
Tolerance kept (unknown_properties_are_tolerated); the reader now returns UiTolerated and the mount/update/overlay paths report once per VM generation through a defaulted HostServices::ui_style_ignored, latched after the mount lands. Never fires on the terminal rich path where style is honoured.
bitty#3179 — negative tests pin surface naming and the one-shot latch
4
Docs now false
Both records corrected and the landed wire shape recorded (caps, closed token set, typed refusal, band/overlay inert, safe-mode flattening now plugin-reachable but unwired).
Message and docs now state that Lua collapses literal table keys, so the arm is a type-boundary guard, not a plugin-reachable path (reviewer confirmed it is genuinely unreachable from a plugin).
bitty#3179
6
Node-cost test gap
Integration test now asserts reader count_nodes/depth and bridged SceneNode::count_nodes() against the unstyled tree. A scratch mutant that wraps flat styles fails the new assertion (no wrapper node: left 2, right 1) while the pre-fix paint-list-only body stays green.
bitty#3179 — lua_ui_style_vocab.rs:216
Merge evidence: #3179 merged 0f4d64b7 after an independent review lane (verdict APPROVE on head d30a302b, mutation proof included) with 19 checks pass / 2 skipped / 0 fail / 0 pending; #431 merged as a docs-only PR after just check (fmt, markdownlint, links, metadata, language, agents, hygiene, svg, actionlint) returned 0.
Non-blocking nits the reviewer left behind (not tracked here; they ride with the files): the stale header at lua_ui_style_vocab.rs:16-19 still describes the pre-item-3 reader behaviour, and the style_count message's "marshalled table" phrasing.
Activity
Xuepoo commentedon Nov 15, 2026
All six findings from the #3175 review are now resolved. Closing.
Blockcarrying bothborder.width > 0(cells) andstyle.border > 0(px) failsE_UI_COMPONENT_INVALIDbefore anything is mounted. Zero width never collides, so each spelling alone still works; no shipped plugin declares astyletable, so nothing breaks. Rationale recorded inui_style.rs/ui_rich.rs/scene_bridge.rsand consistent withscene-style-primitives-candidate.md§157-159 (a second border mechanism on one node is the defect).0f4d64b7) —a_block_refuses_a_second_border_on_the_same_node,a_second_border_on_one_node_is_refused_before_anything_is_paintedui_style.rs:395unwrap_or(cap)removed; theu16conversion is the check and shares one refusal site with the cap check. Proved unreachable at the pre-fix head, then proved hazardous by restoring the clamp + deleting the guard (cap test fails with a clamped value). Tests pinu16::MAX+1,1e9,i64::MAX,i64::MIN.styleis a silent no-opunknown_properties_are_tolerated); the reader now returnsUiToleratedand the mount/update/overlay paths report once per VM generation through a defaultedHostServices::ui_style_ignored, latched after the mount lands. Never fires on theterminalrich path wherestyleis honoured.specifications/scene-style-primitives-candidate.md,specifications/lua-ui-composition-reconciliation.md)DuplicateFieldwordingcount_nodes/depthand bridgedSceneNode::count_nodes()against the unstyled tree. A scratch mutant that wraps flat styles fails the new assertion (no wrapper node: left 2, right 1) while the pre-fix paint-list-only body stays green.lua_ui_style_vocab.rs:216Merge evidence: #3179 merged
0f4d64b7after an independent review lane (verdict APPROVE on headd30a302b, mutation proof included) with 19 checks pass / 2 skipped / 0 fail / 0 pending; #431 merged as a docs-only PR afterjust check(fmt, markdownlint, links, metadata, language, agents, hygiene, svg, actionlint) returned 0.Non-blocking nits the reviewer left behind (not tracked here; they ride with the files): the stale header at
lua_ui_style_vocab.rs:16-19still describes the pre-item-3 reader behaviour, and thestyle_countmessage's "marshalled table" phrasing.