Skip to content

Scheme at structure cadence, not render cadence

Reading of harness/docs/decisions/scheme-at-structure-cadence.md. If this page and that file disagree, the source file wins.

Scheme at structure cadence, not render cadence

Section titled “Scheme at structure cadence, not render cadence”

Scheme does not run on the hot paint/frame path. Layout structure evaluates at structure cadence in the tui worker. Content updates ride MobX boxes. The UI thread admits only code with a real visual-performance reason.

Scheme-in-the-render-path is rejected. arrival’s eval is async-only. The membrane freezes borrowed host objects on first read, which is incompatible with MobX instrumentation. Cooperative yields do not fit an 8–16ms frame budget.

As shipped, layout structure is TS @computed LayoutNode trees in the tui worker (../packages/harness/src/tui/tea.ts #root / #transcript / #composer; row constructors in ../packages/harness/src/tui/work-cells.ts). The structure vs content split is real. MobX computed / reaction for structure/content/composer are real.

Arrival-scheme layout macros and scheme-bodied layout programs remain the intended seat once bound. They are not a requirement for paint correctness today. Do not treat them as required for paint to be correct.

Boxes are host-minted (quickdraw BoxRegistry). scheme/layout handles structure references, not mutable host object graphs.

Arrival is built for correctness-and-attribution: async suspension, freeze, cooperative yield, provenance. Those properties make it a trustworthy policy language and a bad hot-render language. Structure changes rarely and can absorb async. Content needs synchronous dependency tracking. That is MobX’s job.