From 3482cbdaa6810c9c66e393bd6eea8e661ca2d142 Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 6 Mar 2026 13:34:09 +0000 Subject: [PATCH] Document host obligation for selective expansion in deps.sx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The spec classifies components as pure vs IO-dependent. Each host's async partial evaluator must act on this: expand IO-dependent server- side, serialize pure for client. This is host infrastructure, not SX semantics — documented as a contract in the spec. Co-Authored-By: Claude Opus 4.6 --- shared/sx/ref/deps.sx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/shared/sx/ref/deps.sx b/shared/sx/ref/deps.sx index 10bc059..78c5546 100644 --- a/shared/sx/ref/deps.sx +++ b/shared/sx/ref/deps.sx @@ -314,6 +314,24 @@ (empty? (transitive-io-refs name env io-names)))) +;; -------------------------------------------------------------------------- +;; Host obligation: selective expansion in async partial evaluation +;; -------------------------------------------------------------------------- +;; The spec classifies components as pure or IO-dependent. Each host's +;; async partial evaluator (the server-side rendering path that bridges +;; sync evaluation with async IO) must use this classification: +;; +;; IO-dependent component → expand server-side (IO must resolve) +;; Pure component → serialize for client (can render anywhere) +;; Layout slot context → expand all (server needs full HTML) +;; +;; The spec provides the data (component-io-refs, component-pure?). +;; The host provides the async runtime that acts on it. +;; This is not SX semantics — it is host infrastructure. Every host +;; with a server-side async evaluator implements the same rule. +;; -------------------------------------------------------------------------- + + ;; -------------------------------------------------------------------------- ;; Platform interface summary ;; --------------------------------------------------------------------------