From 9d0cffb84dd3900e721f2ff216eb7b39c40a1fdd Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 6 Mar 2026 23:16:21 +0000 Subject: [PATCH] Fix special-forms.sx path resolution in container Three levels of ../ overshot from /app/sxc/pages/ to /. Use same two-level pattern with /app/shared fallback as _read_spec_file. Co-Authored-By: Claude Opus 4.6 --- sx/sxc/pages/helpers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sx/sxc/pages/helpers.py b/sx/sxc/pages/helpers.py index ba8a1cd..2bd80fe 100644 --- a/sx/sxc/pages/helpers.py +++ b/sx/sxc/pages/helpers.py @@ -42,10 +42,10 @@ def _special_forms_data() -> dict: from shared.sx.parser import parse_all, serialize from shared.sx.types import Symbol, Keyword - spec_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), - "..", "..", "..", "shared", "sx", "ref", "special-forms.sx", - ) + ref_dir = os.path.join(os.path.dirname(__file__), "..", "..", "shared", "sx", "ref") + if not os.path.isdir(ref_dir): + ref_dir = "/app/shared/sx/ref" + spec_path = os.path.join(ref_dir, "special-forms.sx") with open(spec_path) as f: exprs = parse_all(f.read())