From 5d3676d751f07b9d21c70dbca44ba6fd6ef68f89 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 11 Mar 2026 03:56:18 +0000 Subject: [PATCH] Register component-affinity as JS primitive for runtime SX access Fixes 4 test-eval.sx failures (component affinity tests). Remaining 24 failures are server-only features (defpage, stream-*) that don't belong in the browser evaluator. Co-Authored-By: Claude Opus 4.6 --- shared/static/scripts/sx-browser.js | 2 +- shared/sx/ref/bootstrap_js.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/shared/static/scripts/sx-browser.js b/shared/static/scripts/sx-browser.js index 5d48f5a..d657b2d 100644 --- a/shared/static/scripts/sx-browser.js +++ b/shared/static/scripts/sx-browser.js @@ -14,7 +14,7 @@ // ========================================================================= var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } }); - var SX_VERSION = "2026-03-11T03:51:49Z"; + var SX_VERSION = "2026-03-11T03:56:09Z"; function isNil(x) { return x === NIL || x === null || x === undefined; } function isSxTruthy(x) { return x !== false && !isNil(x); } diff --git a/shared/sx/ref/bootstrap_js.py b/shared/sx/ref/bootstrap_js.py index 9eb30eb..aae9f10 100644 --- a/shared/sx/ref/bootstrap_js.py +++ b/shared/sx/ref/bootstrap_js.py @@ -1170,6 +1170,9 @@ CONTINUATIONS_JS = ''' PRIMITIVES["continuation?"] = function(x) { return x != null && x._continuation === true; }; + // Platform accessors — exposed as primitives so user SX code can call them + PRIMITIVES["component-affinity"] = componentAffinity; + var _resetResume = []; function sfReset(args, env) {